Skip to content

chore(ci): review every org-authored PR automatically - #9

Merged
jfrench9 merged 1 commit into
mainfrom
chore/claude-pr-review
Aug 15, 2026
Merged

jfrench9 merged 1 commit into
mainfrom
chore/claude-pr-review

Conversation

@jfrench9

Copy link
Copy Markdown
Member

Summary

Every pull request opened by an org member now gets an automatic Claude review. This is the compensating change-management control for SOC 2 CC8.1: a sole maintainer cannot approve their own pull request — GitHub forbids self-approval — so an automatic second reader stands in for independent review.

This is phase 2, completing the rollout across the organization. Phase 1 covered robosystems and the three client SDKs.

Changes

.github/workflows/claude.yml

  • Added a pull_request trigger on [opened, ready_for_review]. Deliberately not synchronize — every push to an open PR would re-run the review.
  • Added a pull_request arm to the job gate, guarded twice against outside contributors: head.repo.full_name == github.repository rejects fork PRs outright, and author_association restricts to OWNER/MEMBER/COLLABORATOR. Stays on pull_request rather than pull_request_target, so a fork PR carries no secrets regardless.
  • Added a concurrency group keyed on the PR number with cancel-in-progress, so a draft/ready toggle cannot stack runs.
  • Added a conditional prompt supplying the review brief on the automatic trigger, left empty for comment-driven events so Claude still follows the comment that tagged it. The brief instructs it to post findings as a comment and not to approve.

Breaking Changes

None. CI configuration only.

Testing

Workflow YAML validated by parsing with yaml.safe_load and asserting the trigger set, gate count, fork check, concurrency block, and prompt. Repo pre-commit hooks passed.

This PR is itself the first live exercise of the new trigger.

Adds a pull_request trigger to the Claude review workflow so every PR opened
by an org member is reviewed without anyone remembering to ask. This is the
compensating change-management control for SOC 2 CC8.1: a sole maintainer
cannot approve their own pull request, so an automatic second reader stands
in for independent review.

Outside contributors cannot invoke it or drain Claude usage. The head-repo
check rejects fork PRs outright and author_association rejects
CONTRIBUTOR/NONE. This stays on pull_request rather than pull_request_target,
so a fork PR carries no secrets regardless. A concurrency group cancels
superseded runs so a draft/ready toggle cannot stack reviews.

The review posts findings as a comment and does not approve. Org policy
already sets can_approve_pull_request_reviews=false, and an unconditional bot
approval on every PR would be a rubber stamp - worse audit evidence than the
documented exception it would replace.
@jfrench9
jfrench9 merged commit 6fde984 into main Aug 15, 2026
2 checks passed
@jfrench9
jfrench9 deleted the chore/claude-pr-review branch August 15, 2026 23:37
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