Repository navigation
feat: implement issue #2139 — Retry cron should hold retries until a Claude window's real reset, read from the budget poller's published result (split 1 of 2 from the weekly-cap issue) - #2159
Conversation
…Claude window's real reset, read from the budget poller's published result (split 1 of 2 from the weekly-cap issue)
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 44 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (3)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe retry cron reads the budget-poller artifact once per run. It holds selected rate-limited retries while a qualifying session or weekly_all window has a future reset. The workflow adds ChangesBudget-based retry holds
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant RetryCron as Retry cron
participant ArtifactStore as GitHub Actions artifact
participant RetryTarget as Retry target
RetryCron->>ArtifactStore: Download budget-poller-log once
ArtifactStore-->>RetryCron: Return poll records
RetryCron->>RetryCron: Evaluate fresh session and weekly_all resets
alt Hold is active
RetryCron-->>RetryTarget: Skip rate-limited retry dispatch
else Hold is inactive
RetryCron->>RetryTarget: Dispatch retry
end
Merge Risk: ⚪ Minimal · up to No introduced failure remains identified that should block merging after normal checks. Pre-merge checks |
|
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-10-09T22:17:16Z. |
There was a problem hiding this comment.
Code Review
This pull request introduces a budget hold mechanism to the retry cron script (scripts/dev-lead-retry.sh) and adds a comprehensive suite of unit tests. The new mechanism reads the latest budget poller log artifact to hold rate-limited retries when usage windows are exhausted, failing open on any errors. The review feedback focuses on shell scripting optimizations and robustness, including replacing external process spawns (jq and cut) with native Bash comparisons and parameter expansions, safely handling command substitutions under set -e when creating temporary files, using cleanup traps, and preferring here-strings over piped echo commands.
…us capture in retry budget hold Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Dev-Lead — review-changes (partial)A commit was pushed, but not every requested change was applied. Per requested item:
The unaddressed items above still need work. |
|
There was a problem hiding this comment.
All reported issues were addressed across 3 files
You’re at about 96% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic



Problem
Retry cron should hold retries until a Claude window's real reset, read from the budget poller's published result (split 1 of 2 from the weekly-cap issue)
From the issue: Split 1 of 2 from #1863 (which timed out at dev-lead's maximum action budget and asked to be split). As the fleet maintainer, I want the retry cron to read the dry-run budget poller's published result to learn whether a Claude window is exhausted and when it really resets, so that a weekly cap suppresses re-dispatch until its reset instead of retrying every two hours for up to seven days.
Risk
Medium — changes GitHub Actions workflow behavior, which is exercised only post-merge; verify via the affected workflow runs.
Test plan
Tests added/updated:
tests/dev-lead/unit/test_dev_lead_retry_budget_hold.bats. Verification:bash scripts/dev-lead-lint.sh(shellcheck --severity=warning) ran pre-commit; the bats suite runs in CI.Rollback
Revert this PR. No non-revertible side effects (no tags, migrations, or external state).
Monitoring
Watch the affected workflow run(s) in the Actions tab and this PR's Lint check for regressions.
Closes #2139