fix(queue): retry contended reopen guards - #2473
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-02 06:32:04 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.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2473 +/- ##
==========================================
+ Coverage 95.94% 95.95% +0.01%
==========================================
Files 226 226
Lines 25361 25427 +66
Branches 9229 9245 +16
==========================================
+ Hits 24333 24399 +66
Misses 417 417
Partials 611 611
🚀 New features to boost your workflow:
|
270d130 to
fa9a49e
Compare
Motivation
Description
src/queue/processors.tsthe reopen handler now throws aRetryableJobErrorwhenmaybeRecloseDisallowedReopen()returns"lock_contended", instead of stamping the webhook rowprocessedand returning;"reclosed"still early-returns and stampsprocessedas before.ReopenRecloseOutcomecomments to document that lock contention must be retried rather than acknowledged as handled.test/unit/queue.test.tsthat pre-claims the per-PR lock and asserts a contended reopen produces a retryable error, performs noPATCH /pulls/..., does not start the normal re-review, and leaves the webhook row non-processed for redelivery.Testing
npx vitest run test/unit/queue.test.ts -t "contended reopen-reclose"and it passed (covers the lock-contention behavior).npm run typecheckwhich completed successfully.npx vitest run test/unit/queue.test.ts --reporter=dot) in this environment and it hit multiple existing 15s test timeouts in unrelated sweep tests, producing failures; the focused regression test is the meaningful verification for this change.Codex Task