Skip to content
Merged
Show file tree
Hide file tree
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
16 changes: 14 additions & 2 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,21 @@
workflow_call:
inputs:
runs-on:
description: "Runner label(s) as a JSON array string (parsed with fromJSON). Defaults to the self-hosted pool. Public/open-source repos opt out by passing '[\"ubuntu-latest\"]'."
description: "Runner label(s) as a JSON array string (parsed with fromJSON). Defaults to a GitHub-hosted image; pass '[\"self-hosted\", \"linux\", \"x64\"]' to use a self-hosted pool instead."
type: string
default: '["self-hosted", "linux", "x64"]'
# GitHub-hosted by default. This job reads the PR diff and calls the
# Claude API -- it needs no private-network access, no local toolchain
# and no persistent state, so a self-hosted runner buys it nothing.
#
# It cost quite a lot, though: on a contended pool the review queued
# 40-77 minutes for 3-6 minutes of work, routinely finishing after the
# PR had already merged, and failed outright at runner assignment
# roughly one run in six. Both faults are queueing artefacts, not
# review problems.
#
# Pinned to a dated image rather than ubuntu-latest so a GitHub-side
# image bump is an intentional, reviewable change.
default: '["ubuntu-24.04"]'
timeout-minutes:
type: number
default: 30
Expand All @@ -24,7 +36,7 @@
type: boolean
default: false
plugin-marketplace:
description: "Optional plugin marketplace. Empty by default — the code-review plugin is broken on current Claude Code (spawns a non-existent claude-haiku agent), so we use a direct review prompt instead."

Check warning on line 39 in .github/workflows/claude-code-review.yml

View workflow job for this annotation

GitHub Actions / lint / yamllint

39:201 [line-length] line too long (212 > 200 characters)
type: string
default: ""
plugins:
Expand Down Expand Up @@ -91,10 +103,10 @@
# on Claude Code 2.1.x — it spawns a non-existent claude-haiku agent
# and posts nothing). Single line so it survives format(); a caller
# passing `prompt` overrides it.
prompt: ${{ inputs.prompt != '' && inputs.prompt || format('Review pull request {0}#{1} for bugs, security issues, performance problems, and missing test coverage. Follow the repo''s CLAUDE.md conventions if present. Post each specific problem as an inline comment with the mcp__github_inline_comment__create_inline_comment tool, and leave one short top-level summary via `gh pr comment`. Only flag real issues; if there are none, say so briefly.', github.repository, github.event.pull_request.number) }}

Check warning on line 106 in .github/workflows/claude-code-review.yml

View workflow job for this annotation

GitHub Actions / lint / yamllint

106:201 [line-length] line too long (514 > 200 characters)
# Without an explicit --allowedTools the inline-comment MCP tool is
# denied, so Claude runs but posts nothing ("No buffered inline
# comments" + permission_denials). Default to Anthropic's documented
# PR-review tool set (examples/pr-review-comprehensive.yml); a caller
# passing claude-args overrides it entirely.
claude_args: ${{ inputs.claude-args != '' && inputs.claude-args || '--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"' }}

Check warning on line 112 in .github/workflows/claude-code-review.yml

View workflow job for this annotation

GitHub Actions / lint / yamllint

112:201 [line-length] line too long (208 > 200 characters)
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@ project uses [SemVer](https://semver.org/) for the `vMAJOR.MINOR.PATCH` tags.

## [Unreleased]

### Changed

- **`claude-code-review.yml` now defaults to a GitHub-hosted runner**
(`["ubuntu-24.04"]`) instead of `["self-hosted", "linux", "x64"]`. The job
reads a PR diff and calls the Claude API — it needs no private-network
access, no local toolchain and no persistent state, so a self-hosted runner
bought it nothing while costing a great deal on a contended pool: measured
queue times of 40–77 minutes for 3–6 minutes of work, reviews routinely
landing after the PR had already merged, and outright failure at runner
assignment in roughly one run in six. Both faults are queueing artefacts
rather than review problems.

**This changes behaviour for every consumer that does not pass `runs-on`
explicitly** — currently all but one. Consumers that want the old behaviour
pass `runs-on: '["self-hosted", "linux", "x64"]'`, which is what
`sproncy/monitoring_stack` already does and is therefore unaffected.

Hosted minutes are metered on private repos; a review is 3–6 minutes, so
budget accordingly. The image is pinned to a dated label rather than
`ubuntu-latest` so a GitHub-side bump is an intentional, reviewable change.

## [3.3.0] - 2026-09-10

### Added
Expand Down