8000 fix(not-join): :db/valid-at binds the query's valid time on the per-row path (#615) by adityamukho · Pull Request #616 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

fix(not-join): :db/valid-at binds the query's valid time on the per-row path (#615) - #616

Merged
adityamukho merged 2 commits into
v3from
fix/615-not-join-valid-at
Oct 16, 2026
Merged

adityamukho merged 2 commits into
v3from
fix/615-not-join-valid-at

Conversation

@adityamukho
@adityamukho adityamukho commented Oct 16, 2026 •
Copy link
Copy Markdown
Collaborator

Summary

Part of #615. A :db/valid-at pattern in a not-join body bound nil instead 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, any not-join in an or branch, and not-join in queries that invoke rules.

  • evaluate_not_join takes the valid-at value and builds its matcher with from_slice_with_valid_at, as not_body_matches already does.
  • Callers pass it: apply_not_join_clause, apply_not_join_clause_derived (new parameter), evaluate_branch (the branch's valid-at).
  • StratifiedEvaluator (rule definitions) passes Value::Null, the same value its rule-body and not matchers use, so behaviour inside rule definitions is unchanged. :db/valid-at inside 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 an or branch, and in a rule query (with and without an expression). All three failed before the fix.

CHANGELOG: Fixed entry. A main backport follows.

Verification

  • cargo test — all green
  • cargo clippy --all-features -- -D warnings, cargo fmt --check — clean
  • cargo test --features test-oracle --test plan_independence_test — green

🤖 Generated with Claude Code

https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz

…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
@codecov
codecov Bot commented Oct 16, 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 98208af into v3 Oct 16, 2026
24 checks passed
@adityamukho
adityamukho deleted the fix/615-not-join-valid-at branch October 16, 2026 10:19
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