Skip to content

feat(pr-pipeline): run the code review on pr-review-cli with key-first funding - #9348

Merged
kyle-sexton merged 2 commits into
mainfrom
feat/code-review-on-pr-review-cli
Oct 23, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
feat/code-review-on-pr-review-cli

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Refs: melodic-software/claude-code-account-rotation#259

Summary

Moves the live code review lane onto ci-workflows pr-review-cli.yml v0.63.1 (83b739f), lane code, funded by the reviews role: REVIEWS_CLAUDE_API_KEY first, REVIEWS_CLAUDE_CODE_OAUTH_TOKEN only after the key hands off (or when the repository variable REVIEWS_KEY_EXHAUSTED is true). This mirrors the security lane's switch in #9307. Both review lanes now run on pr-review-cli.yml.

Fix

  • .github/workflows/pr-review-hosted.yml: calls pr-review-cli.yml@83b739f with lane: code, publish: comments, the same model-args, allowed-bot-sender-ids and allowed-author-ids, and docs-only-paths: '' passed explicitly (pr-review.yml's default at 2fe38c0 was empty, so the code lane never skipped documentation; the three security globs are not copied). Job id stays pr-review, so the check stays pr-review / claude-review-status. Permissions are contents: read and pull-requests: write (no id-token); runner is dropped (the new reusable has no such input). cancel-in-progress: false, since a cancelled run reads as red to the guardrails merge guard. The bare CLAUDE_CODE_OAUTH_TOKEN is no longer passed.
  • review-venue.sh: a pr-review-cli.yml caller whose path does not contain security is now the code-review lane (before, no pr-review-cli.yml run counted for code-review, so it would have read local absent after this switch). The reference table says the same.
  • babysit_review_evidence.py, address-feedback.mjs and feedback-dispatch.mjs already accept any review lane's github-actions[bot] footer and an account=fallback record since feat(pr-pipeline): run the security review on pr-review-cli with key-first funding #9307, so they need no logic change. They gain code-lane tests (claude-lane: claude-review footer, account=fallback record for claude-review), and comments that named only pr-review.yml or called claude[bot] the code lane's reviewer are corrected.
  • .github/lane-funding.json: the pr-review lane is run-claude-cli reading both REVIEWS_* secrets.
  • docs/conventions/pr-pipeline/README.md, pr-run-activity.md, and changelog fragments for pr-pipeline and source-control.

Verification

Live proof on head b1a70599799668bc4621981158e438b00d65bc3f, run 39910029055 (REVIEWS_KEY_EXHAUSTED not set):

  • pr-review / claude-review-key: run-claude-cli: pr-review ended class=auth on REVIEWS_CLAUDE_API_KEY api_error_status=401, "handoff":true. The key itself did not review: the API refuses it.
  • pr-review / claude-review-subscription: Claude review completed: credential=REVIEWS_CLAUDE_CODE_OAUTH_TOKEN fallback=auth turns=14 max-turns=75 models=claude-sonnet-5-5.
  • pr-review / claude-review-status: notice titled claude-lane-review-complete, claude-lane-review-complete lane=claude-review sha=b1a70599799668bc4621981158e438b00d65bc3f findings=0 inline=0 scope=whole account=fallback; the summary marker <!-- claude-lane-reviewed-head lane=claude-review sha=b1a70599… --> was posted by github-actions[bot] (type Bot). Every job green.
  • babysit's evidence reader (babysit_merge._lane_evidence, as the gate calls it, with changed_paths=[] because this PR edits .github/ and the lane-source gate would unbind it): claude-review bound, 0 open findings; claude-security-review bound, 0 open, 0 blocking.

Local, one suite at a time under nice:

  • Node: callers.test.mjs 131 pass; address-feedback.test.mjs 89; pr-unblock/feedback-dispatch.test.mjs 77; resolve-config/feedback-dispatch.test.mjs 6; check-trusted-trigger.test.mjs 332; 0 fail.
  • Python: test_babysit_review_evidence 137 OK. review-venue.test.sh 57 pass.
  • The new review-venue test fails on the base script (code-review read local absent) and passes after. The new evidence-reader, address-feedback and feedback-dispatch code-lane tests pass on base too, since feat(pr-pipeline): run the security review on pr-review-cli with key-first funding #9307 made those readers lane-generic; each was shown to fail when its footer rule is narrowed to the security lane, then restored.
  • runner-policy.mjs --root ., actionlint, zizmor (offline), pinned ruff, markdownlint and both changelog fragment gates pass; CI lint-repo passed on this head. ci-status is red only for the do-not-merge label.

Related

🤖 Generated with Claude Code

…t funding

Move pr-review-hosted.yml off ci-workflows pr-review.yml (claude-code-action,
bare CLAUDE_CODE_OAUTH_TOKEN) onto pr-review-cli.yml v0.63.1, lane code,
publish comments, funded by the reviews role's API key and then its
subscription token. The job id stays pr-review, so the check stays
pr-review / claude-review-status. A newer push waits for a running review.

review-venue.sh now takes a pr-review-cli caller whose path does not name
security as the code-review lane. The evidence reader, address-feedback and
feedback-dispatch already read any lane's github-actions[bot] footer since
the security switch; they gain code-lane tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Oct 23, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T06:13:28.810760Z b1a7059 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review needs no new review of 611e6360cc2e90ea9ad7d3fdf1da44e8cc3947ef: no file of this pull request changed since the review of b1a7059.

Security review of PR #9348: no security findings.

critical-findings: 0

I read the full diff (14 files) and the PR context. The PR context contained no embedded instructions. The skip gate did not apply, because the diff changes a workflow caller and review-trust logic.

What I checked:

  • Workflow caller (pr-review-hosted.yml):
    • The reusable workflow is pinned to a full commit SHA (83b739f…, v0.63.1).
    • permissions: is narrower than before. id-token: write is dropped, and the job keeps only contents: read and pull-requests: write.
    • Secrets are passed by name (CLAUDE_API_KEY and CLAUDE_CODE_OAUTH_TOKEN, from the REVIEWS_* secrets). There is no secrets: inherit, and the bare CLAUDE_CODE_OAUTH_TOKEN is no longer forwarded.
    • The trigger set is unchanged, and allowed-bot-sender-ids and allowed-author-ids are carried over unchanged, so no trusted-actor widening.
    • cancel-in-progress: false and docs-only-paths: '' cause no security regression. The reusable still skips fork and Dependabot runs, and the lane reviews documentation changes as it did before.
  • Review-bot trust (feedback-dispatch.mjs, address-feedback.test.mjs, babysit_review_evidence.py and tests):
  • review-venue.sh:
    • The lane is now chosen with (.path // "" | test("security")) == $sec. It reads workflow-run metadata and decides only whether CI covers a lane or a local review is needed. It runs no input and has no injection surface.
    • $sec is passed through --argjson from a fixed array of false/true, so no caller-controlled data reaches jq code.
    • A caller whose path contains "security" but serves the code lane would be misread as the security lane. That affects venue health reporting only and gates nothing.
  • Plugin manifests: none changed, so there are no manifest <field> lines.
  • lane-funding.json: the change is metadata that lists the lane's secrets and launcher. It grants nothing.
  • Instruction-surface deletions: the removed workflow-header text is rationale comments. No guardrail was removed.
  • Trust-gate paths: the diff touches no trusted-actors, check-trusted-trigger, CODEOWNERS or .gitmodules file, so no hold applies.

The protected-class register was not consulted. Nothing in the diff removes a standing rule, so it was not needed.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

claude-review needs no new review of 611e6360cc2e90ea9ad7d3fdf1da44e8cc3947ef: no file of this pull request changed since the review of b1a7059.

No findings. I read the full diff (14 files) and the PR context. I did not run any tests or scripts, so everything below comes from reading the code.

  • pr-review-hosted.yml: The caller now matches the already-merged security caller (pr-review-security-hosted.yml) on the pinned pr-review-cli.yml@83b739f (v0.63.1). That covers publish: comments, the pull-requests: write permission with no id-token, cancel-in-progress: false, and the two REVIEWS_* secrets mapped by name. docs-only-paths: '' is set explicitly, so the code lane keeps reviewing documentation.
  • review-venue.sh: The jq now treats a pr-review-cli.yml caller as code-review when its path has no security, and as security-review when it does. I traced both lanes' selection logic. The existing test, where a code-lane caller of pr-review-cli.yml is listed beside the pr-review.yml run, still resolves to the same caller. The new test covers the case where the security caller is listed first.
  • Closing issue: The PR says Refs: an issue in another repository and closes none, so there were no acceptance criteria to check.
  • Manifests: No plugin.json or marketplace.json changed, so no manifest lines apply. Both changelog fragments use bump: minor, which fits the behavior change.
  • PR context text: I found no instructions embedded in the PR text.
  • Not reviewed: I did not read the changed .github/lane-funding.json against its schema or against the secret setup in repo settings. I also did not check that the pr-review / claude-review-status check name carries over, which depends on the reusable at the pinned SHA.
  • Cost note, not a finding: The code lane now spends the reviews role's API key first. There is no hold field in this output schema, so none is set.

@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Oct 23, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 0aca16f Oct 23, 2026
35 checks passed
@kyle-sexton
kyle-sexton deleted the feat/code-review-on-pr-review-cli branch October 23, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant