8000 fix(rules): stratify a rule above a not/or rule it calls (#628, backport) by adityamukho · Pull Request #634 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

fix(rules): stratify a rule above a not/or rule it calls (#628, backport) - #634

Merged
adityamukho merged 1 commit into
mainfrom
fix/628-mixed-rule-stratum-v2
Oct 19, 2026
Merged

adityamukho merged 1 commit into
mainfrom
fix/628-mixed-rule-stratum-v2

Conversation

@adityamukho
Copy link
Copy Markdown
Collaborator

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 a not / not-join / or / or-join rule, except when the callee reaches the caller. Recursion through such a rule is unchanged and tracked in #633.

Tests

🤖 Generated with Claude Code

https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz

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
codecov Bot commented Oct 19, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@adityamukho
adityamukho merged commit 3565de3 into main Oct 19, 2026
22 checks passed
@adityamukho
adityamukho deleted the fix/628-mixed-rule-stratum-v2 branch October 19, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0