From 9230994c6d5ab7e2e284f30d85a0aa26674367b0 Mon Sep 17 00:00:00 2001 From: Konstantin Vyatkin Date: Fri, 24 Jul 2026 22:25:59 +0200 Subject: [PATCH] ci: use Opus 5 for PR review and mount upstream ANTLR for comparison MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Switch the automated review model to `claude-opus-5[1m]` (Opus 5 was released today; Opus 4.8 is now legacy) while keeping the `[1m]` 1M-context suffix. Add an `actions/checkout` step that clones antlr/antlr4 at tag 4.13.2 — the version this runtime targets — into `antlr-upstream/`, and update the review prompt to point the reviewer there. Most PRs touch ported ATN / prediction / codegen logic, and a faithful review needs to compare against the reference implementation rather than upstream `master` (which carries post-4.13.2 changes a reviewer could mis-flag as divergence). --- .github/workflows/claude-code-review.yml | 27 +++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index bb653711..e06a27c1 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -40,6 +40,23 @@ jobs: with: fetch-depth: 0 + # This runtime is a port of ANTLR's reference implementation, so a faithful + # review of changes to the ported algorithms usually needs to compare + # against upstream behavior. Clone the reference tree into a side directory + # (kept out of the checkout above via a distinct `path`) the reviewer can + # read and grep. Pinned to the v4.13.2 tag the runtime targets everywhere + # else (see CLAUDE.md) — `master`/`dev` would surface post-4.13.2 changes a + # reviewer could wrongly flag as divergence. Shallow single-tag snapshot: + # the reviewer reads source, not git history. The directory name is + # deliberately non-hidden so ripgrep-backed search (Grep) descends into it. + - name: Checkout upstream ANTLR (reference for review comparisons) + uses: actions/checkout@v7 + with: + repository: antlr/antlr4 + ref: "4.13.2" + path: antlr-upstream + fetch-depth: 1 + - name: Install Dependencies run: | sudo apt-get update @@ -90,7 +107,7 @@ jobs: use_sticky_comment: true claude_args: | --effort max - --model "claude-opus-4-8[1m]" + --model "claude-opus-5[1m]" --no-chrome --dangerously-skip-permissions plugins: "code-review@claude-code-plugins" @@ -104,6 +121,14 @@ jobs: prompt: | /code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }} + UPSTREAM REFERENCE: This crate ports ANTLR (antlr/antlr4). A read-only + checkout of tag v4.13.2 — the version it targets — is at `antlr-upstream/` + (Java runtime: `runtime/Java/src/org/antlr/v4/runtime/`; generator: + `tool/`). For changes to ported logic (ATN/prediction, lexer/parser + simulation, serialized-ATN decoding, generated-code shape), compare + against it and cite the upstream file:line. Flag unintended divergence + from ANTLR semantics; treat documented deviations as intentional. + IMPORTANT (non-interactive CI run): You cannot pause and resume. Any sub-agents you spawn return their results synchronously within this same session — never end your turn saying you will "wait for" them. Once their