Skip to content

fix(db): drop stale migration-90 grandfather entry - #8916

Closed
joaovictor91123 wants to merge 1 commit into
JSONbored:mainfrom
joaovictor91123:fix/stale-migration-duplicates-8897
Closed

fix(db): drop stale migration-90 grandfather entry#8916
joaovictor91123 wants to merge 1 commit into
JSONbored:mainfrom
joaovictor91123:fix/stale-migration-duplicates-8897

Conversation

@joaovictor91123

Copy link
Copy Markdown
Contributor

Summary

  • Remove the stale [90, ...] entry from KNOWN_MIGRATION_DUPLICATES after 0090_pull_request_detail_sync_head_sha was renumbered to 0092.
  • Update the check-migrations header comment and pin unit coverage that migration 90 with a single real file reports no collision.

Closes #8897

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) - a linked open issue is required for every contributor PR.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ?99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • Local Node is v24; repo engines pin Node 22. Coverage is in test/unit/migration-collisions.test.ts and will run under CI. Single-commit PR (one-shot repo). Remaining grandfather entries (15/17/74/156) still reference files present under migrations/.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

N/A - no visible UI changes.

Notes

0090_pull_request_detail_sync_head_sha was renumbered to 0092; keep KNOWN_MIGRATION_DUPLICATES aligned with the real files on disk.

Closes JSONbored#8897
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 26, 2026
@loopover-orb

loopover-orb Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-26 13:41:10 UTC

3 files · 1 AI reviewer · no blockers · CI failing · blocked

🛑 Suggested Action - Fix Blockers

Review summary
This PR removes the stale 0090 grandfather entry from KNOWN_MIGRATION_DUPLICATES now that 0090_pull_request_detail_sync_head_sha.sql was renumbered to 0092, updates the check-migrations.ts header comment accordingly, and adds a pinned test confirming detectMigrationCollisions([...]) returns [] for the single remaining 0090 file plus the renumbered 0092 file. The change is narrow, well-targeted, and the trace is verifiable in the diff: KNOWN_MIGRATION_DUPLICATES.get(90) no longer exists, and the new test exercises the real function against the real post-fix filename pair rather than a fabricated collision. The 0156 comment edit (dropping the '/0090' cross-reference) is a correct, consistent cleanup since 0090 no longer has a grandfather entry to point to.

Nits — 4 non-blocking
  • The two FAILED checks (validate-tests, validate) have no detail provided, and per BASE BRANCH STATUS this branch is 7 commits behind default — that's the more likely cause than a defect in this small, self-contained diff; consider rebasing before re-requesting review.
  • PR checklist boxes for typecheck/test:coverage/etc. are left unchecked with a stated reason (local Node version mismatch) — worth confirming CI's own run of these actually passes once rebased, since the failing checks are unexplained.
  • Once rebased onto the current default branch, re-run validate/validate-tests to confirm the failures are resolved by the rebase rather than by an actual defect in check-migrations.ts or migration-collisions.ts.
  • Consider adding a one-line note in the PR description that the 0156 comment's grandfather cross-reference to 0090 was also removed, since it's a small but relevant piece of the diff.

CI checks failing

  • validate
  • validate-tests

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8897
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 162 registered-repo PR(s), 74 merged, 5 issue(s).
Contributor context ✅ Confirmed Gittensor contributor joaovictor91123; Gittensor profile; 162 PR(s), 5 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The PR removes the stale [90, ...] entry from KNOWN_MIGRATION_DUPLICATES, updates the check-migrations header comment to reflect the renumbering, and adds a test confirming detectMigrationCollisions reports no collision for the single real migration-90 file plus the renumbered 0092 file.

Review context
  • Author: joaovictor91123
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, JavaScript, MDX, TypeScript, C++, CSS, Rust
  • Official Gittensor activity: 162 PR(s), 5 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Triage stale or unlinked PRs.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb

loopover-orb Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 26, 2026
@joaovictor91123

Copy link
Copy Markdown
Contributor Author

Closing in favor of a replacement PR that also updates test/unit/check-migrations-script.test.ts (CI failed: expected 5 grandfathered duplicates including 0090; after dropping the stale entry the success summary correctly reports 4). One-shot policy - no follow-up push on this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(db): stale KNOWN_MIGRATION_DUPLICATES entry for migration 90 references a file that no longer exists

1 participant