fix(queue): drop version-queue special-case 30 retries#2764
Conversation
VERSION_QUEUE_MAX_READS=30 was a band-aid for timeout redeliveries on large deleted manifests. Cleanup already commits per file, and the sweeper requeues leftovers — keep the shared MAX_QUEUE_READS=5 budget for every queue. Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📝 WalkthroughWalkthroughThe queue consumer now uses a shared five-read retry budget for all queues. Related unit tests use the exported constant and validate failure alert behavior at the retry threshold. Manifest cleanup documentation describes per-file commits and later sweep handling. ChangesQueue retry behavior
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_3ff33768-79b2-47b0-abf4-42c2bb89b20f) |
|





Summary (AI generated)
VERSION_QUEUE_MAX_READS = 30from the queue consumeron_version_update, etc.) now use the sharedMAX_QUEUE_READS = 5budget like every other queuesweep_deleted_version_manifestsMotivation (AI generated)
#2724 raised version-queue retries to 30 with the claim that large deleted manifests need many “partial trash/delete passes.” That was the wrong model: cleanup already commits per file inside the pass, incomplete/timeout work should not burn a 30-retry failure budget, and the sweeper already re-touches stuck soft-deleted versions. The inflated budget also masked stuck messages from
/queue_health(stuck_high_read_ct> 5 while the consumer still considered them “in budget”).Business Impact (AI generated)
Fails bad version-update work sooner (Discord + archive after 5 reads), keeps monitoring aligned with real retry policy, and avoids hiding backlog behind an oversized retry allowance.
Test Plan (AI generated)
bunx vitest run tests/queue-consumer-message-shape.unit.test.ts/queue_healthno longer treatsread_ct6–29 onon_version_updateas healthy while consumer still retriesGenerated with AI
Summary by CodeRabbit
Bug Fixes
Documentation