CC-518: Add immutable gate scope manifests - #455
Merged
Conversation
screenleon
marked this pull request as ready for review
July 29, 2026 06:47
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
gate_scope_manifest_v1before reviewer dispatch and bind it to the immutable gate subjectgate_assurance_v3for named consumersWhy
Reviewers previously reconstructed scope independently from diff lists and prompts. That made renamed or untracked paths, paired tests, sensitive signals, and bounded adjacent context difficult to prove consistently across reviewers or synthesis. Large expansion sets also exposed an infrastructure failure when hundreds of JSON entries were passed to jq as one shell argument.
This change gives every selected reviewer the same immutable, digest-bound scope declaration. Truncation is fail-closed unless explicitly accepted, and accepted omissions remain visible with exact counts and reasons. The expansion implementation preserves the complete JSON input without relying on a single oversized argv entry.
Impact
Gate consumers can verify what scope was declared without treating that declaration as proof of review completeness. Historical v3 artifacts remain readable for generic inspection, while named policy consumers require valid linked scope evidence.
Validation
tests/bin/run-all-tests.sh: 97 passed, 0 failed, 0 skippedtests/bin/run-tests.sh --verify-full .pm-dispatch/test-results/latest-full.json: authoritative full result verifiedtest-pr-gate: 198 passed, 0 failed, including tracked/untracked binary routing, complete manifest sharing, large expansion file input, and explicit truncation acceptance