Repository navigation
ci(review): move pr-review-main to the credit-stop marker gate - #12838
Conversation
Repin check-key-credit to bc62beb9 (melodic-software/ci-workflows#973), which lists only artifacts named by its marker output instead of reading run history for a record step. review-handoffs now writes this run's id and uploads it under that name after a key leg's credit stop (retention 1 day); review-handoffs-credit exposes the marker output. The dead record steps are removed. A bare repin would never skip the key. The marker holds only the run id, so it is not scanned: review-handoffs keeps permissions: {} and no checkout. pr-verify.yml moves separately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 #12838 (pr-review-main moves to the credit-stop marker gate)I read every hunk of all 3 changed files: What I checked, with no finding:
Finding (SUGGESTION, inline on the repin at L176): the skip signal used to be a step name inside this workflow's own runs, which only the copy on main writes. It is now a repository artifact found by a fixed, public name. Any workflow run in the repository can upload an artifact with that name, including a Spend: this only moves review runs between the API-key leg (prepaid credit) and the subscription leg. Neither is a billed charge, so there is no cost hold. No embedded instructions in the PR context. The prior-findings file lists none (round 0 of 3, not past the cap). critical-findings: 0 Findings not posted inline (their lines are not in the diff):
Under the old gate, the skip signal was a step name inside this workflow's own runs. Only the Any workflow run in the repository can upload an artifact under that name. That includes a This file already guards against exactly this for the verdict artifact: L239-L250 check that the producing run's The impact is limited to routing: reviews still run on the subscription leg. Nothing leaks, no account is taken over and nothing is billed, so this is not CRITICAL. severity: SUGGESTION |
|
claude-review reviewed Code review: PR #12838, move pr-review-main to the credit-stop marker gateNo findings. This is a complete review: I read every hunk of all 3 changed files in the full diff ( What I checked
UnverifiedThe behaviour of ci-workflows SecurityI left security questions (for example, which artifacts the gate's repo-wide artifact listing would trust) to the separate security-review lane. No closing issue (the PR is a follow-up to ci-workflows#973). No plugin manifests changed. No prior findings to reconcile, and the round cap was not reached. |
No related issue: follow-up to melodic-software/ci-workflows#973
Summary
pr-review-main.ymlmoves to the check-key-credit gate merged in melodic-software/ci-workflows#973 (bc62beb95a989641f30552a932a132ebb8ecd801). That gate reads one artifact name,key-credit-stop-<workflow>-<key-job>, and no longer reads run history for aRecord the key's credit stop in run Nstep. Repinning alone would leave the gate with no marker to find, so it would never skip the key: it fails open, so nothing would turn red.Fix
review-handoffs-credit: repin check-key-credit tobc62beb9and expose the gate'smarkeroutput. The step that carriedorigin-runforward is removed.review-handoffs: the record step is replaced byWrite the key's credit-stop marker(this run's id) andUpload the key's credit-stop marker(upload-artifactcf430e03v7.0.2,retention-days: 1,if-no-files-found: error). The marker is written only when a key leg that ran handed on withcredit-stop, never for a lane the gate itself handed on..github/artifact-retention.json: newkey-credit-stop-*family withscan: none. This differs from ci-workflows'pr-review-cli.yml, which scans its marker. Here the marker holds only$GITHUB_RUN_ID, and scanning it would need a.basecheckout inreview-handoffs, which haspermissions: {}. This follows the existingscan: nonerows for workflow-written ids.${{ vars.KEY_CREDIT_WINDOW_HOURS || '1' }}. No permission changes:review-handoffs-creditkeepsactions: read,review-handoffskeepspermissions: {}, and upload-artifact uses the runtime token.workflow.test.mjsnow fails on any of these: the gate pinned to a SHA other thanbc62beb9, a missingmarkeroutput, missing write or upload steps, an upload whose name is notneeds.review-handoffs-credit.outputs.marker, retention other than 1, or any remainingRecord the key's credit stopstep.Verification
node --test .github/scripts/pr-review-main/workflow.test.mjs: 50/50 pass.bash scripts/check-artifact-retention.sh --check: 81 upload steps match 56 families.bash scripts/ci-review-lanes.test.sh: PASS=239 FAIL=0.actionlint(local 1.7.12): its only findings are thecache-modejob keys already on main, which this version does not know.bash scripts/check-affected.sh --base origin/main --no-fetch: 10 passed, 5 skipped over 3 changed files.Related
Operations
Marker name:
key-credit-stop-pr-review-main.yml-review-handoffs(gate.cjsmarkerName("pr-review-main.yml", "review-handoffs")).To clear a credit stop by hand, for example after topping up or rotating the key inside the window:
Hardening residuals
judgeMarkersatbc62beb9) accepts any unexpired marker artifact from a same-repository run, with no filter on workflow, event or branch. So any same-repository run can upload one and move the key leg to the subscription account for the window. That affects availability only: no verdict changes, nothing bills, and the leg fails closed. It was raised in poteto's independent security review of perf(pr-verify): read the key's credit history only for a head it judges #12799 and is deferred to the hardening phase under the owner's threat-model rule. The fix then is to require that the uploading run's workflow path is the caller workflow.🤖 Generated with Claude Code