Skip to content

ci: restore Claude reviews with a supported Bedrock model - #297

Merged
zahin-mohammad merged 1 commit into
masterfrom
WAL-2202-fix-claude-reviews
Oct 26, 2026
Merged

zahin-mohammad merged 1 commit into
masterfrom
WAL-2202-fix-claude-reviews

Conversation

@zahin-mohammad

@zahin-mohammad zahin-mohammad commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What

  • Upgrade the pinned Claude action to v1.0.260 and select the active Sonnet 5.5 global Bedrock inference profile with ANTHROPIC_MODEL in both Claude paths.
  • Migrate bare @claude reviews to the supported prompt input and allow the GitHub CLI tools needed to read and post reviews.
  • Make the review commands target the triggering repository and pull request explicitly.
  • Keep custom mentions in interactive mode with comment and conversation context.
  • Disable extended thinking because Bedrock rejects replayed tool-call turns without a leading thinking block.
  • Replace the ignored timeout_minutes input with a ten-minute job timeout.
  • Leave AWS roles, region, permissions, and application code unchanged.

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

  • actionlint -shellcheck= .github/workflows/claude-code.yaml passed using the BitGoJS locked Nix tool source.
  • Targeted harness verified action v1.0.260, the global Sonnet 5.5 profile, MAX_THINKING_TOKENS=0, the ten-minute timeout, explicit GitHub CLI targeting, removal of obsolete inputs, and prompt selection for bare, whitespace-padded, and custom mentions.
  • Verified prompt-versus-interactive mode behavior and accepted inputs against the pinned action source.
  • Verified the pinned action carries Claude Agent SDK 0.3.309.
  • After merge, invoke a bare @claude review and a custom mention; confirm successful inference and posted feedback. Comment-triggered workflows use the default branch definition, so live end-to-end verification cannot run from this PR branch.

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

@linear-code

linear-code Bot commented Oct 23, 2026

Copy link
Copy Markdown

WAL-2202

@zahin-mohammad

zahin-mohammad commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor Author

AI-generated review — updated after validating the linked Sonnet 5.5 failure. Please use your own judgment before acting on any findings.


PR Review: #297 — restore Claude reviews with Sonnet 5.5

Changes: +17 / -9 in 1 file

Summary

This PR upgrades both review modes to claude-code-action v1.0.260, whose Claude Agent software development kit (SDK) dependency is 0.3.309, and selects the global Sonnet 5.5 Bedrock inference profile (.github/workflows/claude-code.yaml:84, .github/workflows/claude-code.yaml:87, .github/workflows/claude-code.yaml:107, .github/workflows/claude-code.yaml:110).

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]
Loading

Findings

  • ✅ Fixed: action v1.0.194 carried Claude Code 2.1.234, which the linked run showed cannot invoke Sonnet 5.5. The new pin carries SDK 0.3.309.
  • ✅ Fixed: the profile now uses AWS's global Sonnet 5.5 identifier instead of the US-only profile (.github/workflows/claude-code.yaml:87).
  • ✅ Fixed: review commands explicitly target the triggering repository and PR (.github/workflows/claude-code.yaml:101).
  • ✅ Aligned with WAL-2202: bare reviews and interactive mentions retain their intended modes.

Verification

actionlint: PASS
latest-action/profile harness: PASS
commitlint: 0 errors
Mermaid render: PASS (202490 bytes)

Remaining 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 wallet-platform:review-pr skill

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>
@zahin-mohammad
zahin-mohammad force-pushed the WAL-2202-fix-claude-reviews branch from 67a5d1c to 1ce3cd9 Compare October 23, 2026 23:46
@zahin-mohammad
zahin-mohammad marked this pull request as ready for review October 23, 2026 23:50
@zahin-mohammad
zahin-mohammad requested review from a team as code owners October 23, 2026 23:50

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@zahin-mohammad

Copy link
Copy Markdown
Contributor Author

@claude review always

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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. The Determine prompt to use step trims with echo "$COMMENT_BODY" | xargs. GNU xargs exits 1 with "unmatched single quote" on text like "why don't we retry?". The default bash -e shell then stops the step on that assignment. Fix: trim without xargs (for example TRIMMED_COMMENT=$(printf '%s' "$COMMENT_BODY" | tr -d '[:space:]') and compare to @ claude), so any comment text gets through. Bare and whitespace-padded @ claude must still pick the review prompt.

    Why this was flagged

    An OWNER or MEMBER posts an issue_comment or pull_request_review_comment such as "@ claude why don't we retry here?". The comment passes the job if: and reaches the Determine prompt to use step (.github/workflows/claude-code.yaml:56-62). There TRIMMED_COMMENT=$(echo "$COMMENT_BODY" | xargs) runs. GNU xargs treats quotes as special and exits 1 on an unmatched ' or ". A run: step's default shell is bash -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's use-code-review-prompt=false output. 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 default bash -e {0}, so it aborts and use-code-review-prompt is 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.

Comment thread .github/workflows/claude-code.yaml
@zahin-mohammad
zahin-mohammad merged commit c9efb69 into master Oct 26, 2026
25 checks passed
@zahin-mohammad
zahin-mohammad deleted the WAL-2202-fix-claude-reviews branch October 26, 2026 17:57
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.

4 participants