Repository navigation
fix(ci): stop a credit-stopped release-lane run from spending the daily cap - #13242
Conversation
…ly cap The upstream-apply-changelog gate wrote its start record before the model ran, so a run whose key credit-stopped still counted toward the per-day cap of 3, and an out-of-credit key used the cap every day without a model turn. The model job now writes the start record after the leg, rewritten and scanned as the credit-stop marker is, and skips it only when the leg ended in a credit stop and that marker uploaded. A credit stop with no marker still counts, so the cap stays the brake. The concurrency group runs one run at a time, so the later write opens no race with the next gate. A credit-stopped run, and a run the credit window skips, write a job summary line. Refs: #13233 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The start record step runs after a failed model step, so a leg that times out still counts toward the per-day cap only while the step's timeout-minutes ends before the job's. The new test checks the leg timeout is below the step's and the step's at least 5 minutes below the job's. Refs: #13233 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis 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 #13242 (head f0155d9)No security issues found. I read every hunk of all 5 changed files. This lane already reviewed an earlier head ( What changed since the last review: two sets of conditions moved from
The code-review thread on pre-leg setup failures is resolved, and this head fixes it. Trusted-path files
Trust controls: none is widened.
Forged credit stop: a model steered to fake one cannot buy extra runs. Leaving out the start record needs Other files
Spend: credit-stopped runs no longer count toward PR context: no text in it tells the lane to pass the PR, skip a check, drop a finding or post elsewhere. critical-findings: 0 |
|
claude-review reviewed Code review: PR #13242, head
|
…ease cap The start record needed the leg to have run, so a persistent setup fault (route error, checkout failure) reran the model job every tick uncapped. It now counts every model job past the kill switch, and the trusted checkout its scan uses runs on the same condition. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…it-stop-cap # Conflicts: # .github/scripts/upstream-apply-changelog/upstream-apply-changelog.test.mjs
Closes #13233
Summary
upstream-apply-changelogcaps model runs at 3 a day by countingupstream-apply-changelog-startedrecords, which the gate wrote before the model ran. #13064 skips the model insideKEY_CREDIT_WINDOW_HOURSof a credit stop. But once the window ends, the lane probes the key again, and a probe that credit-stops (400, out of credit) had already left its start record. So an out-of-creditISSUE_LANE_CLAUDE_API_KEYused up the cap, and the lane never took a release (#13233's runs at 02:28-02:49Z, and the 13:21Z gate at its cap).Fix
.github/workflows/upstream-apply-changelog.yml:always()and skips only whensteps.run.outputs.handoff-reason == 'credit-stop'and the marker uploaded.concurrencyqueue: max, :55-58), so the next gate always sees the record. No new read is added.leg-timeout-minutes, :385), before the step's 75 (:338) and the job's 90 (:214). A model timeout fails the step, and the record step still runs and counts.::warning::and a job summary line naming the release and whether it counts;.github/artifact-retention.json:570-571(the started row now saysscan: upload),docs/conventions/pr-pipeline.yaml:1095-1097, and a changelog fragment.Verification
upstream-apply-changelog.test.mjs51/51, with these new tests:callers.test.mjs240/240;api-budget-coveragewithworkflow-gates60/60;check-artifact-retention.shclean.scripts/check-affected.sh --base origin/main --no-fetch: exit 0.report-lane-outcomerecord today, so a lane-outcome entry for the credit stop is not added. The summary and warning carry it.timeout-minuteson thisuses:step. The leg timeout inside run-claude-cli ends the leg first either way.Related
🤖 Generated with Claude Code