Repository navigation
fix(budget-breaker): lengthen the early exit's default slot from two minutes to ten - #2307
Conversation
…minutes to ten The first 84 minutes under the workflow_run trigger created 309 runs and executed 115, far above the estimate, because fleet activity is burstier than its daily average. A two-minute slot allowed up to 30 organisation scans an hour on the shared maintainer login while the breaker is disarmed. Ten minutes allows 6. A marker in this repository still makes the next run decide at once; one posted only elsewhere waits for the next slot. Refs #2259 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
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 55 minutes. View limit details
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 |
There was a problem hiding this comment.
Code Review
This pull request increases the default value of BUDGET_BREAKER_MIN_INTERVAL_MIN from 2 to 10 minutes across the documentation, script implementation, and unit tests. This change is intended to reduce the frequency of organization scans and conserve API quota. No review comments were provided, so there is no additional feedback to address.
CodeAnt PR Risk: Low Risk
Assessed commit: |
|
dev-lead is withholding action on this item. It is labeled To re-enable automated pickup: remove the |
QA Lead — test-risk advisoryRisk tier: LOW. This PR changes one default (2 → 10 minutes) in a breaker that is not armed. Setting a repository variable rolls it back, and the new default is tested on both sides of the slot boundary. What I'd shore up (highest leverage first):
Escalate? No. Advisory only — I comment, I do not change code. Ground: BMAD Test Architecture |
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-10-11T20:19:04Z. |
…s slot alignment, and state scans from scheduled ticks From review: the 610-second case only showed the run did not exit early; it now shows it scanned and decided. The fixture's clock must be a multiple of 600 for the default slot, which is now checked. And the documentation said at most six organisation scans an hour; that is from event wake-ups, and each delivered scheduled tick adds one. Refs #2259 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review round 1, head |
|
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-10-11T22:04:39Z. |



Problem
"feat(budget-breaker): wake on agent workflow runs" (#2293) estimated about 47 breaker runs an hour. The first 84 minutes of real runs showed 309 created and 115 executed (about 82 an hour), with no self-trigger loop: fleet activity is much burstier than the daily average the estimate used. With a two-minute early-exit slot, that is up to 30 organisation scans an hour on the maintainer login's shared API quota, for a breaker that is disarmed and decided
noneevery time. Measurements are on #2259.Design
One default changes:
BUDGET_BREAKER_MIN_INTERVAL_MINgoes from 2 to 10 minutes when the repository variable is unset. Nothing else about the early exit changes.The maintainer chose this over leaving it for a day or reverting #2293.
Risk
BUDGET_BREAKER_ARMEDis unset.Test plan
tests/dev-lead/unit/test_budget_breaker_writer.bats: 97 of 97. The default-slot assertions now expect ten minutes; the tunable test sets two explicitly, and gains two cases for the default: a wake-up 590 seconds into the slot exits early on a run created at its start, and one 610 seconds in (the next slot) decides.shellcheck --severity=warning -xclean.Rollback
Revert, or set the repository variable
BUDGET_BREAKER_MIN_INTERVAL_MINto2.Monitoring
Breaker run logs: the share of runs that print
early exitshould rise, andquota markers readshould appear at most six times an hour outside a quota event.Refs #2259
🤖 Generated with Claude Code