Skip to content

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

Description

@JSONbored

⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.

Context

src/db/migration-collisions.ts:29's grandfather-list entry [90, new Set(["0090_contributor_cap_label.sql", "0090_pull_request_detail_sync_head_sha.sql"])] is stale: 0090_pull_request_detail_sync_head_sha.sql (commit 99681c3a2) was later renumbered to migrations/0092_pull_request_detail_sync_head_sha.sql -- only 0090_contributor_cap_label.sql exists at 0090 today. detectMigrationCollisions only consults this list when files.length > 1 at that number, and there's only one file at 0090 now, so this doesn't break anything today, but it's factually wrong documentation of "what's grandfathered" and would silently mask the real state if anyone re-reads the list to understand migration history.

Requirements

Remove the stale [90, ...] entry from KNOWN_MIGRATION_DUPLICATES in src/db/migration-collisions.ts. Verify the remaining entries (15, 17, 74, 156) still correctly reference files that exist in migrations/ before removing only the stale one.

Deliverables

  • The [90, ...] entry is removed from KNOWN_MIGRATION_DUPLICATES
  • A test (or an existing test updated) confirming detectMigrationCollisions behavior is unaffected for migration number 90 (single real file, no collision reported)

All of the above Deliverables are required in the same PR unless the deliverable text itself states otherwise.

Test Coverage Requirements

src/** -- 99%+ patch coverage, branch-counted, on the updated collision-detection behavior for migration 90.

Expected Outcome

KNOWN_MIGRATION_DUPLICATES accurately reflects the current, real set of grandfathered migration-number collisions.

Links & Resources

  • src/db/migration-collisions.ts:29

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions