Repository navigation
Validate review claims against saved assignment scope (T36) - #188
Merged
Merged
Conversation
erickb336
marked this pull request as ready for review
October 13, 2026 16:41
This was referenced Oct 13, 2026
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.
Closes #187
Sage task T36
Review reports now have a shared validator that checks their claims against the saved branch, commit, round and cycle. A clean review or QA pass cannot contain a medium or high finding. Invalid shapes, unanswered questions, mismatched targets and contradictory results refuse with fixed errors.
The helper returns decoded claims only. It does not write state, accept verdicts, count cycles, verify current Git or authorize merging. The chief/state-tool caller must still verify the current assignment and records. This is a prerequisite for #88 and #138; installed automatic Sage remains disabled.
Sources: packages/sage-core/review.mjs, exports and admission documentation. Both provider copies come from the build. No state.mjs or Claude-hook changes. Compared with the broader integration, the public helper also checks the structured report shape and bounds its total string data before JSON parsing.
Validation on ecee6f4:
Tests cover every review role, clean and failure kinds, low and blocking findings, exact target matching, malformed structures, fixed errors, caller mutation and unchanged admission state. Existing tests are unchanged. Every test uses fake ps, pgrep and kill first on PATH. No report input runs in a shell.
Not verified: native review dispatch, accepted verdicts, current Git/logbook state, real-model behavior, or installed automatic Sage. All local PR tests and their owned workers have finished.