Skip to content

add Claude Code PR review pilot - #34

Merged
heskew merged 4 commits into
mainfrom
ai-review-pilot
Apr 17, 2026
Merged

add Claude Code PR review pilot#34
heskew merged 4 commits into
mainfrom
ai-review-pilot

Conversation

@heskew

@heskew heskew commented Apr 17, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds CLAUDE.md (first commit of this file) as project context for Claude Code sessions and CI-based review. Trimmed to stable content only — no branch-state, no user-home refs, corrects a few factual drifts (lint is ESLint not typecheck, runtime deps exist, npm run build is tsc || true).
  • Adds .github/workflows/claude-review.yml — baseline PR review via anthropics/claude-code-action. Sonnet 4.6, max_turns: 8, concurrency 1/PR with cancel-in-progress, SHA-pinned actions, gated to HarperFast org members via author_association. Review type is COMMENT-only during calibration (no merge-blocking, no auto-approval).

Part of a broader AI review pilot starting here (solo-maintained, small blast radius). Lessons from the next ~2 weeks feed into expanding to /harper, /harper-pro, and /nextjs.

Not in this PR

  • Cross-repo feedback capture via GitHub Issues in HarperFast/ai-review-log — pending PAT approval; follow-up PR will add claude_env: AI_REVIEW_LOG_TOKEN + issue-creation instructions in the prompt.
  • @claude deep-review triggered workflow (Opus) — deferred to Phase 4 after baseline calibration.

Prerequisites

  • ANTHROPIC_API_KEY secret added to repo
  • Merge — workflow activates on next PR

Test plan

  • Merge this PR
  • Open a small follow-up PR; verify the workflow fires, gates correctly on author_association, and posts a COMMENT-type review
  • Spot-check the review quality and log into calibration notes

CLAUDE.md: project context for Claude Code sessions and CI review,
covering architecture, session structure, conventions, and non-obvious
gotchas (Resource API v2, GenericTrackedObject spread, tsc || true
build semantics, ESLint-only lint).

claude-review.yml: baseline PR review via anthropics/claude-code-action.
Gated to HarperFast org members (author_association), Sonnet 4.6,
max_turns 8, concurrency 1/PR cancel-in-progress, SHA-pinned actions,
COMMENT-only review type during calibration.

Requires ANTHROPIC_API_KEY secret on the repo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@heskew
heskew requested a review from a team as a code owner April 17, 2026 17:39
heskew and others added 3 commits April 17, 2026 10:52
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Drop permissions.id-token (only needed for Bedrock/Vertex OIDC; we
  authenticate with ANTHROPIC_API_KEY)
- Remove "Proposed:" header comment from draft phase
- Tighten the 10-finding cap phrasing so it does not contradict the
  "no closing summary" rule — overflow is appended to the last finding

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two fixes for the first live CI run:

1. Restore id-token: write — previous review thought the OIDC token
   was only needed for Bedrock/Vertex, but the v1 action requires it
   for its own GitHub context detection even when authenticating via
   anthropic_api_key. Dropping it produced:
     Could not fetch an OIDC token. Did you remember to add
     id-token: write to your workflow permissions?

2. Move model and max_turns into claude_args. v1 migrated these
   (and others) from top-level inputs to Claude Code CLI pass-through
   flags. Prior config produced:
     Unexpected input(s) 'model', 'max_turns'
   per anthropics/claude-code-action/docs/migration-guide.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@heskew
heskew merged commit 58c4357 into main Apr 17, 2026
4 of 5 checks passed
@heskew
heskew deleted the ai-review-pilot branch April 17, 2026 18:46
heskew added a commit that referenced this pull request May 14, 2026
#34 fixes the post-#33 turn-exhaustion: passes PR-context env vars
(PULL_REQUEST_NUMBER, REPOSITORY, ISSUE_TITLE, ISSUE_BODY) so the
agent doesn't burn turns running `printenv` / `env | grep` / `git
remote -v` trying to figure out which PR it's reviewing. Also
widens tools.core to match upstream (`head`/`tail` added) so denial
retries stop eating the turn budget.

Claude has no functional change from #34; pin moves to stay
symmetric with the Gemini pin within this repo.

Continuing to use this PR as the comparison-test surface for one
more iteration. If clean, next bump disables `gemini_debug`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant