Repository navigation
fix(reflection): reject incomplete or coerced Judge decisions - #35
Merged
Merged
Conversation
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.
The Judge parser accepted a verdict when any one decision field was boolean, then coerced all decisions with Boolean(...). As a result, consistentWithData:"false" could pass an answer and needsReplan:"false" could trigger a production replan. Require actual JSON booleans for all three decisions before accepting a verdict.
Partial or wrongly typed verdicts now take the existing degraded/pending path. Valid positive and negative verdicts, fenced/prose-wrapped JSON, optional reason/hint and extra properties keep their behavior. Independent numeric validation and refusal replanning remain effective. Update the eval documentation accordingly.
Validation: 26 expected regression failures reproduced before the fix; focused reflection/eval suites 56/56 passed; full npm test 533 tests (521 passed, 12 optional skips, 0 failures); npm run lint 0 errors / 7 existing warnings; npm run eval 8/8 fixtures with 2 L3 judgments pending. Independent review approved the exact commit; parent reran all 56 focused tests. No external model calls were used. PR CI includes real PostgreSQL, Chromium and both Docker builds.