You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,27 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [0.10.0] - 2026-03-24
9
+
10
+
### Added
11
+
-`src/query/datalog/stratification.rs` — `DependencyGraph` and `stratify()`: analyse rule dependency graphs at registration time; programs with negative cycles are rejected with a clear error
12
+
-`WhereClause::Not(Vec<WhereClause>)` and `WhereClause::NotJoin { join_vars, clauses }` variants in `types.rs`; all exhaustive matches updated
13
+
-`(not clause…)` in `:where` and rule bodies — stratified negation where all body variables must be pre-bound by outer clauses
14
+
-`(not-join [?v…] clause…)` — existentially-quantified negation with explicit join-variable declaration; body variables not in `join_vars` are fresh/unbound
15
+
- Safety check at parse time: every `not` body variable must be bound by an outer clause; every `join_vars` variable in `not-join` must be bound by an outer clause
16
+
- Nesting constraint: `not-join` cannot appear inside `not` or another `not-join` — rejected at parse time
17
+
-`StratifiedEvaluator` in `evaluator.rs`: stratifies rules, runs positive rules first, then applies `not`/`not-join` filters per binding for mixed rules
18
+
-`evaluate_not_join` free function in `evaluator.rs`: builds partial binding from `join_vars`, converts `Pattern` and `RuleInvocation` body clauses to patterns, runs `PatternMatcher`; returns `true` if body is satisfiable (reject outer binding)
19
+
-`rule_invocation_to_pattern` extracted as `pub(super)` free function from `RecursiveEvaluator`
20
+
- Two not-post-filter sites in `executor.rs` now handle both `Not` and `NotJoin` via `evaluate_not_join`
Copy file name to clipboardExpand all lines: CLAUDE.md
+64-18Lines changed: 64 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
6
6
7
7
Minigraf is a tiny, portable **bi-temporal graph database with Datalog queries** written in Rust. It's designed to be the embedded graph memory layer for AI agents, mobile apps, and the browser — built on the SQLite philosophy: embedded, single-file, reliable, with time travel capabilities.
8
8
9
-
**Current Status: Phase 6.5 COMPLETE ✅ → Phase 7 Next** - On-disk B+tree indexes (file format v6) (note: Phase 6.3 query optimization was completed as part of Phase 6.1):
9
+
**Current Status: Phase 7.1 COMPLETE ✅ → Phase 7.2 Next** - Stratified negation (`not` / `not-join`) (note: Phase 6.3 query optimization was completed as part of Phase 6.1):
-[ ]**Edge case tests passing** — Oversized-fact error path exercised ✅; checkpoint-during-crash recovery not yet verified.
671
694
-[ ]**Error-path coverage** — Still ~82%; storage and WAL error paths to be prioritised in Phase 7.
672
695
-[x]**GitHub Discussions enabled** — ✅ Done in Phase 6.4b.
@@ -694,6 +717,29 @@ Before publishing the crate, verify all of the following:
694
717
-[ ]`cargo doc --no-deps` builds without warnings
695
718
-[ ] No `unwrap()`/`expect()` in library code paths (only in tests/binary)
696
719
720
+
### Testing Conventions
721
+
722
+
**Never use `{:?}` debug format of `Result`, `Fact`, `Value`, `EdnValue`, or any type that may transitively contain `Uuid` in `assert!`/`assert_eq!` message strings.**
723
+
724
+
CodeQL flags this as `rust/cleartext-logging` (alert `rust/cleartext-logging`). It is a false positive in tests, but it pollutes the security scan and blocks CI.
[](https://github.com/adityamukho/minigraf#license)
0 commit comments