feat(code-review): review non-application files + three TestQuality shapes - #183
Open
mikeangstadt wants to merge 1 commit into
Open
feat(code-review): review non-application files + three TestQuality shapes#183mikeangstadt wants to merge 1 commit into
mikeangstadt wants to merge 1 commit into
Conversation
…hapes Extends the shared reviewer prompt to cover CI/pipeline definitions, guard and meta-test scripts, migrations, and docs/API specs, plus the wiring-unproven, assertion-of-existence, and input-invariant-fixture TestQuality shapes. Prompt-only: no dispatch, roster, or schema change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
wongk
requested changes
Aug 4, 2026
wongk
left a comment
Collaborator
There was a problem hiding this comment.
this adds explicit things to review to the shared reviewer prompt, rather than assigning these things to specific reviewers. this means every review agent is going to duplicate these reviews, and it will dilute the agent-specific review areas.
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.
Summary
Extends the shared reviewer prompt to cover the file classes the fleet currently does not review, plus three
TestQualityshapes that stay green while proving nothing.Prompt-only. All behavior lives in
tools/prompts/shared_prompt.txt, which every reviewer role loads. No dispatch, roster, category, or schema change; no new agent; no new stage.Why: the fleet's coverage is categorically absent outside application source
Measured against five days of one consuming repo — 2,617 original review comments (replies excluded) across 326 PRs, 2026-07-30 → 2026-08-04, attributed per reviewer agent:
.github/).tsx.tsThe fleet is strong where it is pointed and produces zero findings on four whole file classes. Those classes are 22% of the corpus and are carried almost entirely by other reviewer agents — so the capability gap is real, not a question of whether those files contain reviewable defects.
Note the limit of this measurement: it shows output, not cause. It does not by itself prove the reviewers would have found these defects if prompted — only that they are not reporting them today. If the zeros turn out to come from file-scope filtering in partitioning rather than from prompt silence, this PR is necessary but not sufficient, and the follow-up is in
derive-spawn-spec/partitioning rather than here.What changed
<non_application_files>— declares those files in scope and enumerates the generic defect classes per class, all repo-agnostic:Pinned-file pair detection — repos routinely hold meta-tests asserting another file's literal content (an action-version pin, a config snapshot, a required-context manifest, an allowlist). Reviewers now grep for a test referencing the changed path or a distinctive changed literal and report when that test exists but is not in the diff. Emitted as
Correctness, notCompanionChange, deliberately: it is a provable CI failure with a concrete assertion to cite, and it carries no rule-drivenreasoning_certificate— whichtemplates/companion_change.mdinterpolates and would render empty for an LLM-emitted finding.<test_quality>— three shapes, all generic:New
TestQualitysubcategories route to the existingtemplates/testquality_specialized.mdvia theTestQuality/*fallback row, so/code-review fixneeds no new template.Test plan
python3 -m pytest test_code_review_helpers.py test_code_review_schema.py— 1,286 passed, 0 failed.shared_prompt.txtcontent before editing it (the same rule this PR teaches): every test writes a synthetic prompt file totmp_path; the real file is only ever copied verbatim into the CR dir bycode_review_helpers.py:13719. No pinned-file pair broken..claude-plugin/plugin.jsonis bumped per release (.codex-plugin/plugin.jsontracks separately and was last touched by an unrelated commit), matching the v3.7.0 release commit's file set. Bumped 3.7.0 → 3.8.0 with a CHANGELOG entry.git diff --checkclean;plugin.jsonparses.Cost.
shared_prompt.txtgrows 317 → 409 lines (~17.5 KB → ~24 KB), about +1.6k input tokens per reviewer agent. It is identical across agents and stable across runs so it caches, but on a large fleet the uncached first-touch cost is real —/code-review costwill show the fleet-side delta.What could still break. Prompt additions can shift reviewer attention: a fleet told to review workflow YAML may spend budget there on PRs where the application diff mattered more, and the new heuristics could produce false positives on repos whose CI conventions differ (a deliberate
cancel-in-progress, an intentionally broad allowlist). The existing FLAG criteria and the verifier pass both still apply, and every new heuristic requires a concrete file:line, so these should surface as verifier-refuted rather than shipped — but the first few runs on a CI-heavy PR are worth watching.