Repository navigation
ci(review): claude-review proves a review is on the PR; skips drafts and fork heads (ADR-0033) - #160
Conversation
|
Reviewer: Codex (openai/codex-action, model gpt-5.6-terra) PR Review: ci(review): claude-review proves a review is on the PR; skips drafts and fork heads (ADR-0033) (#160)Decision: 🟡 Minor changes Executive summaryThe workflow pins its actions, retains least-privilege permissions, and correctly gates draft and fork heads before checkout. The proof step’s whole-PR counting semantics are coherently documented and match the Claude plugin’s once-per-PR behavior. However, the proposed ADR lifecycle conflicts with the repository’s ADR process. New findings🟡 Important (should be resolved)docs/adr/0033-proof-of-review-for-every-automated-reviewer.md:3 — ADR governance (confidence: 85)
|
On #160 the action skipped itself: it refuses to run a workflow file that differs from the one on main ("Skipping action due to workflow validation") and exits 0 without a transcript. The proof step failed correctly, but its message pointed at the transcript artifact, which does not exist in that case. It now checks for the transcript first and, when there is none, says that a PR editing this workflow cannot get a Claude review before merge and is red on purpose. ADR-0033 records the case as the fourth way a green check carried no review. Claude-Session: https://claude.ai/code/session_018UmL9wcgKBGFjdjGSSLafa Signed-off-by: Gonzalo Fleming <[email protected]>
|
Reviewer: Codex (openai/codex-action, model gpt-5.6-terra) PR Review: ci(review): claude-review proves a review is on the PR; skips drafts and fork heads (ADR-0033) (#160)Decision: 🟡 Minor changes Executive summaryThe workflow actions are full-SHA pinned, permissions remain narrowly scoped, and the author, fork-head, and draft gates protect the credential-bearing checkout path. The proof step is coherent with the reviewer’s once-per-PR behavior. The prior ADR governance issue remains unresolved. Previous issues
|
|
Re Codex review #1, ADR-0033 Status: Also for the record: this PR's own |
PR Review: ci(review): claude-review proves a review is on the PR; skips drafts and fork heads (ADR-0033) (#160)Decision: 🟡 Minor changes Executive summaryThe workflow change is sound and, unusually for CI, verified in production: run Previous issues
New findings🟡 Important (should be resolved)docs/adr/0033-proof-of-review-for-every-automated-reviewer.md:3 — process accuracy (confidence: 82)
Notes on the workflow change (no finding)
|
|
Re opencode review #1, the |
|
Reviewer: Codex (openai/codex-action, model gpt-5.6-terra) PR Review: ci(review): claude-review proves a review is on the PR; skips drafts and fork heads (ADR-0033) (#160)Decision: 🟢 Approved Executive summaryThe workflow retains full-SHA action pins and least-privilege permissions, while adding same-repository-head and non-draft gates before the credential-bearing checkout. Its proof step safely passes GitHub context through environment variables and fails a successful-but-silent Claude run as ADR-0033 specifies. Previous issues
No new findings meet the reporting threshold. |
…and fork heads (ADR-0033) The action exits 0 whether or not the agent posted a report. On 2026-09-22 the check was green with no review three times: on a draft (the plugin stops by design), on a PR it had already reviewed (it reviews once per PR), and on #158, where the agent ended its turn after 56 s saying it would wait for its subagents. Nothing in the workflow could tell the last one apart from the first two. A final step now counts the general comments, inline comments and reviews on the PR by claude[bot] (or anthropic-code-agent[bot]) and fails the job when there are none. The count is over the whole PR because the plugin posts once per PR: green means the PR has a Claude review, not that this push was reviewed, and the workflow says so. The job no longer runs on drafts, and skips PRs whose head lives in a fork, the gate codex.yml and opencode.yml already apply. ADR-0033 records the rule for all three reviewers: opencode's proof step is ADR-0032's, and Codex's post job posts the report itself. Claude-Session: https://claude.ai/code/session_018UmL9wcgKBGFjdjGSSLafa Signed-off-by: Gonzalo Fleming <[email protected]>
On #160 the action skipped itself: it refuses to run a workflow file that differs from the one on main ("Skipping action due to workflow validation") and exits 0 without a transcript. The proof step failed correctly, but its message pointed at the transcript artifact, which does not exist in that case. It now checks for the transcript first and, when there is none, says that a PR editing this workflow cannot get a Claude review before merge and is red on purpose. ADR-0033 records the case as the fourth way a green check carried no review. Claude-Session: https://claude.ai/code/session_018UmL9wcgKBGFjdjGSSLafa Signed-off-by: Gonzalo Fleming <[email protected]>
e7acb29 to
ef34abf
Compare
PR Review: ci(review): claude-review proves a review is on the PR; skips drafts and fork heads (ADR-0033) (#160)Decision: 🟡 Minor changes Executive summaryThe PR makes the Claude reviewer's green check prove a report exists, adds draft and same-repo-head gates before the credential-bearing checkout, and records ADR-0033. The workflow is SHA-pinned, interpolation-free ( Previous issues
New findings🟡 Important (should be resolved).github/workflows/claude-code-review.yml:100-104 — design soundness / proof-of-review (confidence: 85)
💡 Suggestions (nice to have)
|
|
Reviewer: Codex (openai/codex-action, model gpt-5.6-terra) PR Review: ci(review): claude-review proves a review is on the PR; skips drafts and fork heads (ADR-0033) (#160)Decision: 🟢 Approved Executive summaryThe workflow retains full-SHA action pins and least-privilege permissions, while adding draft and same-repository-head gates before the credential-bearing checkout. Its proof step uses GitHub context through environment variables and correctly makes a successful-but-silent Claude invocation fail, as ADR-0033 specifies. Previous issues
No new findings meet the reporting threshold. |
PR Review: ci(review): claude-review proves a review is on the PR; skips drafts and fork heads (ADR-0033) (#160)Decision: 🟡 Minor changes Executive summaryThe PR adds draft and same-repository-head gates before the credential-bearing checkout, and a final step that fails Previous issues
New findingsNo new finding reaches the Important threshold. The open issue #3 above is the one substantive gap; on this iteration I confirmed it independently, and it is stronger than when raised:
Note: the action does not expose 💡 Suggestions (nice to have, both pre-existing — not introduced by this diff)
|
|
Re opencode review #5, the identity-only count: correct, and fixed in the follow-up commit. The proof step now counts general comments and reviews by |
Summary
claude-reviewgoes green only when the PR actually has a Claude review: a final step counts comments and reviews byclaude[bot]on the PR and fails the job when there are none. The job also stops running on draft PRs and on PRs whose head lives in a fork. ADR-0033 records the rule for all three reviewers.Motivation
The action exits 0 whether or not the agent posted a report. Today the check was green with no review three times, for three reasons: a draft PR (#155 — the plugin stops by design), a PR it had already reviewed (#157, later pushes — it reviews once per PR), and #158, where the agent ended its turn after 56 s with "Both agents are running. I'll wait for them to complete" while its subagents were still running. The workflow could not tell the third from the first two. ADR-0032 closed the same gap for opencode; this applies the same rule to Claude and records that Codex's
postjob already satisfies it by construction.Because the plugin reviews a PR once, the count is over the whole PR, not since the run started: green means this PR has a Claude review, not this push was reviewed. ADR-0033 says so instead of pretending otherwise; Codex and opencode do re-review every push.
Type of change
Checklist
Developer Certificate of Origin
(
git commit -s).cargo fmt --allandcargo clippy --workspace --all-targets -- -D warningslocally. (N/A: no Rust;actionlintpasses.)docs/, orREADME.md) where appropriate.CHANGELOG.mdentry under## [Unreleased]if this change is user-visible. (N/A)cargo deny check. (N/A)Security considerations
The fork-head gate keeps a collaborator's fork PR from being checked out next to
CLAUDE_CODE_OAUTH_TOKEN, the same gatecodex.ymlandopencode.ymlapply. Every${{ }}in the newrun:enters throughenv:. Permissions unchanged.Notes for reviewers
claude-reviewis red by design: the action refuses to run a workflow file that differs frommain("Skipping action due to workflow validation", exit 0, no transcript), so no Claude review is possible on a PR that edits this file. The proof step now names that case in its error instead of letting the skip pass as green; ADR-0033 records it as the fourth way a green check carried no review. Codex and opencode review this PR as usual.Proposedon merge and flips in a follow-up, the repository's practice since the governance: flip Phase-1 ADRs 0016–0024 from Proposed to Accepted #86 sweep (ADR-0030/0031/0032 mergedProposedand were flipped in docs(adr): flip ADR-0030, ADR-0031 and ADR-0032 to Accepted #158).docs/adr/README.mdstep 5 onmainstill reads "On merge, the ADR is Accepted"; docs: correct the statements that no longer match the repository (errata on ADR-0016..0024) #159 (open) amends it to describe the flip. Merge order: docs: correct the statements that no longer match the repository (errata on ADR-0016..0024) #159 before this PR, so the process document matches the practice by the time this lands.Automated reviews
PRs authored by
dependabot[bot](and other bots) do not trigger opencode, Claude Code Review or codex.They are covered by CI (
commit-lint,build,cargo deny,openssh-interop;cargo auditruns weekly) and manual review when needed.https://claude.ai/code/session_018UmL9wcgKBGFjdjGSSLafa