fix(queue): unify the per-PR actuation lock across maintenance and draft-dodge/reopen-reclose - #2447
Conversation
…-dodge, and reopen-reclose maybeRunAgentMaintenance claimed a separate claimAgentMaintenanceLock while the draft-dodge and reopen-reclose paths claimed claimPrActuationLock — two independent lock namespaces for the same PR meant a maintenance pass and a draft-dodge/reopen-reclose actuation could still race each other, the exact gap a review on #2399 flagged after it had already merged. Route maybeRunAgentMaintenance through claimPrActuationLock/ releasePrActuationLock too and remove the now-redundant claimAgentMaintenanceLock so every mutating PR path shares one lock.
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-02 01:37:50 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 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.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2447 +/- ##
==========================================
- Coverage 95.91% 95.91% -0.01%
==========================================
Files 224 224
Lines 25240 25235 -5
Branches 9177 9177
==========================================
- Hits 24210 24205 -5
Misses 417 417
Partials 613 613
🚀 New features to boost your workflow:
|
Summary
maybeRunAgentMaintenanceclaimed a separateclaimAgentMaintenanceLock, while the draft-dodge and reopen-reclose paths added in fix(queue): add a per-PR actuation mutex for the draft-dodge and reopen-reclose paths #2399 claimedclaimPrActuationLock— two independent lock namespaces for the same PR meant a maintenance/check-suite pass could still race a draft-dodge close or reopen-reclose on the same PR. The fix landed after fix(queue): add a per-PR actuation mutex for the draft-dodge and reopen-reclose paths #2399 had already merged, so this ships the fix as its own PR.maybeRunAgentMaintenancenow claims/releases the sameclaimPrActuationLock/releasePrActuationLockthe other two paths use, and the now-redundantclaimAgentMaintenanceLock/releaseAgentMaintenanceLock/agentMaintenanceLockKeyare removed — one shared lock namespace, not one lock per mutating path.pr-actuation-lock:key (previously pre-claimed the now-removedagent-maintenance-lock:key) and removed the now-duplicateclaimAgentMaintenanceLock-specific unit tests, sinceclaimPrActuationLock's existing test suite already covers the identical atomic-claim/fail-open guarantees.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally — the only functionally-changed lines (the lock call sites) are covered by the existing test suite; the rest of the diff is comments/deletions.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateSafety
Notes
src/queue/processors.ts.