Repository navigation
feat(pr-pipeline): re-fire at most one budget-stopped issue run per slot - #17508
Conversation
A budget-stopped run re-fired as the second run per slot often waited 20 to 47 minutes for a slot, past the 20-minute window after the token reset, and the start gate stopped it again. Add limits.refire-budget-per-slot (default 1): work-unblock re-fires budget-stopped issues only until the unfinished lane runs reach this times SLOTS. Those re-fires still count toward refire-queue-per-slot's room; every other re-fire keeps two per slot. A budget item deferred by the cap leaves its shared room to switch trips. Refs: #17460 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c4717b2421
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review: no security issues foundThis lane already reviewed an earlier head ( The change adds one pacing limit, Trusted paths checked:
The schema limits the value to whole numbers from 1 to 10, and the new The settled thread on Spend: nothing new. The change lowers the cap on budget-stop re-fires, so the sweep re-fires the same number of issue-lane runs or fewer. critical-findings: 0 |
|
claude-review reviewed Code review:
|
|
The pr-verify verifier failed head What it wrote (29 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
…e budget-stop room A switch-trip or upstream-status re-fire that sorted ahead of a budget stop took shared room without touching the budget-stop room, so budget stops could still re-fire as the second run per slot. Every accepted paced re-fire now spends budget-stop room too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj
Refs: #17460
Summary
After a GitHub token budget reset, the work-unblock sweep re-fired budget-stopped issue-lane runs at the general rate of two per slot (
limits.refire-queue-per-slot: 2, owner decision Q109). The run re-fired as the second one per slot often waited 20 to 47 minutes for one of the 3 slots, past the 20-minute window after the reset (FLOOR_SPAN_MIN), so the start gate stopped it again and it waited another hour. On 2026-11-19, 17 of 48 budget stops came after a slot wait of 20 minutes or more.Owner decision: https://github.com/melodic-software/architecture/blob/c3a36f0e86c268cd6a427abd344c69d76c03d654/docs/owner-decisions.md#L237. Owner, verbatim: "Go with recommendations." Decision: in each 20-minute window after a GitHub token budget reset, the work-unblock sweep re-fires at most one budget-stopped issue-lane run per slot. Every other re-fire keeps Q109's two per slot, and the start gate, the window and the budget pacing are unchanged.
Part of #17460 this delivers
#17460's first done-when item is "Spend is paced across the hour". This PR delivers one piece of that pacing: the re-fires of budget-stopped runs after a reset. Today a second re-fire per slot queues past the 20-minute window, its start gate stops it on the budget again, and it is re-fired an hour later, so the same issue spends its start-up calls in two or more hours. Capping these re-fires at one per slot lets each one start inside its window, which removes those repeat stops and the calls they spend. It changes no consumer and no dispatch path, so it does not by itself meet that done-when item.
Fix
limits.refire-budget-per-slot(default 1, from 1 to 10). It is set indocs/conventions/pr-pipeline.yamlwith a comment linking the decision, and added to the schema, to resolve-config'slimitsOfand to the lane scripts'LIMIT_DEFAULTS.label-unblocked.mjs: in the sametryas the existing kill-switch room, the sweep computes a budget-stop room asrefire-budget-per-slot × SLOTSminus the unfinished lane runs (stale queued runs are left out, as they already are). A budget-stopped item,stall === "breaker"withtrip.budget, needs both rooms. When the budget room is spent, the item is deferred before it takes any of the shared room, so switch trips and upstream-status re-fires still fill two per slot. Every switch-trip or upstream-status re-fire the sweep accepts also spends budget room, so one that sorts ahead of a budget stop counts toward the budget target (review finding). If the listing fails, the budget room stays at 0, the same as the existing hold. The sweep logs the budget room and each deferral with its own line..changes/pr-pipeline/feat-refire-budget-per-slot-7c2e4a91.md(minor bump).Verification
node --testonlabel-unblocked.test.mjs: 465 of 465 pass at the new head. Earlier,label-unblocked.test.mjs,resolve.test.mjs,live-config.test.mjsandresolve-config.test.mjs: 765 of 765 pass. Alsopr-unblock/dispatch,dependency-dispatch,feedback-dispatchandwork-resolve-issue/report-outcome, which read the limit defaults: 794 of 794 pass.refire-budget-per-slot: 2withrefire-queue-per-slot: 3and 2 unfinished runs re-fires 4 of 5.resolve.test.mjsaccepts 2 and rejects 0, 11 and 1.5.Remaining for #17460
These done-when items stay open for later work:
if:gate on pr-dispatch-feedback.limits/gh-job-calls.jsonl.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj