Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions .github/workflows/claude-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ jobs:
# review would always fail at auth — skip it instead of running broken.
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
timeout-minutes: 20
# Outer safety net ONLY. Must stay ABOVE the step-level timeout (20) so it
# never fires on a normal long review — a job timeout cancels the job and
# bypasses the step's continue-on-error, which would red-X the PR. It exists
# solely to bound a hang in another step (e.g. checkout); the step timeout
# below is the real review wall-clock / cost bound.
timeout-minutes: 25
permissions:
contents: read
pull-requests: write
Expand All @@ -26,7 +31,25 @@ jobs:
with:
fetch-depth: 1

# The review is advisory — it must never red-X a PR. Three guards, kept at
# the STEP level so this step's continue-on-error actually covers them:
# 1. --max-turns 80 (below) gives the reviewer enough budget to finish a
# large PR. The old 30-turn ceiling failed with subtype
# `error_max_turns` once a non-trivial diff needed a 31st turn
# (e.g. PR #1553, 28 files). 80 is comfortable headroom.
# 2. timeout-minutes: 20 on THIS step is the primary wall-clock / cost
# bound — a step timeout is a step failure that continue-on-error
# swallows, so even a maxed-out review stays green. (The job-level 25
# above is only an outer net for a hang in another step, and must stay
# ABOVE this 20 so it never fires on a normal long review.)
# 3. continue-on-error so that a max-turns exhaustion, the step timeout,
# or a transient API error all leave the posted inline comments + the
# track_progress sticky comment in place instead of failing the check.
# The sticky comment still shows any error ("Claude encountered an
# error after Ns"), so failures stay visible without blocking the PR.
- uses: anthropics/claude-code-action@eee73e2ae5399c561de4ff038aa7b36a7aa991a7 # v1 (2026-06-10)
continue-on-error: true
timeout-minutes: 20
with:
# claude_code_oauth_token and track_progress are valid v1 inputs for
# this pinned action SHA (confirmed in its run-log ALL_INPUTS dump),
Expand Down Expand Up @@ -59,5 +82,5 @@ jobs:
# from the restricted Bash allowlist and the ephemeral runner.
claude_args: |
--model claude-opus-4-7
--max-turns 30
--max-turns 80
--allowedTools "Read(./**),Glob(./**),Grep(./**),mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"
Loading