Repository navigation
fix(rules): stratify a rule above a not/or rule it calls (#628, backport) - #634
Merged
Merged
Conversation
Backport of #631. StratifiedEvaluator runs a stratum's positive-only rules to a fixpoint, then each rule with not / not-join / or / or-join once. stratify() gave a positive dependency the callee's stratum, so a rule calling a mixed rule ran before the callee's rows existed and returned too few rows, often none. A positive edge to a predicate with a mixed rule now needs dep_stratum + 1, unless the callee reaches the caller: recursion through a mixed rule stays in one stratum (#633) and is not rejected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Oct 19, 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.
Backport of #631 (v3) to v2.x for #628. #628 stays open until the v2.x patch ships.
The source diff is the same as #631's.
stratify()raises a caller above a callee that has anot/not-join/or/or-joinrule, except when the callee reaches the caller. Recursion through such a rule is unchanged and tracked in #633.Tests
tests/not_join_test.rs: the four A rule calling a rule with not / not-join returns too few rows #628 tests from fix(rules): stratify a rule above a not/or rule it calls (#628) #631. All four fail onmainwithout the fix.cargo test: 1291 passed, 0 failed, 9 ignored.cargo clippy --all-featuresis clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz