Repository navigation
feat(pr-pipeline): emit one api-stop notice for the pools a job's rate guard stopped - #17318
Conversation
…e guard stopped The job-end budget log writes `api-stop <pool> <reset epoch> <cause>[ guessed]` from the guard's stop, cause, guessed and fallback files, one entry per stopped pool, ahead of the counting notices. A reader that recovers a stopped run can take the pool, the reset and the cause from it instead of matching each refusal's wording. The log-api-budget action, ci-status's log step and mark-lanes' exit trap emit it. pr-require-checks.yml's two API_BUDGET_SH blocks are regenerated by scripts/sync-hold-floor.py. 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dffb6df454
ℹ️ 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 needs no new review of Security review: PR #17318, incremental (1884149 → ce7f1c1)No security issues found. I read every hunk of the 4 files in this push. This lane already reviewed an earlier head, so this review reports only blocking findings. What changed:
Spend: none. The change only removes comments and adds no API calls or runs. critical-findings: 0 |
|
claude-review needs no new review of Code review: no blocking findingsThis was a blocking-only review. This lane already reviewed an earlier head ( The change drops full-line comments from the two
Closing issue: none. The PR context says this is the first slice of a design, so there are no acceptance criteria to check. The PR context, settled-threads and prior-findings files contained no embedded directives. Prior finding: the only earlier post is a summary comment with no line anchor and no findings, so there is nothing to repeat. Loosened-check verdict: fail. That is the default, because the prompt gave no Spend: none. This push changes only comment lines in an embedded env value, plus the generator and its test. Verifier dropped 0 of 0 candidates. |
… stop notice Concatenated, an unterminated last line in guessed merged with the first line of fallback, so a whole fallback record was dropped and its stop lost the "guessed" mark. A \002 line between the two ends any partial guessed line on a line no pattern matches, and the fallback starts on a line of its own. The two verbatim copies in pr-require-checks.yml carry the same change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
pr-require-checks.yml reached 512,670 bytes with the api-stop function, over GitHub's 500 KB workflow file limit, so its runs failed with no jobs. sync-hold-floor.py now embeds api-budget.bash without its full-line comments (declare -f of both forms is identical), which takes the file to 481,110 bytes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
No related issue: first slice of the rate-guard recovery design the hub ordered after the 2026-11-18 stop-floor failures.
Summary
A job whose rate guard stopped a pool now ends with one
api-stopnotice:One entry per stopped pool, at its latest reset.
<cause>islimitorserver-<5xx>;guessedmarks a time no response header gave. A reader that recovers a stopped run can take the pool, the reset and the cause from this line instead of matching each refusal's wording.Nothing reads the notice yet. The reconciler's reader is the next slice, after #17313 and #17315 merge, since both rewrite
floorNotedandfloorReset.Fix
Today the lost-run reconciler finds a floor stop by matching annotation prose (
FLOOR_NOTE,FLOOR_TIME,RATE_REFUSAL,RATE_RESETinreconcile.mjs) against four writers. A writer it does not match is missed: the pinnedaggregate-resultscomposite's "rate limited past rate-limit-wait-seconds" on run 44419777099 is one.api-budget.bash:api_budget_emit_stopsreads the guard's ownstop,cause,guessedandfallbackfiles in$RUNNER_TEMP/api-budget, by the stop file's line rule. A stop is a server error hold only when every cause line of it is one, the ruleapi_budget_server_statusapplies.log-api-budget/action.yml: emits it first, ahead of the counting notices, so GitHub's cap of 10 annotations a step keeps it.pr-require-checks.yml: ci-status's log step and mark-lanes' exit trap emit it first too. The twoAPI_BUDGET_SHblocks are regenerated byscripts/sync-hold-floor.py.Not covered: jobs that write their own
api-callsnotice inline without the action (some intake, review-count and activity-scan jobs), and the pinnedci-workflowscomposites, which do not write the job's stop file.Verification
node --test .github/actions/log-api-budget/log-api-budget.test.mjs: 85 pass, 0 fail. Seven new tests: latest reset per pool in pool order; a past reset still named;server-<5xx>only when every cause is one;guessedfrom either file and only for the same reset; malformed and unterminated stop lines ignored; a stop the gh wrapper records for a refused 403 is the stop named; the action, ci-status's log step and mark-lanes' trap each write it first.scripts/check-affected.sh: 14 passed, 5 skipped.Related
scripts/check-affected.shasked for none.🤖 Generated with Claude Code