Repository navigation
feat(rules): semantic rules accept a check precondition before the judge - #160
Merged
Merged
Conversation
mindsocket
marked this pull request as ready for review
October 16, 2026 03:56
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
mindsocket
force-pushed
the
issue-156
branch
2 times, most recently
from
October 16, 2026 04:10
80ad92b to
b482d59
Compare
A semantic rule may carry a `check` (expression syntax). Order is when, check, judge. A failing check reports the rule's own severity without calling the judge; an unevaluable check reports an error. Neither gates descendants.
…scendants; mark check failures A semantic rule's check is a free expression test, so it runs on every validate without --semantic/--judge. A failing check reports a violation whose evidence reads 'expression check failed: <expression>' and gates descendants only with an explicit gatesDescendants: true.
…arker; fix stale schema-authoring note
…ssion rule failure
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 #156. Stacked on #159.
Summary
check. Order:when→check→ judge. A failingcheckreports a violation and the judge is not called.checkruns even without--semantic, since it costs no model call.checkreports at the rule's severity (ruleSeverity), with evidenceexpression check failed: <expression>.checkgates descendants like an expression rule failure: by default aterrorseverity, overridable withgatesDescendants.checkthat cannot be evaluated is reported as a rule error.Notes for review
checkuses the most severe non-ignoreentry; an all-ignoremap givesinfo. A planned change to the rule shape (expressionandsemanticreplacingmode/check/rubric) will remove this inference.