Repository navigation
ci: restore Claude reviews with a supported Bedrock model - #297
Conversation
PR Review: #297 — restore Claude reviews with Sonnet 5.5Changes: +17 / -9 in 1 file SummaryThis PR upgrades both review modes to flowchart TD
A[Owner or member comments @claude] --> B{Bare mention?}
B -->|Yes| C[Load prompts/code-review.md]
B -->|No| D[Preserve conversation context]
C --> E[claude-code-action v1.0.260]
D --> E
E --> F[Global Bedrock Sonnet 5.5]
F --> G[Post review to triggering pull request]
Findings
VerificationRemaining live check: comment-triggered workflows use the default-branch definition, so actual Bedrock inference must be verified after merge. The inference role must permit the global profile and its worldwide destination-model resources. Generated by the |
Upgrade the pinned Claude action to v1.0.260 and select the global Sonnet 5.5 profile. The action carries Claude Agent SDK 0.3.309, which supports the selected model. Disable extended thinking for tool-call replay compatibility. Keep custom mentions interactive. Restore the ten-minute timeout and target the triggering pull request explicitly. Ticket: WAL-2202 Session-Id: 146db0fb-b94c-4d9e-806e-4c150d26cfd3 Task-Id: e2770251-64bd-49f8-9e3f-2606f7e17c68 Requested-By: Zahin Mohammad <zahinmohammad@bitgo.com>
67a5d1c to
1ce3cd9
Compare
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
|
@claude review always |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.
Additional findings (outside the current diff — GitHub can't attach inline comments there):
-
🟣
.github/workflows/claude-code.yaml— Pre-existing: an @ claude comment with an apostrophe or unmatched quote fails the whole job, so the custom-mention path this PR restores never runs. TheDetermine prompt to usestep trims withecho "$COMMENT_BODY" | xargs. GNU xargs exits 1 with "unmatched single quote" on text like "why don't we retry?". The defaultbash -eshell then stops the step on that assignment. Fix: trim without xargs (for exampleTRIMMED_COMMENT=$(printf '%s' "$COMMENT_BODY" | tr -d '[:space:]')and compare to@ claude), so any comment text gets through. Bare and whitespace-padded@ claudemust still pick the review prompt.Why this was flagged
An OWNER or MEMBER posts an
issue_commentorpull_request_review_commentsuch as "@ claude why don't we retry here?". The comment passes the jobif:and reaches theDetermine prompt to usestep (.github/workflows/claude-code.yaml:56-62). ThereTRIMMED_COMMENT=$(echo "$COMMENT_BODY" | xargs)runs. GNU xargs treats quotes as special and exits 1 on an unmatched'or". Arun:step's default shell isbash -e {0}, so a failing command substitution in an assignment ends the step. The job fails and neither claude-code-action step at :84 or :106 runs, so the mention gets no reply. The same happens for any comment with an odd number of quotes. This is pre-existing: the base fails the same way at this line. This PR does not touch the step, but it says it restores custom mentions in interactive mode (:106-117), and those runs depend on this step'suse-code-review-prompt=falseoutput. That path stays broken for ordinary English comments. The test plan says custom mentions were checked, but that check could not have used a comment with an apostrophe.Verification: Line 65 of the Determine prompt to use step runs
TRIMMED_COMMENT=$(echo "$COMMENT_BODY" | xargs). If the text has an unmatched quote, GNU xargs exits 1. The step uses the defaultbash -e {0}, so it aborts anduse-code-review-promptis never set. Both action steps (lines 85 and 108) are skipped. This step is byte-for-byte unchanged by the diff, so the base branch fails the same way.
What
Why
Claude reviews fail because the previous model reached end of life. The old action inputs are ignored, and comment-triggered runs start from the default branch, so the workflow also needs supported inputs and explicit pull-request targeting.
The linked BitGoJS failure showed that action v1.0.194 carried Claude Code 2.1.234, while Sonnet 5.5 requires 2.1.280 or newer. Action v1.0.260 carries Claude Agent SDK 0.3.309 and a sufficiently new Claude Code runtime.
Test plan
Application builds and unit tests are not applicable to this workflow-only change. The inference role must allow the global Sonnet 5.5 profile and its destination models.
Ticket: WAL-2202