feat: queue priority - fresh tasks before retries (t313)#1213
feat: queue priority - fresh tasks before retries (t313)#1213marcusquinn merged 1 commit intomainfrom
Conversation
Previous commit changed ORDER BY in 7 queries including informational ones (check_batch_completion, cmd_status, run_session_review, cmd_release). Only the 2 dispatch queries in cmd_next() need retry-aware ordering. Reset and re-apply to just those 2 locations.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
WalkthroughModified SQL ordering logic in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Thu Feb 12 03:41:31 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|



Summary
cmd_next()dispatch ordering to sort byretries ASCfirst, ensuring fresh tasks (retries=0) always dispatch before retried taskscmd_next()(batch dispatch and global dispatch)Problem
When failed tasks get reset and re-queued, they could consume all dispatch slots, blocking fresh tasks that have a better chance of succeeding. This wastes worker tokens on tasks that already failed once.
Changes
cmd_next()batch query (L3693)ORDER BY bt.positionORDER BY t.retries ASC, bt.positioncmd_next()global query (L3702)ORDER BY created_at ASCORDER BY retries ASC, created_at ASCTesting
bash -nsyntax check: PASSCloses #313
Summary by CodeRabbit