Repository navigation
fix(upstream-apply-changelog): skip the key after a credit-stop - #13064
Conversation
A credit stop of the model job wrote no done marker, so every 10-minute tick re-ran the model on the same release and credit-stopped again. The model job now uploads key-credit-stop-upstream-apply-changelog.yml-model after the leg's credit-stop handoff, as pr-verify does. The gate reads it with ci-workflows check-key-credit once a release is picked; inside the window the run starts no model, records no start, and prints a notice naming the marker run and when the window ends. Refs: #7407 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MWmASNtP63MZxdDeoxYztD
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-review needs no new review of Code review: PR #13064, skip the key after a credit stopScope: I read every hunk of all 3 changed files: Findings: none. What I checked:
Prior findings: the lane's earlier round, at head Closing issue: the PR body says Paved paths / path-scoped rules / manifests: no plugin manifest changed. The change reuses the existing check-key-credit approach from pr-verify and pr-review-main rather than adding a second way to do it. Spend (not a hold): this lowers prepaid API-key spend, because a key that is out of credit is tried once per window instead of every 10-minute tick. It adds at most 2 GITHUB_TOKEN REST calls per tick, which uses rate budget, not billing. |
|
claude-security-review needs no new review of Security review: PR #13064 (head be1b167)No security issues found. I read every hunk of all 3 changed files: What I checked
Spend: inside a credit window, runs no longer start the model on critical-findings: 0 |
The new "Report the credit skip" step read the marker artifact with a bare gh call, which the api-budget guard test rejects. Source api-budget.bash and wrap gh like the job's other steps. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The pr-verify verifier failed head What it wrote (28 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
|
PR body contract — issue linkage This PR body conforms to the issue-linkage contract. Nothing to do. |
Refs: #7407
Summary
Run 41760968895 (release 2.1.318) ended its model step with
class=credit-stop on ISSUE_LANE_CLAUDE_API_KEY. A credit stop writes no done marker, so every 10-minute tick re-ran the model on the same release and credit-stopped again. This reuses the key-credit mechanism pr-verify and pr-review-main already use, so the lane retries a dead key once per window instead of every tick.Fix
key-credit-stop-upstream-apply-changelog.yml-modelwhensteps.run.outputs.handoff-reason == 'credit-stop'and the gate'smarkeroutput names that artifact. It scans the marker with the trusted checkout'sscan-uploadand uploads it with 1-day retention. pr-verify uses the same three steps.Pick the releaseproceeds, the gate job runscheck-key-credit@09cf6f2(key-job: model,window-hours: vars.KEY_CREDIT_WINDOW_HOURS || '1'). When it returnsskip-key, the run skips the start record (so the per-day cap is not charged) and skips the model job. It also prints a::notice::naming the marker run and the UTC time the window ends, dated by one artifact read. The action's own notice ends "the subscription job reviews". That is wrong for this lane, which has no subscription leg; the lane's notice follows it.probe-minutes: "0"). The workflow's concurrency group runs one run at a time, so no second run can reach the key while the first run after the window tries it. That keeps the gate to one read.actions: read. The upload uses the runner token..github/artifact-retention.json. Thekey-credit-stop-*wildcard claims only computed names, so it does not cover this literal upload.workflow_dispatchinside the window is skipped too, the same as pr-verify. A topped-up key is tried once the window ends.No subscription or OAuth fallback leg, and no secret changes.
Verification
node --test .github/scripts/upstream-apply-changelog/upstream-apply-changelog.test.mjs: 45 pass, 0 fail. Four tests are new: the gate step is pinned and wired, a skipped key starts no model and records no start, the notice dates the window's end (run against a fakegh), and the marker is written on credit stop, scanned and kept 1 day.scripts/check-artifact-retention.sh: 86 upload steps match (61 families).scripts/check-affected.sh --base origin/main --no-fetch: 10 passed, 6 skipped, exit 0.Related
.github/workflows/pr-verify.ymland.github/workflows/pr-review-main.ymlcredit gatesRemaining
upstream-apply-changelog.ymlthat processes a new release and opens its PRs, recorded on the issue with the run URL, the release and the PRs opened. feat(lanes): Claude Code release intake lane #7407 stays open until that run is recorded on it.🤖 Generated with Claude Code