From 04fbbb11fb5bb0796c032bf7980be5144faa31d3 Mon Sep 17 00:00:00 2001 From: bitgobot Date: Tue, 20 Oct 2026 19:55:50 +0000 Subject: [PATCH] ci: restore Claude reviews with a supported Bedrock model Select Sonnet 4.6 through claude_args and migrate review prompts to the pinned action's supported inputs. Keep custom mentions interactive, restore the ten-minute timeout, and document review operation. Claude reviews fail because the default model has reached end of life and the obsolete model input is ignored by the pinned action. Ticket: WAL-2202 Session-Id: 146db0fb-b94c-4d9e-806e-4c150d26cfd3 Task-Id: e2770251-64bd-49f8-9e3f-2606f7e17c68 Requested-By: Zahin Mohammad --- .github/README.md | 16 ++++++++++++++++ .github/workflows/claude-code.yaml | 20 +++++++++++++------- 2 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 .github/README.md diff --git a/.github/README.md b/.github/README.md new file mode 100644 index 00000000..60559397 --- /dev/null +++ b/.github/README.md @@ -0,0 +1,16 @@ +# Claude reviews + +Repository owners and members can request a pull request review by commenting +`@claude`. The workflow uses `prompts/code-review.md` and posts the review as a +pull request comment. Add instructions after `@claude` to use interactive mode +with the triggering comment and conversation context instead. + +Reviews use Claude Sonnet 4.6 through the US cross-region Bedrock inference +profile in `us-west-2`. Configure the model with the pinned action's +`claude_args: --model` input; `anthropic_model` is not supported. The workflow +has a ten-minute job timeout. The inference role must permit invocation of the +profile and its destination models. + +Comment-triggered workflows use the default branch's workflow definition. +End-to-end verification of workflow changes requires merging them before +requesting another review. diff --git a/.github/workflows/claude-code.yaml b/.github/workflows/claude-code.yaml index 2db30051..fd7071f7 100644 --- a/.github/workflows/claude-code.yaml +++ b/.github/workflows/claude-code.yaml @@ -24,6 +24,7 @@ jobs: github.event.comment.author_association == 'MEMBER' ) runs-on: ubuntu-latest + timeout-minutes: 10 env: AWS_REGION: us-west-2 AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} @@ -88,11 +89,18 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ steps.inference-role.outputs.aws-secret-access-key }} AWS_SESSION_TOKEN: ${{ steps.inference-role.outputs.aws-session-token }} with: - timeout_minutes: '10' github_token: ${{ secrets.GITHUB_TOKEN }} use_bedrock: 'true' - anthropic_model: 'arn:aws:bedrock:us-west-2:168000258654:inference-profile/us.anthropic.claude-sonnet-4-20250514-v1:0' - direct_prompt: ${{ steps.read-prompt.outputs.prompt-content }} + claude_args: >- + --model arn:aws:bedrock:us-west-2:168000258654:inference-profile/us.anthropic.claude-sonnet-4-6 + --allowedTools "Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr comment:*)" + prompt: | + REPO: ${{ github.repository }} + PR NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }} + + Read the pull request diff with gh pr diff and post your review with gh pr comment. + + ${{ steps.read-prompt.outputs.prompt-content }} - uses: anthropics/claude-code-action@69dec299f882fef0fff1652a1309b7e9771b9f98 if: steps.determine-prompt.outputs.use-code-review-prompt == 'false' @@ -101,10 +109,8 @@ jobs: AWS_ACCESS_KEY_ID: ${{ steps.inference-role.outputs.aws-access-key-id }} AWS_SECRET_ACCESS_KEY: ${{ steps.inference-role.outputs.aws-secret-access-key }} AWS_SESSION_TOKEN: ${{ steps.inference-role.outputs.aws-session-token }} - COMMENT_BODY: ${{ github.event.comment.body }} with: - timeout_minutes: '10' github_token: ${{ secrets.GITHUB_TOKEN }} use_bedrock: 'true' - anthropic_model: 'arn:aws:bedrock:us-west-2:168000258654:inference-profile/us.anthropic.claude-sonnet-4-20250514-v1:0' - direct_prompt: $COMMENT_BODY + claude_args: >- + --model arn:aws:bedrock:us-west-2:168000258654:inference-profile/us.anthropic.claude-sonnet-4-6