{{ message }}
Repository navigation
Conversation
Ten review cases, five each for PostgreSQL and MySQL, live as YAML under backend/plugin/aireview/testdata/cases. Each holds a synced schema fixture, optional policy text, the statement, the findings the review must report, and what it must not flag. TestReviewCases runs them with the real Reviewer, catalog tools, and a live provider chosen by AIREVIEW_CASES_PROVIDER, logs a per-case and total score, and fails only on an error or a missed finding. It is skipped without a key. TestReviewCasesLoad checks the case files offline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
The AI review has no measure of its quality. A prompt change, a new provider, or a new model ships on a hunch. This PR adds a fixed set of review cases with expected findings, and a runner that scores a live model against them, so a change to the review can be compared by numbers before a rollout.
What
backend/plugin/aireview/testdata/cases/: ten cases, five for PostgreSQL and five for MySQL, the launch engines. Each case is one YAML file: the statement, the synced schema behind the read and search tools, the target facts, the policy text, and the expectation.postgres/index-large-tableandpostgres/index-small-table: the sameCREATE INDEX, 48M rows against 2,400. Only the large one must be flagged.postgres/drop-column-read-by-viewandmysql/drop-column-read-by-view: the dropped column feeds a view.postgres/delete-cascadesandmysql/delete-cascades: a delete cascades through two tables.postgres/policy-foreign-key-index: the project policy wants an index on every foreign key.mysql/modify-column-large-tableandmysql/add-column-instant: a column change that copies 61M rows, and one that is instant on the same table.mysql/policy-table-charset: the workspace policy wants utf8mb4, and the new table inherits latin1.model_ai_cases_test.go:TestReviewCasesruns every case through the realReviewer, the real catalog tools, and a live model, then logs one row per case and a total. It runs only whenAIREVIEW_CASES_PROVIDERandAIREVIEW_CASES_API_KEYare set, since it needs a vendor key.TestReviewCasesLoadchecks every case file without a model and runs in CI. The schema is decoded strictly, so a typo in a fixture fails the load instead of vanishing.pass,noisy(a forbidden finding was reported),miss, orerror, and onlymissanderrorfail the test.testdata/cases/README.md: the case format, the scoring, how to add a case, and how to run it per provider.Live results
All three providers found every required finding (8 of 8):
gemini-3.5-flash: 9 pass, 1 noisy (index-small-table, suggested CONCURRENTLY on 2,400 rows), 105k tokens.gpt-5.6-terra: 10 pass, 55k tokens.claude-sonnet-5: 9 pass, 1 noisy (index-small-table), 93k tokens.The noisy case moves between runs. An earlier run had Claude's false flag on
add-column-instantinstead.Not in this PR
Tests
go test -count=1 -race ./backend/plugin/aireview/: passes, andTestReviewCasesskips without the env.TestScoreFindings,TestScoreFindingsCountsAFindingForOneEntry, andTestRedactingModelRemovesTheKeyFromAnErrorBodycover the scorer and the key redaction.🤖 Generated with Claude Code