Repository navigation
perf(ci): let Check Intent Fallback take check-intent's packed reads - #17028
Conversation
Check Intent Fallback repeated every pre-judge read Check Intent had already packed for the subscription job. It now takes the same bundle through CARRIED and CONTEXT_FILE, needs check-intent directly so the output resolves, and skips the trusted-text read when the bundle held. takeReads still refuses a bundle from another run attempt, the trigger gate still reads live, and the agree step still stops a moved head. 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. |
|
claude-security-review reviewed Security review: PR #17028 (incremental since 39a5bbc)No security issues found. Earlier heads have already been reviewed, so this review reports only blocking findings. What changed since the last review. The only change is in What I checked.
Spend. No new charge. critical-findings: 0 |
|
claude-review reviewed Incremental review of I read the whole incremental change. It is one file, The deletion is clean. At head, No test depended on the removed text. I searched the repository for its distinctive phrases ("reads included", "takes none from the subscription job"), and no test pins them. The only similar phrase is a different comment in My earlier advisory finding is partly fixed by this push. The job comment that said the fallback job "takes none" of check-intent's reads is gone. Two parts of that finding are still stale but were not touched by this push, and both are advisory, so this review does not repost them:
No closing issue. The PR refs #16642 but closes none, so there are no acceptance criteria to check. Spend: none from this push, which only removes a comment. The PR as a whole reduces GITHUB_TOKEN REST reads. Loosened-check verdict: fail (default; the prompt gave no Verifier dropped 0 of 0 candidates. |
The comment said Fallback repeats check-intent's reads and takes none from the earlier jobs; it now takes check-intent's packed reads. The block is removed whole per ADR 0110 rather than corrected. What it recorded, and where each fact is still enforced: - Fallback runs only on the subscription job's success with next-leg "fallback" (a limit stop, a credit stop, a 401 or 402 handed off cleanly, or an empty subscription token, each with the fallback token set). Its `if:` says this, and workflow.test.mjs pins it. - Its steps match check-intent's except for the credential, the carried reads and capture, the fallback reason, and the key-only, leg-check and next-leg steps. workflow.test.mjs holds the rest equal. - The outputs of earlier jobs reach it only through `if:` and env, and never appear in a `run:` script. workflow.test.mjs pins the `needs.` lines. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Refs: #16642
Summary
Check Intent Fallback in
pr-verify.ymlrepeated every pre-judge read Check Intent had already made. Check Intent already packs those reads for later jobs, and the subscription job takes them. This change makes Fallback take the same bundle instead of reading again.Measured cost before, from a local analysis of two GITHUB_TOKEN brake hours on 2026-11-17: Fallback made about 11.5 REST calls per run, and it ran about 14 times an hour, so about 160 calls an hour. Expected cost after is about 3.9 calls per run, which saves about 105 calls an hour. Fallback runs that often because the subscription leg hands off on limit and credit stops. Fixing those handoffs would remove these runs entirely.
Fix
check-intent-fallbacknow listscheck-intentinneeds([check-intent, check-intent-subscription]). Theneedscontext holds direct dependencies only, so without thisneeds.check-intent.outputs.readswould be empty. The job'sif:already starts with!cancelled()and spells out the subscription job's success, so gating does not change.CONTEXT_FILEandCARRIED: ${{ needs.check-intent.outputs.reads }}env lines.resolve-pr.mjsmaintakes the bundle only whentakeReadsaccepts it.steps.pr.outputs.carried == 'true', as the subscription job's does.Behavior that does not change:
takeReadsstill refuses a bundle from another run attempt, so re-running Fallback alone reads live.Comment not updated. The repository's comment lint (
code-tidying-remote-comment-lint, pre-commit) rejects every edited comment line. So the job comment abovecheck-intent-fallbackstill says "reads included (it takes none from the subscription job)", and the workflow header still says only the subscription job takes check-intent's reads. Both are now out of date and are left as the brief allows.resolve-pr.mjs's comment naming only the subscription job is also unchanged.Effect on a moved head. The trigger gate still reads live. It keeps only an open PR whose current head equals the upstream run's
head_sha(check-trusted-trigger.mjslines 711-718), so a PR that has moved past the run's head stops at the gate withno-pr, before the agree step. The agree step then checks that the gate and the carried bundle name the same PR and head. With a bundle, Fallback no longer runs the resolver's other live skips, such as a draft or a head already judged, as of Check Intent's read. The subscription job already works this way. Fallback is exposed for longer, since the subscription judgment can run for hours before it hands off.Verification
workflow.test.mjs: "the subscription and fallback resolvers take check-intent's bundle in its own attempt and refuse it in another". For each later job it parses the env block of the job's own Resolve step and substitutes check-intent's packed bundle for the expression. It then runsresolve-pr.mjsmain:carried=true, the bundle's head, and the context file written.carried=true.CARRIEDline removed, this test fails, along with "the fallback job runs only on..." and the pre-judge-reads test. The line was then put back.needs:list, itsneeds.expression lines, and its carry wiring in the pre-judge-reads test. The step-equality test between Fallback and the key job passes unchanged.node --teston.github/scripts/pr-verify/**/*.test.mjs,check-kill-switch.test.mjs,log-api-budget.test.mjsandresolve-config/callers.test.mjs: 892 tests, 892 pass.actionlint .github/workflows/pr-verify.yml: clean.Remaining
What is still open on #16642 after this PR:
ci-lanesstatus write stays open.Related
resolve-pr.mjspackReads/takeReads, and the "Hand the reads on" step inpr-verify.yml.🤖 Generated with Claude Code