Skip to content

Add Claude PR review workflow#4423

Merged
fleupold merged 4 commits into
mainfrom
reintroduce_claude_review
May 20, 2026
Merged

Add Claude PR review workflow#4423
fleupold merged 4 commits into
mainfrom
reintroduce_claude_review

Conversation

@fleupold
Copy link
Copy Markdown
Contributor

@fleupold fleupold commented May 18, 2026

Description

Re-introduces an automated Claude code review after #4381 dropped the previous version for cost reasons (~$10-15 per PR).

Key changes from the old workflow:

  • Drops the /code-review plugin's multi-agent fanout. A single agent with a plain "Review this PR" prompt is enough and avoids the parallel subagent context (which leads to spend similar to the integrated Claude review that's currently running)
  • Caps the agent loop with --max-turns 10.
  • Adds a concurrency group so back-to-back @claude comments cancel the previous in-flight run instead of paying twice.
  • Adds a skip-claude-review label escape hatch and skips bot-authored PRs (we may want to inverse this logic later and make it review only certain PRs).

Not using https://github.com/colbymchenry/codegraph for now, because:

  • the static syntax parsing is not super useful for Rust (no trait/macro/generic resolution)
  • the index would need rebuilding or caching on every CI run (complexity)
  • the model choice and turn cap seem far bigger cost levers here than exploration tokens

Only people that are part of our org can trigger the review.

How to test

Monitor API key spend

Re-introduces an automated Claude code review after #4381 dropped the
previous version for runaway cost (~$10-15 per PR). Key changes from
the old workflow:

- Drops the `/code-review` plugin's multi-agent fanout. A single agent
  with a plain "Review this PR" prompt is enough and avoids the
  parallel subagent context blow-up that drove most of the old spend.
- Caps the agent loop with `--max-turns 10` so a single review can't
  wander through the whole workspace.
- Adds a `concurrency` group so back-to-back `@claude` comments cancel
  the previous in-flight run instead of paying twice.
- Adds a `skip-claude-review` label escape hatch and skips bot-authored
  PRs.
- Triggers on `opened` in addition to `ready_for_review`, plus
  `@claude` comments on PRs (not issues).

Not using https://github.com/colbymchenry/codegraph for now: it
replaces grep/Read exploration with a pre-built tree-sitter symbol
graph, but (a) tree-sitter is weakest on Rust (no trait/macro/generic
resolution), (b) the index would need rebuilding or caching on every
CI run, and (c) the model choice and turn cap are far bigger cost
levers here than exploration tokens. Worth revisiting if we move off
Opus and exploration becomes the dominant share of spend.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@fleupold fleupold requested a review from a team as a code owner May 18, 2026 17:45
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

Comment thread .github/workflows/claude-review.yml
Copy link
Copy Markdown
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me. 👌

Comment thread .github/workflows/claude-review.yml
Comment thread .github/workflows/claude-review.yml
Comment thread .github/workflows/claude-review.yml
Comment thread .github/workflows/claude-review.yml Outdated
Comment thread .github/workflows/claude-review.yml Outdated
Comment thread .github/workflows/claude-review.yml
Comment thread .github/workflows/claude-review.yml
@fleupold fleupold enabled auto-merge May 20, 2026 09:21
@fleupold fleupold added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit ccd4700 May 20, 2026
20 checks passed
@fleupold fleupold deleted the reintroduce_claude_review branch May 20, 2026 09:38
@github-actions github-actions Bot locked and limited conversation to collaborators May 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants