fix(gate): recheck migration collisions at merge#2763
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-03 19:42:20 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 6 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
|
Closing as superseded: this exact feature (live migrations/** collision recheck at merge, #2550) already shipped on |
Motivation
Description
src/services/migration-collision-recheck.tswithmigrationFilenamesForLiveRecheckandresolveLiveMigrationCollisionHoldso planning and actuation use identical logic.src/queue/processors.ts) to call the shared helper instead of its private copy of the logic so the two paths stay consistent.src/services/agent-action-executor.ts) that, formergeactions, refreshes the PR's changed files and the base tree and re-runs the live collision check; when a collision is found the executor applies the existinggittensory:migration-collisionlabel + comment and denies the merge instead of executing a stale plan.test/unit/migration-collision-recheck.test.tsfor helper behavior and a targeted regression intest/unit/agent-approval-queue.test.tsproving a staged merge is denied when a sibling migration lands before approval, plus a fast-path test that skips the recheck when the PR has no migration files.Testing
npx vitest run test/unit/agent-approval-queue.test.ts test/unit/migration-collision-recheck.test.tsandnpx vitest run test/unit/agent-approval-queue.test.ts test/unit/agent-action-executor.test.ts test/unit/migration-collisions.test.ts test/unit/migration-tree.test.ts test/unit/migration-collision-recheck.test.tsand they passed locally (all related tests green).git diff --check(no whitespace/conflict markers) and the modified tests exercise collision/no-collision and fail-open behavior.npm run typecheckcould not be completed cleanly due to pre-existing unrelated test-fixture type errors intest/unit/queue.test.ts(missingsecurityFocusfixture field), not caused by this change.npm audit --audit-level=moderateand the fullnpm run test:ciwere blocked by network/registry constraints in the environment (npm auditreturned a403 Forbiddenandactionlintsetup hit network resolution issues), so those checks were not completed here.Codex Task