Repository navigation
fix(work-unblock): re-fire pre-model rate-limit stops and admit/pick-slot kill-switch skips - #15364
Conversation
…slot kill-switch skips label-unblocked now classifies a work-resolve-issue run whose admit, pick-slot, or a call's broker-check or run job failed on a rate-guard or api-budget.bash rate-limit stop line (the hit-the-limit wording and the stop-floor wording) as a failed mint, in a run where no model step ran. It is re-fired once the reset the line names and reset-clamp-min hours after the run ended have passed, on the failed-mint bound and backoff. The log is read through the existing path: one failed job per run, LOG_CAP_BYTES, the failed step's last line, carried by verdict-carry. admit and pick-slot now check the kill switch first and skip their API steps while it is on; label-unblocked reads that skip as a breaker trip at broker-check, re-fired by the first sweep after the switch clears. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VQb9Q1HHi6JACp77x2ZbE7
…comments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VQb9Q1HHi6JACp77x2ZbE7
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fac0aede8b
ℹ️ 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".
|
claude-security-review reviewed Security review (incremental, blocking only): no security issues foundI read every hunk of both files in scope: critical-findings: 0 Stricter breaker-trip check (
Rate-limit cause text (
Not findings
Spend: none beyond what was there before. |
|
claude-review reviewed Code review: PR #15364, incremental (fac0aed → 7ef2b1a)No blocking findings. I read every hunk of both files in the incremental list:
The prior finding is fixed (the backoff cause for a rate-limit stop, discussion_r4538311939):
Kill-switch classification is now tighter, and it checks out:
Notes (not findings)
|
…ame the rate limit in its records An admit job whose install failed with the kill switch off also skips `Check the trigger`, which the sweep misread as a kill-switch trip. A kill-switch skip now needs a green job: admit with both its install and its trigger check skipped, pick-slot with its WIP check skipped. A pre-model rate-limit stop's re-fire and backoff records now name GitHub's API rate limit and its reset instead of the lane token broker, still on the failed-mint wait and bound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VQb9Q1HHi6JACp77x2ZbE7
No related issue: hub lessons-ledger finding L533 (rate-limited lane runs wait 3 h to re-fire)
Summary
work-unblock's
label-unblocked.mjsnow re-fires a work-resolve-issue run that a GitHub API rate-limit stop failed before any model turn. It re-fires it the way it re-fires a failed lane-token mint: once the reset named in the stop line has passed, on the existing failed-mint wait, per-version bound and backoff. Before this change, such a run fell to the failed-run or stranded rules.The admit and pick-slot jobs now check the lanes kill switch first. The sweep reads a kill-switch skip in either job as a breaker trip at broker-check, so the first sweep after the switch clears re-fires the run.
Scope note: this change does not cover the measured L533 runs.
run-checksfailed. The job listings showresolve-issue-subscription / runranRun the skill on the OAuth token. In 42976925201,apply-issue-patch / runalso ranRequest the lane token.run-checksonly runs after a model leg or on a reused branch (work-resolve-issue.ymlrun-checks.if). It is therefore left out of the pre-model jobs, because a run where a model ran is never classified.failure. The sweep therefore re-fires them once per workflow version and then applies the 3-hourfailed-againbackoff. They never reach theno-reportrule.What this change does cover is the rate-guard stops before the model, which #15305's stop floor will make more common.
Fix
Classification (
didNoWork). A run where no model step ran (Run the skill on …orSummarize the reused branch on …) now counts asmint-failedwith a reset when two things hold:hit GitHub's <pool> rate limit (status N);left GitHub's <pool> N of M requests, at or under its stop-floor share X;'cmd' hit GitHub's <pool> rate limit: no call to it before ….The run's due time is the later of the named reset and
reset-clamp-minhours after the run ended.Log reading. The log is read through the existing path: one job per run,
LOG_CAP_BYTES, the line before the firstProcess completed. The newlimitmode is the last fallback in the one-log-per-run chain. An unreadable log, or a last line that is not a stop line, leaves the run on its existing path.Verdict carry.
verdict-carry.mjsaccepts thelimitmode and its ISO reset value, so later sweeps do not read the same log again.Kill-switch trips. A run counts as a kill-switch trip at broker-check, which re-fires with no wait, in either case:
Check the kill switchsucceeded andCheck the triggerwas skipped;Check the kill switchsucceeded andCheck the WIP capwas skipped.Workflow (
work-resolve-issue.yml). Both jobs get the siblingcheck-kill-switchstep.Install resolve-config's packagesandCheck the triggerare gated onproceed == 'true'.continue-on-error, andCheck the WIP cap,Hold on an unknown WIP capandMark the lane holdare gated onproceed != 'false'. A check that cannot run (no checkout) then keeps the job's existing green hold instead of failing the job. Only a switch that is read as on skips these steps, and broker-check asks again before any model turn.Comments. The module header and the
didNoWorkandrefusalReadercomments describe the new classes.API cost per sweep. The sweep makes no calls beyond the existing one log read per refused run.
refusalOfcall per run, in the single ternary (label-unblocked.mjs:1790-1802;limitis its last branch at line 1801).jobLog(repo, job.id, { maxBytes: LOG_CAP_BYTES })read (line 1840), which is carried after its first read.logReadsis[]for this case.Verification
node --test --test-concurrency=4 .github/scripts/work-unblock/label-unblocked.test.mjs .github/scripts/work-unblock/verdict-carry.test.mjs: 396 of 396 pass.limitreset.node --test --test-concurrency=4over the workflow-reading suites (callers,check-upstream-status,check-wip-cap,log-api-budget,check-trusted-trigger,workflow-gates,publish-lane-level,signals,report-outcome): 1456 tests. One callers test needed the new kill output in its expression context. It was updated, andcallers.test.mjsnow passes 283 of 283.zizmor --offline .github/workflows/work-resolve-issue.yml: no findings.actionlint(older than CI's pin) reports only errors already on main, on unchanged lines:field_added,cache-mode,queue: max.Related
session: GitHub Support
🤖 Generated with Claude Code
https://claude.ai/code/session_01VQb9Q1HHi6JACp77x2ZbE7