Skip to content

ci: add Bedrock AI pull request reviews - #557

Open
zhongkechen wants to merge 4 commits into
mainfrom
codex/bedrock-pr-review-workflow
Open

ci: add Bedrock AI pull request reviews#557
zhongkechen wants to merge 4 commits into
mainfrom
codex/bedrock-pr-review-workflow

Conversation

@zhongkechen

@zhongkechen zhongkechen commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Issue Link, if available

N/A

Description

  • Add Claude and Codex pull request reviews through Amazon Bedrock.
  • Check out only the trusted base SHA and build a complete, head-verified PR diff without executing proposed code.
  • Run both reviewers as dedicated unprivileged users with read-only workspace access.
  • Automatically review non-draft same-repository PRs and require ai-pr-review approval for drafts, Dependabot, and fork PRs.
  • Retry failed or invalid review output once within bounded time limits and validate both reviewers against a shared JSON schema.
  • Minimize superseded top-level summaries and Claude inline comments after posting a completed review.
  • Share a Java SDK-specific review policy covering replay, serialization, concurrency, lifecycle, and API compatibility.
  • Validate the review helpers and output schema in the existing Build workflow.

Repository setup after merge: restrict both environments to main, configure required reviewers on ai-pr-review, and set BEDROCK_ROLE_ARN on ai-pr-review-runtime.

Reference

Demo/Screenshots

N/A - GitHub Actions workflow change.

Checklist

  • I have filled out every section of the PR template
  • I have thoroughly tested this change

Testing

  • actionlint 1.7.7 .github/workflows/build.yml .github/workflows/ai-pr-review.yml
  • shellcheck 0.10.0 and bash -n for all four review helper scripts
  • JSON schema parsing with jq -e
  • YAML parsing for both modified workflows
  • Structural diff against the latest conformance main workflow after repository-path adaptation
  • Byte-for-byte comparison of post_ai_review_summary.sh with upstream
  • Summary helper argument and inline-marker validation paths
  • Live SHA-anchored context generation against PR test(conformance): add map 9-4 (empty items list) #556, confirming all reported changed files were collected

Unit Tests

Not applicable; no Java production code changed.

Integration Tests

The context-generation helper was exercised against a live pull request.

Examples

Not applicable.

@zhongkechen
zhongkechen requested a review from a team July 22, 2026 21:55
Comment thread .github/scripts/run_claude_isolated.sh
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.

2 participants