Add cross-Skill structured review result contract tests (#71) - #530
Merged
Merged
Conversation
Validate paired local-code-review and github-pr-review sample outputs against the versioned review-result schema (fail closed on missing, malformed, unsupported or newer versions), assert shared-field parity and per-surface reviewed_state population, and compare each structured result with its human report without re-deriving the decision. Correct review-result-model.md section 7 and record the checks in section 8. Pin that the benchmark prompt leaves the structured result off and that an appended result block does not change parsed findings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#71) github-pr-review's policy only requires the structured result after the caller-facing report, so the splitter now accepts a Reviewer Brief after the JSON block and instead requires the block to follow the Decision. The newer-than-published version rejection is a producer rule (schema-versioning.md section 4), not section 3 consumer guidance; the model record and producer_errors now cite it correctly. Co-Authored-By: Claude Opus 5.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.
Fixes #71
What
Behavior / contracts: Adds test-only cross-Skill contract checks (
tests/reference/review/structured_output_contract.py) and paired sample outputs from both Skills (tests/unit/review/findings/structured_output_samples/). They check:reviewed_head_shaequals the known workspace or PR head;skillandreviewed_statemay differ;Corrects
review-result-model.md§7, which listed Add schema contract tests #71 as the owner of consumers, and adds §8 describing these checks. Adds a benchmark adapter regression test: the benchmark prompt leavesstructured_review_resultoff, and an appended result block does not change parsed findings or verdict labels.Governance / policy: None
Packaging / portability: None. The new files are test-only, and the new reference module is registered as test-only.
Changelog: generated at release from the two lines below — never edit
CHANGELOG.md(seedocs/RELEASE.md)Release category: none
Release entry:
Benchmark assessment (against landed #69/#70)
schema_version, required fields, fail-closedFailClosedTests. The benchmark never reads JSON.reviewed_stateSHAsSurfacePopulationTests, plus the head check in report ↔ result agreementidentity.stable_idformat and derivationstable_idactually computed, not inventedtest_fabricated_identity_is_invisible_to_output_checks). Only repeated live runs can show this.CrossSkillParityTests, including the decision labels in model §4 and both policiesReportAgreementTests. Applying it to live output is part of #529.affected_locationsStructuredReviewResultBoundaryTests.benchmark-result/v1, lanes, corpus, sentinellocal-code-review)Validation
Review
local-code-reviewof677f3cf: REVIEW CLEAN (P0: 0, P1: 0, P2: 2). Both P2 findings are fixed inb45b27e:github-pr-reviewoutput whose Reviewer Brief follows the JSON block. It now requires only that the block follows the report's Decision.schema-versioning.md§3 for rejecting a newer-than-published version. §3 is consumer guidance; the rejection is a producer rule from §4, and it now cites §4.🤖 Generated with Claude Code