chore(ci): delegate AI review to the org-shared reusable workflow - #122
Conversation
Replaces four hand-rolled review jobs (claude/codex x packages/general) with a single call to Provable-Games/.github code-review.yml@v1. Review logic, prompt assembly, comment upserting and model config now live in one place, so a model deprecation is an org-variable change rather than an edit here. This repo supplies only .github/review-agents.json plus the existing .github/prompts/*.md. Net -577 lines. Also drops the local AI-availability gate: the shared workflow owns fork skipping, so the `changes` job no longer computes can_run_ai_reviews and the pr-ci aggregate is back to a plain did-any-job-fail check. The general agent enumerates top-level paths rather than using the documented ["."] catch-all: the shared workflow's matcher is prefix based, so ["."] only matches dotfiles and would silently skip review on README.md / Scarb.toml / codecov.yml-only PRs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 16 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Claude Code ReviewNow I have enough to assess. Let me analyze the key concern: the PR body's own table shows However there's a notable discrepancy: the PR body describes the workaround using enumeration and then "now uses the documented two-line catch-all again" — but the JSON here has both The main verifiable risk: Let me double check the critical behavior-change the PR itself admits: the missing-secrets guard removal, and whether The Let me assess the findings I can concretely back with evidence in the allowed files. Based on my review of the two scoped files: Analysis summary:
The one thing I cannot independently verify (WebFetch not permitted) is whether the upstream I have one actionable finding backed by evidence in the diff: [LOW] .github/workflows/pr-ci.yml:42-45 - The Impact: A PR that weakens/breaks a review prompt no longer bypasses gating; the modified prompt is used to review the same PR. Acceptable if intentional. Everything else in the scoped diff (removed dead outputs, |
GPT Code Review[MEDIUM] .github/workflows/pr-ci.yml:430 - [MEDIUM] .github/workflows/pr-ci.yml:447 - The aggregate now accepts a skipped |
Both depend on shared-workflow changes that have now landed at v1. review-agents.json: the general agent goes back to the documented diff_paths ["."] + exclude_paths ["packages/"]. The enumerated top-level list was a workaround for the prefix matcher treating "." as a dotfile prefix (fixed in Provable-Games/.github#1), and it silently missed any new root file — LICENSE and docs/** matched no agent at all. pr-ci.yml: block_on_severity: true restores the merge gate the inline review jobs had (Provable-Games/.github#2). Without it a [CRITICAL] finding would only post a comment. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both were flagged as reproducibility/least-privilege risks in review. Keeping them, deliberately: @v1 is the org convention every caller uses and is what makes an upstream model change a one-place fix, and the callee is first-party and declares exactly the two secrets it uses. Pinning a SHA or enumerating secrets here would diverge from the other six callers for no practical gain. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Brings the branch up to date with v1.1.11 and, more usefully, onto the org-shared AI review workflow adopted in #122 — this branch predates it and was still running the retired hand-rolled review jobs.
Summary
Ports this repo to the org-shared review workflow that
denshokan-sdkalready uses. Four hand-rolled review jobs (claude-review-packages,codex-review-packages,claude-review-general,codex-review-general) collapse into one call toProvable-Games/.github/.github/workflows/code-review.yml@v1.Review logic — matrix build, prompt assembly, the codex sandbox workaround, comment upserting, Claude transcript extraction — plus model and effort config now live in one place. A model deprecation becomes an org-variable change rather than an edit in every repo. This repo supplies only
.github/review-agents.jsonand the existing.github/prompts/*.md, which are unchanged.Net −577 lines in
pr-ci.yml.Changes
.github/review-agents.json(new) — two agents matching the old review scopes:packages(Cairo review overpackages/) andgeneral(everything else).changesjob — drops thepackages_review/general_review/review_automation_changedfilters and the whole "Determine AI review availability" step. The shared workflow owns fork skipping. The test-matrix computation is untouched.reviewjob — the shared-workflow call. Grantsissues: write,pull-requests: write,id-token: write, since a reusable workflow's job permissions can't exceed the caller's and the default token is read-only.pr-ciaggregate — now needsreviewinstead of the four review jobs, and is back to a plain did-any-job-fail check.Upstream fixes this PR depends on
Porting surfaced two gaps in the shared workflow, both now fixed and live at
v1:diff_paths: ["."]catch-all only matched dotfile paths, because entries are compared withstartswith(). A repo following the README got no review at all on aREADME.md-only PR, silently. This PR briefly enumerated every top-level path as a workaround; now that the matcher is fixed,generaluses the documented two-line catch-all again. That also picks up files the enumeration missed —LICENSEanddocs/**matched no agent under the workaround.[CRITICAL]blocks merge" for "a[CRITICAL]is a comment". It now takes an opt-inblock_on_severityinput, and this PR sets ittrue.Agent matching under the current
v1matcher:packages/embeddable_game_standard/…packagesREADME.md,Scarb.toml,codecov.yml,LICENSE,docs/**general.github/**,.tool-versions,scripts/**,src/**generalpackages/…+README.mdpackages,generalBehavior changes to be aware of
claude-review-packagesetc. becomeClaude - Cairo Packages,Claude - General Engineering,Codex - …. If any of the old names are required status checks in branch protection, they need updating —pr-cistill aggregates everything and is unaffected.block_on_severity: true, matching the inline jobs'grep -qE '\[(CRITICAL|HIGH)\]' && exit 1.changesjob failed the build whenCLAUDE_CODE_OAUTH_TOKEN/CODEX_AUTH_DOT_JSONwere unavailable on a first-party PR with reviewable changes. The shared workflow has no equivalent signal to key that off, so a secrets outage now degrades to reviews silently not running rather than a red build.reviewhas noneeds:— deliberately. A skipped dependency skips its dependents, andlintis conditional onpackages/changing, so gating review on it would drop reviews on docs-only PRs. This matchesdenshokan-sdk.Test plan
npx yaml@2.8.1 validonpr-ci.yml— the same validatorinfra-validaterunsjq -e .onreview-agents.jsonjs-yamland asserted job graph:reviewresolves to the shared workflow with the right permissions,pr-ci.needsincludesreviewchangesoutputsprompt_filepaths existcode-review.yml@v1(table above)The end-to-end proof is this PR's own checks: it touches
.github/**only, sogeneralshould run andpackagesshould not.🤖 Generated with Claude Code