Skip to content

Add the AI block review to node-simple-pnpm - #233

Open
vgpopov wants to merge 6 commits into
v4-betafrom
reviewrules-block-review
Open

vgpopov wants to merge 6 commits into
v4-betafrom
reviewrules-block-review

Conversation

@vgpopov

@vgpopov vgpopov commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

What

A block repo on node-simple-pnpm.yaml@v4-beta gets an AI review of its PR when the PR has the ai-review label.

  • node-simple-pnpm.yaml: a new job ai-review on pull_request that calls block-review.yaml.
  • .github/workflows/block-review.yaml (reusable):
    • reads the PR labels the PR has now (a re-run gets the labels of the first run);
    • checks that secrets.env holds ANTHROPIC_API_KEY, and fails with an error that says where to add it;
    • when the repo has no .reviewrules/config.json, writes the settings for the run: the block rule set from block-review-rules at v0.1.0 and the block ignore patterns. Nothing is committed.
  • actions/review/reviewrules: installs reviewrules, reviews the diff (Haiku for the rules, Opus at medium effort for the bug hypotheses), and posts each finding as a review comment on its line. A finding outside the diff lines goes to the review body. A hidden marker stops a re-run from posting the same finding again. The artifact reviewrules-attempt-<n> holds report.json and the model sessions.

Setup in a block repo

In .github/workflows/build.yaml:

  1. Use node-simple-pnpm.yaml@v4-beta.
  2. Add "ANTHROPIC_API_KEY": ${{ toJSON(secrets.ANTHROPIC_API_KEY) }} to secrets.env. The org secret exists.

Then add the ai-review label to a PR. build.yaml starts on opened, synchronize, and reopened, so the review runs on the next push, or when you re-run the "AI review" job.

Needed before use

Tested

  • The action on Test the AI review CI (do not merge) platforma-open/antibody-variant-designer#7 (a test PR with three planted rule violations): 7 line comments on the right lines; the re-run posted no rule finding again and uploaded the artifact with report.json and 33 session files.
  • post-review.js with a fake GitHub client: line placement, findings outside the diff, no repeat on a second run.
  • actionlint on both workflows.
  • Not run yet: the ai-review job inside node-simple-pnpm.yaml. It calls @v4-beta refs, which hold the review action only after this PR merges.

🤖 Generated with Claude Code

The action reviews the PR diff with reviewrules on the Anthropic API and posts each finding as a review comment on its line. The workflow runs it on block repos as a required workflow of an organization ruleset, when the PR has the ai-review label, so the block repos need no change.
@greptile-apps

greptile-apps Bot commented Nov 5, 2026

Copy link
Copy Markdown

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

The pin moves to the reviewrules commit that adds --session-dir (popoffvg/reviewrules#3).
A re-run on AVD PR 7 posted the same bug again because the model worded the question differently.
A block repo on v4-beta gets the review from the ai-review label alone, with no ruleset. The job checks that secrets.env holds ANTHROPIC_API_KEY, because a reusable workflow sees only the secrets its caller passes.
@vgpopov vgpopov changed the title Add a reviewrules action and a block review workflow Add the AI block review to node-simple-pnpm Nov 5, 2026
A repo with its own .reviewrules/ now gets the block rule set too. Its own rule_sets replace it.
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.

2 participants