Repository navigation
fix(work-resolve-issue): wait for the token's reset after the model ran instead of failing - #17321
Conversation
…an instead of failing On 2026-11-18 six lane runs failed as the GITHUB_TOKEN pool emptied, 409-987 s before its 22:46:50Z reset. Three lost a finished model run (the leak scan's getBranch was refused, so no patch was uploaded) and one kept a pushed branch but opened no PR (Check the trigger and Run Checks failed on the stop-floor). - rate-guard.mjs: API_BUDGET_WAIT_SECONDS sets the latch's wait budget (60 s by default, at most an hour). A stop-floor answer GitHub served no longer fails the step when the next call waits the reset out, and a latch with a longer budget resends a refused GET itself once. - pr-run-activity-read.yml and -write.yml take rate-limit-wait-seconds; the leak scan's two reads wait out a rate limit within it, and the scan job's timeouts grow by 20 minutes when it is set. - work-resolve-issue.yml passes 1200 s to every runner call, and sets it on Run Checks and Report Statuses, whose timeouts go from 10 to 30. - post-statuses.mjs names the lane branch a run left when report-outcome did not finish, which the next run reuses. Refs: #16642 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-limit wait Co-Authored-By: Claude Opus 5.5 <[email protected]>
…it budget A stop-floor answer GitHub served now fails nothing only when the latch has a budget over 60 s, so other lanes keep today's behaviour. The outage posture audit's work-resolve-issue element 1 cell names the 1200 s budget. Refs: #16642 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Takes #17320's WAIT_BUDGET_SECONDS and reads the lane's 1200 s from it: WAIT_BUDGET_SECONDS.workResolveIssue is waitBudgetMs's cap, and rate-guard.test.mjs pins every rate-limit-wait-seconds and API_BUDGET_WAIT_SECONDS literal in work-resolve-issue.yml, and the leak scan's cap in pr-run-activity-read.yml, to it. The tests' 1200s read the constant, and the leak-scan timeout assertion accepts the input's expression. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…test.mjs rate-guard.test.mjs crossed the 1000-line size reference with the wait budget pins. The rate-limits.json, schema and resolved-config default cases are their own concern and move unchanged to rate-limits.test.mjs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…GET_SECONDS The three handoff-evidence jobs' API_BUDGET_WAIT_SECONDS is WAIT_BUDGET_SECONDS.workResolveIssue in rate-guard.mjs, the line #17321 adds byte for byte. callers.test.mjs pins each job's value to it and checks its timeout holds the wait; the tests read the constant instead of a literal. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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. |
Lane run report
Failed GitHub API calls
|
|
claude-security-review reviewed Security review: PR #17321 (head f2206b8)No security issues found. I read every hunk of all 12 changed files in the full diff. This lane already reviewed an earlier head ( What changed since the earlier reviewThe one settled thread (rate-guard's resend running inside the caller's per-attempt timeout) is fixed at this head. Its lines have not changed since it was resolved. The guard now resends a refused GET only when the caller set no Trusted paths I checked
Other files
Spend: a waiting work-resolve-issue job holds a standard critical-findings: 0 |
|
claude-review reviewed Code review: PR #17321, wait for the token's reset after the model ran (blocking only)This lane already reviewed an earlier head ( I read every hunk of all 12 changed files. Several are on trusted paths:
Earlier finding. The guard used to wait inside a caller's per-attempt timeout. That is now fixed: the guard resends only when
No blocking findings at this head. What I checked:
Spend (not a finding, no hold). A waiting job can hold its Actions runner for up to 20 more minutes. Run Checks and Report Statuses go from 10 to 30 minutes, and the leak-scan job from 20 to 40 when the input is set. The repository is public, so this uses runner time and concurrency, not billing. Criteria checked:
Loosened-check verdict: fail (default; the wrapper gave no
I ran no tests; the PR's Verification section is the author's claim and unverified. Verifier dropped 0 of 0 candidates. |
…RESEND marker retryServerErrors marks every attempt and sends `[RESEND]: false` on its last one, inside a 20 s AbortSignal.timeout it starts after its own latch wait. The patient guard took that `false` as its cue to wait out a reset of up to WAIT_BUDGET_SECONDS.workResolveIssue and send again, so the resend met the expired signal and the step failed on a TimeoutError that hid the limit. The guard now resends only when the caller set no marker (lib/retry-fetch.mjs); a marked refusal goes back to its caller, and an unresent one fails with the limit named, as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Refs: #16642
Summary
On 2026-11-18 six work-resolve-issue runs failed as the GITHUB_TOKEN pool emptied, 409-987 s before its 22:46:50Z reset. Four lost work:
work-resolve-issue/issue-17230-44405800674-1pushed, no PRgetBranch403)Fix
rate-guard.mjs:API_BUDGET_WAIT_SECONDSsets the latch's wait budget (60 s by default, whole seconds up to 3600). Only under a longer budget, a stop-floor answer GitHub served no longer fails its step when the next call waits the reset out, and the latch resends a refused GET once after the wait. With the default, every lane behaves as before. The 5xx budget stays 60 s.pr-run-activity-read.yml,pr-run-activity-write.yml: arate-limit-wait-secondsinput (default 0, today's behaviour for every other lane). The write runner's run job gets it as the guard's budget; the read runner's leak scan resends a rate-limited read once within it, and the scan job's timeouts grow from 20/10 to 40/30 minutes only when it is set.work-resolve-issue.yml: passes 1200 to every runner call and sets it on Run Checks and Report Statuses, whose timeouts go from 10 to 30. 1200 s holds every stop measured above (max 987 s).post-statuses.mjs: when report-outcome did not finish, the Report Statuses job names the lane branch the run left; findPrior reuses a branch with no PR whose run left no outcome marker.Not covered: the gh wrapper (
api-budget.bash, copied verbatim intopr-require-checks.yml) still refuses without waiting, so the handoff and stale reads can still fail. apply-issue-patch does not depend on the handoff job (work-resolve-issue.ymlneeds: [resolve-issue, resolve-issue-subscription, resolve-issue-fallback]), so a scanned patch is still applied. No start-gate threshold changes.Cost and timing: a waiting job holds its runner for up to 20 min, against today's measured peak of 57 of 60 Actions jobs. Actions minutes cost nothing because the repository is public. This touches
work-resolve-issue.ymland both runner workflows, so lane runs in flight at merge stop on stale workflow files and re-fire.Verification
node --testonrate-guard.test.mjs(165 pass),post-statuses.test.mjs(24 pass), and the two leak-scan cases incallers.test.mjs. The new rate-guard cases fail when the floor and resend behaviours are disabled.scripts/check-affected.sh --tests: 14 passed, 175 skipped.actionlinton the three workflows: clean.Related
x-ratelimit-reset)🤖 Generated with Claude Code