Repository navigation
perf(ci): read the capture key's credit before the resolver - #16416
Conversation
While PR_VERIFY_CLAUDE_API_KEY sits in a credit stop, every Capture run still ran the resolver, the trigger gate and the match step, then uploaded a blocked summary. The credit read needs nothing of the pull request, so it now runs right after the capture config. A held key (next-leg subscription) records the skipped leg and stops there: no resolver, gate or compare reads and no capture upload. find-capture then records the verdict's capture blocked by its miss. A failed read leaves next-leg empty and the job goes on as before. The probing marker stays past the agree step: the key call, whose present output it needs, runs only after agree and match. Run 43742536648 counted 12 job-token requests (11 REST, 1 GraphQL); with the key held off, only the credit read's 2 artifact-list calls remain. 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 (incremental, blocking only): no security issues foundThis review covers only what changed since
Checks:
Earlier finding: this lane's last post was a no-findings summary, so there is nothing to carry forward. Spend: this push adds none. The credit read that now runs earlier, reviewed last round, costs up to 2 REST artifact-list calls per run from the job token's rate budget and bills nothing. critical-findings: 0 |
|
claude-review reviewed Code review (incremental, blocking only): cf0c9cb since 3de0b91No findings. This lane already reviewed an earlier head, so this pass reports blocking findings only. I read every hunk of all 4 files in scope in What changed: this push changes no workflow logic. It edits two comments in What I checked:
Verification: I ran nothing. The test results quoted in the pull request description are the author's claims and unverified. Verifier dropped 0 of 0 candidates. |
Applies the review of #16416. The PR pipeline convention's Verifier verdict passage still had the match step running before the credit gate and a credit-gate skip uploading a blocked capture. It now says the job reads the credit history first and, while the key is held off, uploads nothing, so the verdict's capture reads blocked with the reason "left no capture artifact for this head", which is expected during a credit stop. The workflow header says the same. The skipped-leg comment says the record now also counts runs the resolver or match would stop. The early-exit test notes its reliance on select.cjs next() at 5b5110a. Co-Authored-By: Claude Opus 5.5 <[email protected]>
No related issue: GitHub-token spend cut A1 from the hub's 11-15 spend research
Summary
PR_VERIFY_CLAUDE_API_KEYhas been in a credit stop since about 2026-11-14 03Z. Every PR Verify Capture run still ran the resolver, the trigger gate and the match step, then uploaded a "blocked" summary that nothing needs. This change reads the key's credit history first and stops the job there while the key is held off.Fix
.github/workflows/pr-verify-capture.yml, "Read the key's credit history" now runs right after "Read the capture config" (if: steps.config.outputs.app != ''). It needs nothing from the pull request.steps.credit.outputs.next-leg != 'subscription'. With the key held off, the trigger gate, agree, match, key call, model resolve, blocked capture, scan and upload all skip, because they chain off the resolver.next-legempty, so the job goes on as before.next-leg == 'subscription'and sits between the read and the resolver. "Check the credential" no longer runs for a held key, so the old trigger could never fire.credential.present == 'true', and the key call sets that only after agree and match. The tests now check this with the expression evaluator.actions: read, and runs before any head code, so the split's boundary (header lines 3-11) is unchanged.Behavior changes to note:
pr-capture-*artifact. The judges' find-capture records the verdict's captureblocked("left no capture artifact for this head") in place of the R41 reason. During a credit stop that reason is expected and is not an upload fault. The workflow header and the PR pipeline convention's Verifier verdict section say so, and a.changes/pr-pipeline/patch fragment records it.blockedinstead ofnot-applicablewhile the key is held off, because the match step needs the resolver's SHAs.prompt.mdtreats both alike: neither is a reason to fail.Verification
Calls per Capture job, taken from the job's own "Log the API budget" output in run 43742536648 (key held off):
recordBudget, so its 2 artifact-list calls are among the 4 artifact calls.key-job.Tests:
The test-first run, before the workflow change:
ℹ fail 3(the capture gate order, the credit gate's position and condition, and the new credit-stopped walk).New case: "a key in a credit stop ends the capture at the credit read: no resolver, no GitHub read, no capture upload". It walks every step after the read with
next-legset tosubscription. Only "Report the skipped key leg", "Log the API budget" and "Pick the next leg" run. Withnext-legempty orkey, the resolver runs.scripts/check-affected.sh --no-fetch --uncommitted:12 passed, 6 skipped over 2 changed files.Related
🤖 Generated with Claude Code