feat: require passing validation and current-head lens evidence for a clean review verdict - #81
Merged
Merged
Conversation
… clean review verdict ## Summary - Bump the shared review result contract to schema `1.1` (additive only): add a `lens_executions` array recording, per required lens, its head SHA, comparison-base SHA, verdict, and whether it was freshly executed. - `review-suite/scripts/validate.py`: reject any `clean` verdict paired with a packet whose focused or full validation entry is `failed` or `unavailable`; require an aggregate `clean` to carry exactly one fresh, current-head, clean `lens_executions` entry for each of solution simplicity, correctness, and code simplicity, with no missing, duplicate, or stale-head/base entry; reject a stale `schema_version: "1.0"` result with a clear migration error instead of silently reinterpreting it as v1.1. - `review-code-change`'s orchestration protocol and SKILL.md: any head-changing fix (solution redesign, correctness fix, or code-simplicity fix) now restarts the complete three-lens sequence, closing the re-review-matrix gap where a correctness-only or code-simplicity-only rerun could reach a new-head `clean` aggregate without a fresh solution-simplicity result for that head. - Migrate every canonical fixture, the review-code-change orchestration case corpus, and each bundled skill's standalone eval fixtures to schema 1.1; refresh the four bundled `review-suite` copies via `just sync-contracts`. - Add 13 direct regression tests in `review-suite/scripts/tests/test_contracts.py` covering the 11 required cases from #51: failed/unavailable focused and full validation paired with `clean`, missing/duplicate/stale lens executions, the two new-head full-restart scenarios, unchanged-head base drift, and stale v1.0 rejection. ## Why - #51: an aggregate `clean` result was reachable even when every required validation command had failed, and the orchestrator's old re-review matrix could reach a new-head `clean` aggregate without re-running all three required lenses on that head. Both are deterministic protocol/validator contradictions identified and settled by #59's decision record, which this child repairs without adding coverage ledgers, impact maps, or other scope reserved for later children. ## Verification - Replayed the frozen v1 baseline's 15 scored cases (`review-suite/evals/baseline/v1/`) against the v1.1 canonical validator: all 15 real corpus packets still validate with zero errors, and only one of 32 validation entries across all 15 packets is non-`passed` (`stale-claim-release-guard`'s `unavailable` concurrency-soak entry) — but that case's frozen report records `false_clean_attempts: 0` across all 5 scored attempts, so the new clean-requires-passing-validation rule never fires against any recorded verdict. The baseline protocol issues exactly one request per attempt (no multi-cycle fix/re-review), so the new lens-execution/full-restart requirement is structurally unreachable in this baseline. Verdicts and findings replay unchanged. Raw per-attempt artifacts are retained outside git (`in_git: false`) and are not present in this worktree, so this is a structural/packet-level verification rather than a literal raw-output byte-diff. - `just format`, `just lint`, and `just test` all pass (227 tests in `review-suite/scripts/tests`, up from 214). - The four bundled `review-suite` copies are byte-identical to the canonical source after `just sync-contracts`. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…rlap fixture ## Summary - `skills/review-code-change/evals/expectations.json`'s "deduplicate-overlap" case still described the pre-#51 partial-rerun pattern ("rerun code simplicity, and then run targeted correctness"). Update it to the corrected full three-lens restart, matching the orchestration protocol's decision table and the sibling full-restart cases. ## Why - Found by an initial `review-code-change` pass on this candidate: a repository-owned fixture that models correct orchestrator output still taught the exact partial-rerun sequence this ticket makes invalid. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
Repairs two settled semantic contradictions in the shared review contract and
review-code-changeorchestration (per #59's decision record, disposition"retain, unchanged"), and bumps the review result schema
1.0 -> 1.1,additive only:
validation status against verdict —
cleancan no longer pair with apacket whose required focused or full validation entry is
failedorunavailable.lens_executionsarray recording, per required lens, its head SHA,comparison-base SHA, verdict, and freshness. Aggregate
cleannow requiresexactly one fresh, current-head/current-base, clean execution for each of
solution simplicity, correctness, and code simplicity — no missing,
duplicate, or stale-head/base entry. The orchestration re-review matrix is
corrected so any head-changing fix (solution redesign, correctness fix, or
code-simplicity fix) restarts the complete three-lens sequence, closing the
gap where a correctness-only or code-simplicity-only rerun could reach a
new-head
cleanaggregate without a fresh solution-simplicity result.schema_version: "1.0"result is now rejected with a clearmigration error rather than silently reinterpreted as v1.1.
Why
An aggregate
cleanresult was previously reachable even when every requiredvalidation command had failed, and the old re-review matrix could reach a new
head
cleanwithout re-running all three required lenses on that head. Bothare deterministic protocol/validator contradictions identified and settled by
#59's decision record — this child implements exactly the repair it
specifies, nothing broader (no coverage ledgers, impact maps, risk profiles,
independent explorers, connector learning, or caller integration).
Scope
review-suite/CONTRACT.md,review-suite/contracts/review-result.schema.json,review-suite/scripts/validate.py, canonical fixtures, and 13 newregression tests in
review-suite/scripts/tests/test_contracts.py.review-code-change:SKILL.md,references/orchestration-protocol.md,its own orchestration case/expectation corpus.
review-suitecopies refreshed viajust sync-contracts(byte-identity independently verified).
CHANGELOG.md.Does not touch
implement-ticket,babysit-pr, or any of #58/#59'sfrozen artifacts (
review-suite/evals/baseline/v1/,review-suite/evals/v2/).Test plan
just format,just lint,just testall pass (227 tests inreview-suite/scripts/tests, up from 214; 9 inreview-code-change/scripts/tests).(as 13 direct test cases, covering failed/unavailable focused and full
validation, missing/duplicate/stale lens executions, both new-head
full-restart scenarios, unchanged-head base drift, and stale v1.0
rejection).
review-suitecopies are byte-identical to canonicalafter
just sync-contracts.(
review-suite/evals/baseline/v1/) against the v1.1 canonicalvalidator: all 15 real corpus packets validate with zero errors, and
the new clean-requires-passing-validation rule cannot fire against any
recorded verdict (the one non-
passedvalidation entry across all 15packets belongs to a case with
false_clean_attempts: 0). The baselineprotocol issues exactly one request per attempt, so the new
lens-execution/full-restart requirement is structurally unreachable in
this baseline. Verdicts and findings replay unchanged.
review-code-changecycle found one stale fixtureinconsistency (a leftover pre-Make clean verdicts require passing validation and current-head lens evidence #51 partial-rerun
next_actionstring);fixed, re-reviewed on the new head, clean.
Fixes #51
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com