Repository navigation
fix(not-join): :db/valid-at binds the query's valid time on the per-row path (#615) - #616
Merged
Merged
Conversation
…r-row path (#615) evaluate_not_join matched the body with PatternMatcher::from_slice, so a :db/valid-at pattern bound nil when the body held an expression, sat in an or branch, or ran on the rules query path. It now takes the valid-at value and uses from_slice_with_valid_at, as not_body_matches does. The StratifiedEvaluator passes Value::Null, matching how it matches rule bodies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz
This was referenced Oct 16, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz
This was referenced Oct 16, 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.
Summary
Part of #615. A
:db/valid-atpattern in anot-joinbody boundnilinstead of the query's valid time whenever the body ran on the per-row path (evaluate_not_join): a body with an expression or an outer-source pseudo-attribute, anynot-joinin anorbranch, andnot-joinin queries that invoke rules.evaluate_not_jointakes the valid-at value and builds its matcher withfrom_slice_with_valid_at, asnot_body_matchesalready does.apply_not_join_clause,apply_not_join_clause_derived(new parameter),evaluate_branch(the branch's valid-at).StratifiedEvaluator(rule definitions) passesValue::Null, the same value its rule-body andnotmatchers use, so behaviour inside rule definitions is unchanged.:db/valid-atinside rule definitions is broken more widely (positive patterns fail with INT-022); tracked in :db/valid-at in a rule definition binds nil (INT-022 in a positive pattern) #617.Tests
tests/not_join_test.rs: the issue's reproduction, the same inside anorbranch, and in a rule query (with and without an expression). All three failed before the fix.CHANGELOG: Fixed entry. A
mainbackport follows.Verification
cargo test— all greencargo clippy --all-features -- -D warnings,cargo fmt --check— cleancargo test --features test-oracle --test plan_independence_test— green🤖 Generated with Claude Code
https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz