ci: add reusable Claude PR review with per-repo .claude-review.md guidance#23
Open
leongdl wants to merge 1 commit into
Open
ci: add reusable Claude PR review with per-repo .claude-review.md guidance#23leongdl wants to merge 1 commit into
leongdl wants to merge 1 commit into
Conversation
…dance Port the two-stage Claude PR-review integration from aws-deadline/.github: - reusable_claude_pr_review_collect.yml (Stage 1): a no-op that runs on pull_request and exists only to fire the workflow_run event, so fork PRs never see secrets. - reusable_claude_pr_review.yml (Stage 2): resolves the PR from the trusted workflow_run payload, checks out the head read-only, mints a short-lived Bedrock bearer token via OIDC (dropping IAM creds before the agent runs), and posts inline review comments with fingerprint markers for cross-revision duplicate suppression. - claude-review-requirements.txt: version-pinned token generator, watched by a new pip ecosystem entry in dependabot.yml. New in this port: repos can commit a .claude-review.md at their root to tailor what the reviewer focuses on -- e.g. openjd-specifications can describe how to review RFC and specification-wording changes. The file is read from the BASE commit only, never the PR head, so a fork cannot prompt-inject the review of its own PR; it is capped at 16 KiB and is advisory guidance that cannot override the prompt's posting mechanics or security rules. Signed-off-by: David Leong <116610336+leongdl@users.noreply.github.com>
crowecawcaw
approved these changes
Jul 17, 2026
godobyte
approved these changes
Jul 17, 2026
mwiebe
pushed a commit
to OpenJobDescription/openjd-specifications
that referenced
this pull request
Jul 17, 2026
Opt in to the two-stage Claude PR-review integration hosted in OpenJobDescription/.github (see OpenJobDescription/.github#23): - claude_pr_review_collect.yml (Stage 1): pull_request-triggered no-op whose completion fires the workflow_run event. Fork PRs see no secrets and nothing this stage produces is trusted. - claude_pr_review.yml (Stage 2): workflow_run-triggered caller that forwards the trusted head repo/SHA and the Bedrock OIDC role secret to the reusable review workflow. Add .claude-review.md, the repo-specific guidance the reviewer reads from the base branch. It directs reviews of rfcs/ changes to follow the methodology in skills/openjd-rfc-review/SKILL.md: alignment with the four design tenets (portable, expressive, human readable/writable, tooling parseable), RFC template completeness, and compatibility with the 2023-09 Template Schemas specification. The skill file remains the source of truth; the guidance inlines the methodology because the reviewer must not read review instructions from the PR head, which is fork-controlled. Signed-off-by: David Leong <116610336+leongdl@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the two-stage Claude PR-review integration from aws-deadline/.github so OpenJobDescription repos can opt in, and adds a new mechanism for repo-specific review guidance.
Ported (three files)
reusable_claude_pr_review_collect.yml(Stage 1): a no-op that member repos call onpull_request. Its only purpose is to complete, firing theworkflow_runevent. Fork PRs never see secrets and nothing it produces is trusted.reusable_claude_pr_review.yml(Stage 2): runs from the base repo's default branch with its secrets. Resolves the PR from the trustedworkflow_runpayload (never Stage 1 output), checks out the PR head read-only, mints a short-lived Bedrock bearer token via OIDC and drops IAM credentials before the agent step, and posts inline review comments with hidden fingerprint markers so re-reviews of later revisions don't duplicate earlier findings.claude-review-requirements.txt: version-pinnedaws-bedrock-token-generator, watched by a newpipecosystem entry independabot.yml.New: per-repo review guidance via
.claude-review.mdA repo can commit a
.claude-review.mdat its root to tell the reviewer what to focus on — e.g.openjd-specificationscan describe how to review RFCs and specification-wording changes, while a code repo can call out its invariants.Security-relevant design decision: the file is read from the PR's base commit, never the PR head. The guidance feeds the reviewer's prompt, so it must be maintainer-controlled — a fork adding or editing
.claude-review.mdin its own PR must not be able to prompt-inject the review of that PR. Edits to the file take effect only after they land on the base branch. The content is capped at 16 KiB, and the prompt frames it as advisory review focus that cannot override the posting mechanics, duplicate-suppression protocol, or the treatment of PR contents as untrusted data.Testing
dependabot.yml.zizmor --config zizmor.yml --min-severity high .github/(matching this repo's Security Scan gate): no findings.Not included / follow-ups
bedrock_role_arnsecret and OIDC role need to be configured for this org before any repo enables it.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.