Skip to content

fix(migrations): grandfather the shipped 0090 duplicate#2532

Closed
JSONbored wants to merge 2 commits into
mainfrom
fix/migration-0090-known-duplicate
Closed

fix(migrations): grandfather the shipped 0090 duplicate#2532
JSONbored wants to merge 2 commits into
mainfrom
fix/migration-0090-known-duplicate

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • 0090_contributor_cap_label.sql (feat(agent-actions): auto-close a contributor's PR over the open-PR cap (#2270) #2479) and 0090_pull_request_detail_sync_head_sha.sql (fix(selfhost): cap historical PR file hydration and cache by head SHA #2527) both merged to main with the same migration number, so npm run db:migrations:check currently fails on main itself — and therefore fails the required validate check on every PR that touches src/** (the backend path filter), not just migration PRs.
  • Both are bare ALTER TABLE ... ADD COLUMN statements already applied in production, so renumbering either now would make wrangler (and the self-host migrator) try to re-apply an already-shipped, non-idempotent migration and error the deploy. Per the script's own documented policy for this exact situation (see the 0015/0017/0074 precedents), the fix is to grandfather 0090 into KNOWN_DUPLICATES, not rename either file.
  • Updated the one test that asserts the exact grandfathered-duplicates count in the success summary.

No issue filed for this — it's a small, self-evident infra fix blocking CI for unrelated PRs, following the exact precedent already established in scripts/check-migrations.mjs for prior duplicate collisions.

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 an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; scripts/** and test/** carry no Codecov patch obligation, but the affected test (test/unit/check-migrations-script.test.ts) was updated and passes.
  • 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

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 — N/A, no UI changes.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

Notes

JSONbored added 2 commits July 2, 2026 01:30
0090_contributor_cap_label.sql (#2479) and 0090_pull_request_detail_sync_head_sha.sql
(#2527) both merged to main with the same migration number. Both are bare
ADD COLUMN statements that are already applied in production, so renumbering
either now would make wrangler try to re-apply it and error the deploy — the
same non-idempotent-rename hazard already documented for the 0015/0017/0074
grandfathered pairs. Add 0090 to KNOWN_DUPLICATES so db:migrations:check
passes again for every PR that touches src/**, which currently fails the
required validate check on all of them regardless of whether they touch
migrations/.
@dosubot dosubot Bot added the size:XS label Jul 2, 2026
@gittensory-orb

gittensory-orb Bot commented Jul 2, 2026

Copy link
Copy Markdown

Important

🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪

🔍 Gittensory is reviewing…

AI analysis is in progress. This comment will update when the review is complete.

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

@gittensory-orb gittensory-orb Bot added gittensor Gittensor contributor context gittensor:bug Gittensor-scored bug fix — scores a 0.5x multiplier. labels Jul 2, 2026
@JSONbored JSONbored self-assigned this Jul 2, 2026
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.96%. Comparing base (67e7b03) to head (300524c).
⚠️ Report is 31 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2532      +/-   ##
==========================================
+ Coverage   95.95%   95.96%   +0.01%     
==========================================
  Files         226      228       +2     
  Lines       25391    25702     +311     
  Branches     9234     9346     +112     
==========================================
+ Hits        24363    24666     +303     
- Misses        417      425       +8     
  Partials      611      611              

see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored

Copy link
Copy Markdown
Owner Author

Superseded — main already carries an identical grandfathered-0090 fix via #2528 (landed on top of #2517's temp-schema detection improvements, which this branch predates). Closing rather than rebasing a now-stale/regressive diff.

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.5x multiplier. gittensor Gittensor contributor context

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant