Planned work for Minigraf, a bi-temporal Datalog database. v2.x has known data-integrity issues (pinned list); v3.0.0 fixes them (v3.0.0 milestone).
Minigraf runs inside agent processes, mobile apps and browsers. The project prioritizes embedded deployment and reliable storage.
For the unreleased v3.0.0, main implements ordinary avg with the same numeric inputs as window avg (#777). Ordinary sum and sum-distinct skip nil and nonnumeric values, and ordinary min and max compare non-nil values in the same order as the window functions (#789). Existing empty-group results are unchanged. These changes were not backported to v2.x. See the changelog for details.
Completed releases and their implementation details live in the CHANGELOG. This roadmap lists planned work and research.
File format stays v7 and the public API does not change. Details are in the CHANGELOG.
Shipped:
BrowserDbIndexedDB flushes are atomic, settle on abort and, after a failure, refuse later durable work withSTG-046;STG-048names the failed write (#894)- Browser library linted on
wasm32-unknown-unknownin CI;BrowserDbtests run in Firefox, Chrome and Safari (#905, #906)
File format stays v7 and the public API does not change. Details are in the CHANGELOG.
Shipped:
- An expression's
=and!=equate a keyword with a ref to the entity it names, as patterns and joins do (#744) - A rule call with
0.0returns-0.0rows in every run; equal zero floats hash alike (#750) checkpointinside aWriteTransactionreturnsINT-001instead of deadlocking;prepareandPreparedQuery::executeenforce the same guard (#734)
File format stays v7 and the public API does not change. Details are in the CHANGELOG.
Shipped:
- WAL entries of more than 1,000,000 facts replay, so the transaction and every later one survive a crash or close without a checkpoint (#686)
- A float constant in a pattern matches equal floats only, not every float within
f64::EPSILON(#706) - Prepared queries use the database's
max_derived_factsandmax_results(#679) - Kani proofs of the value encoding, backported from v3.0.0 (#627)
File format stays v7 and the public API does not change. Details are in the CHANGELOG.
Shipped:
- A pseudo-attribute in a rule body reads the stored fact's valid time and tx metadata (#661)
- A fact of more than four elements is rejected with
PRS-108instead of being stored truncated (#649) BrowserDbrejections carry their error code (#673)- Every binding package is installed and used before it is published and again after; the check fixed packaging bugs in the Node, Android, Swift, C, Java and WASM 2.0.8 packages
File format stays v7 and the public API does not change. Details are in the CHANGELOG.
Shipped:
- A
:db/valid-atpattern in anot-joinbody (#615) or a rule definition (#617) binds the query's valid time - An
or/or-joinbranch whose expression reads an outer variable matches (#620) - An expression reading a variable only an
orbinds keeps its rows (#625) - An
or/or-joinbranch meets a keyword value as the entity it names (#637) - A rule calling a rule with
not,not-join,ororor-joingets all its rows (#628), and recursion through such a rule returns all its rows (#633)
File format stays v7 and the public API does not change. Details are in the CHANGELOG.
Shipped:
- A prepared query keeps a literal
:as-of,:valid-ator:any-valid-time(#603) - Rule queries with a literal argument return every row (#608)
- An
orthat shares no variable with the earlier clauses returns its cross product (#610)
File format stays v7 and the public API does not change. Details are in the CHANGELOG.
Shipped:
- A query on another thread sees each committed transaction whole (#554)
- All patterns of one query read the same state of the database (#555)
- A query during a checkpoint no longer misses committed facts or sees part of a transaction (#558)
File format stays v7. Two new error codes (STG-045, WAL-007); no other API changes. Details are in the CHANGELOG.
Shipped:
- A file shorter than one page is refused with
STG-045unless it is a torn first write (#506) - A commit made after a torn WAL entry is no longer lost on recovery; a failed append makes later writes
WAL-007until reopen or checkpoint (#513) - Backported from v3.0.0: rule queries count only derived facts against
max_results(#528),checkpoint()removes an all-checkpointed WAL (#457),usize::MAXcheckpoint threshold skips the close-time save (#476) - Weekly 10M-fact soak test (#392) and CI checks that fail when a file falls below its coverage threshold (#396)
File format stays v7 and the public API does not change. Details are in the CHANGELOG.
Shipped:
BrowserDbreturns an error instead of leaving an unreadable dirty page out of the IndexedDB flush (#470)- Golden-file compatibility corpus for format v7 (#391) and a SIGKILL crash test that checks the committed data (#384)
First v2.x patch under the support policy. File format stays v7 and the public API does not change. Details are in the CHANGELOG.
Shipped:
- Indexed queries return correct results with more than 65,535 uncheckpointed facts (#445)
- The transaction counter no longer rewinds when reopening next to an already-checkpointed WAL (#447)
Further v2.x releases carry all bug fixes, including data-integrity and security fixes, but no new features, until 12 months after v3.0.0 final ships (not a prerelease).
The v2.x line (then main, now v2.x) ends with a patch. File format stays v7 and the public API does not change. All new feature work has moved to v3.x. Work list: v3.0.0 milestone. Details are in the CHANGELOG.
Shipped:
- Bound-entity point queries narrowed to the queried attribute (#323 mitigation), exact attribute-scan bounds (#381), and checkpoints that copy untouched index leaves (#315 mitigation)
- fsync the parent directory after creating the
.graph/WAL file and after deleting the WAL (#389) or-joinreturns an empty result, not INT-031, when the clauses before it match no rows (#405)- A clear user error for
$slotqueries run throughexecute(), not internal INT-025 (#407) - Recursive rules with a literal start that recurse through another rule no longer fail under magic sets (#297)
- The INT-054 negative-cycle error names its predicates in a stable order (#410)
- CI reports benchmark regressions by suite instead of dropping new alerts when another regression issue is open (#393)
- CI: MSRV build, public-API semver check, dependency policy (#395)
- Stability and support policy, including how long v2.x gets data-integrity fixes after v3.0.0 (#397)
- Known-issues process: data-integrity issues stay open until the fix is in a published release (#399)
- Support tiers for language bindings and platforms (#400)
Known issue on all v2.x releases: same-transaction multi-valued facts read back as one value (#371, #287). The fix needs format v8 and ships in v3.0.0. Workaround: write or retract each value of a multi-valued attribute in its own transact/retract call. All v2.x known issues are listed in the pinned issue #421.
v2.x gets all bug fixes, including data-integrity and security fixes, but no new features, until 12 months after v3.0.0 final ships; prereleases do not start that clock (support policy).
The feature and correctness work below is complete for 3.0.0-alpha (developed on v3, which became main in the #937 branch move); it is not yet released. The open milestone items are release preparation: version bump (#929), branch move (#937), performance-envelope refresh or exception (#942), nightly routing (#940), release pipeline (#938, #939), and documentation (#931–#933).
- Bounded typed incoming references (#924): core Rust transaction APIs implemented, with separate link/record limits, exact scalar Ref matching and target-local access in every storage layer. The JVM bindings and docs-site deliverables are merged. The measurement report shows no median regression above 5% on any of 65 IDs in either round; see acceptance evidence.
- Incoming-reference binding parity (#925; done):
BrowserWriteTransaction.incomingRefsimplements exact JS budgets, typed complete/exhausted outcomes and callback reentry guards. The remaining native bindings, binding template, WASM package and docs-site PRs are merged. The WASI package remains a REPL without transaction handles.
v3.0.0 writes file format v8 and automatically migrates v7. The v8 keys include value bytes, fixing the same-transaction multi-value collapse in #287/#371. The v1–v6 → v7 auto-migration code has been removed; v1–v6 files are refused with STG-028 and left unchanged. Open those files with v2.x first to migrate them to v7. Read-only open reads v7 without migrating. All layout changes for this release are in v8.
This was the GitHub milestone named “2.0” before v2.0.0 used that version number for the kernel-locking and structured-error-code breaking changes; it was consequently renumbered to v3.0.0. Since the #937 branch move, done before the alpha was tagged, main is the 3.x line (formerly v3) and v2.x is the 2.x maintenance line (formerly main): pull requests for 3.x target main, and 2.x fixes land on main first and are backported to v2.x.
Completed — format and storage integrity:
-
v8 index keys with value bytes and v7→v8 migration (#371, #287; done on
v3) -
Kani proofs that the format-v8 scalar key decoders invert their encoders and reject bounded malformed inputs without panicking (#693; done on
v3, with no format change) -
v8 storage format, done on
v3in five PRs (#374, #434, #388, #433):- per-page CRC32, page id and generation on every page (#388);
- two alternating meta pages; crash-atomic, copy-on-write checkpoints whose cost follows the change (#374, #434);
- covering byte-comparable keys with a dictionary and deduplicated long values, at about 142 bytes per fact (#433).
The format is frozen for the golden-file corpus (#391).
-
Index
verifyand publicrebuild_indexes()(#373; done onv3) -
Net-assert on v8 keys before resolving facts, for O(live) point queries (#379; done on
v3) -
One current valid-time window per
(e, a, v): a later assertion replaces the earlier window, and two windows of one fact in onetransactareAPI-011(#435; done onv3) -
Empty or inverted valid-time windows rejected with
API-019on every write path (#436; done onv3) -
In a
WriteTransaction, the last statement that writes a fact decides it, so reads inside the transaction match the commit;LogWriterkeeps the same rules, withAPI-020for an assertion and retraction of one fact in one transaction (#477; done onv3) -
btree_pagefuzz target that reaches node decoding (#375; done onv3with #387: page targets rebuilt on real v8 files)
Completed — query API:
-
Ordinary aggregate value handling matches windows (#789; done on
v3): sum/sum-distinct skip nonnumbers; min/max accept all non-nil types and mixed numbers. Empty-query and all-nil min/max group-drop behavior is preserved. Ordinary avg (#777) and ordered-group expansion (#781) are also implemented. -
Selective in-memory ancestor joins avoid building a whole-attribute value map (#723; implemented for eligible three-pattern recursive bodies). Populated committed generations keep AVET probes; general in-memory value joins remain unchanged.
-
Optional
:distinctresult tuples, preserving bag output by default (#493; done onv3) -
lagandleadwindow functions for the previous/next row within an ordered partition (#182; v3.0.0) -
Bounded sliding row frames,
:rows N preceding, for window aggregates (#183; v3.0.0, implemented onv3; builds on #182). #836 audit evidence retains the 110 wider cases as manual/deferred; it does not expand nightly coverage. -
Cursor API:
Minigraf::queryandPreparedQuery::queryreturn an ownedCursorthat delivers rows in batches, with the answer fixed at open (#432; done onv3, including binding cursor objects in #462). Behind the cursor, the streaming engine (#473) runs every query and produces rows as they are pulled: patterns, expressions and pseudo-attributes (#544), joins and:db/valid-at(#545),notandor(#546), aggregates and windows (#547), rules (#548), and transaction reads (#550); the executor's query path is gone (#551; done onv3). Operators do not spill: memory follows operator state, with an opt-in per-query limit (QRY-012, #549). -
Projected UUID lookup batches walk dense DICT ranges (#530; implemented on
v3), keeping temporary memory bounded to a batch and query-cache charges in projection order. -
Native
:limit N,:order-byand:offset, with a top-kSortwhose memory followsN(#306; done onv3, with the 10M-fact acceptance tests moved from #473; specdocs/superpowers/specs/2026-10-24-limit-order-by-design.md). #641 is complete onv3: snapshot-bound order proofs and Sort omission for committed scalar ranges, one-group count/count-distinct and partition-at-a-time windows. #781 extends ordered grouping to sum/avg, fixed-scalar min/max, Integer/nil sum-distinct, and effective tuples reducible to one ordered Integer/Boolean slot plus scalar constants/repetitions, including hidden:withkeys. Every:withSort is retained. Unproved keys/arguments, callbacks,collect-set, rules and aggregate+window queries retain full-input evaluation. Compatible built-in windows with one proved nonconstant partition key hold one partition and bounded batches; unpartitioned/incompatible windows, aggregate queries, callbacks andcollect-setretain full-input evaluation. Seedocs/superpowers/specs/2026-10-28-641-input-order-design.mdanddocs/superpowers/specs/2026-10-29-781-ordered-aggregate-design.md. -
Fact-log iterator:
Minigraf::fact_log(&FactFilter)streams every fact version (assertions and retractions, withtx_count,tx_idand valid-time bounds) in transaction order or storage order, filtered by attribute, attribute prefix, entity and tx range, with memory bounded by a window rather than the database (#430; done onv3, including native binding objects). An open log pins its generation: checkpoints run but do not reuse its pages (#543;API-013deprecated). A raw log writer (#431) completes the extract-transform-load path. -
Read-only open:
OpenOptions::read_onlytakes a shared lock, so several readers can hold a file at once, writes nothing to the file or its WAL (a WAL is applied in memory, a v7 file is read without migrating), and refuses writes withAPI-014(#429; done onv3). Native bindings exposeopen_with_options(#465). -
Raw log writer:
LogWriterbuilds a new database fromFactRecords with theirtx_count,tx_id, valid-time windows and assertion flags kept, gaps allowed (a purged transaction stays a hole for:as-of), at<path>.partialrenamed into place byfinish(#431; done onv3, including native binding objects). Completes extract (#429, #430), transform, load.
Completed — features:
-
OPFS-backed persistent mode for
BrowserDb: a sync access handle in a dedicated Worker, no in-memory buffer; IndexedDB stays the main-thread backend. OPFS is Tier 2 in the 3.0.0 release, inside the Tier 1 browser binding (#441; done onv3; its benchmark is an explicit exclusion carried to v3.next by #844) -
Set values
#{...}, the set predicatesin?/not-in?/any-in?/all-in?/none-in?andcollect-set(#316; done onv3: core,BrowserDbset binds, and set values in Python, Java, Android, Swift, Node.js, C and the browser/WASI packages on theirv3branches) -
Prepared queries in every binding (#181; done on
v3: core,BrowserDb.prepare, and Python, Java, Android, Swift, Node.js and C on theirv3branches) -
UDF registration in every binding: the UniFFI ones, C, Node and the browser
BrowserDb(#180; done onv3in core and every binding: fallible UDFs,QRY-014, registry snapshot and re-entry) -
OpenOptionsexposed over UniFFI throughopen_with_options, so embedders ca 7CB8 n suppress the close-time checkpoint (#322; done onv3in every binding with #465)
Completed — testing and documentation:
- Deterministic storage schedules (#760; v3.0.0): suite and findings cover batch visibility, snapshot cutoffs and checkpoint publication. Focused native/MSRV PR checks and larger nightly/manual searches retain replay artifacts; the workflow-only main companion enables the v3 nightly schedule. Whole-database simulation remains out of scope.
- Golden-file compatibility corpus for every format version (#391; done on
v3: six v7 files from 2.0.3 checked after migration, seven v8 files frozen at23aa57c) - SIGKILL crash test that checks committed data through EAVT, AEVT and full scan (#384; done on
v3:tests/crash_kill_test.rs, 100 rounds per OS nightly) - Model-based test of transact/retract/checkpoint/reopen (#385; done on
v3:tests/model_based_test.rs, 30,000 cases nightly) - Wider property tests: file-backed, batched, retracts, temporal, joins (#386; done on
v3:tests/property_test.rs) - Persistent fuzz corpus and an operation-sequence target (#387; done on
v3: corpus caching, weeklycmin, the v8 page targets, and theops_sequenceandcorrupt_filetargets) - Fault injection across save/WAL/recovery (#390; done on
v3:src/fault_matrix.rs) - Long-running soak test at scale (#392; done on
v3:tests/soak_test.rs, 10M facts and a 5-hour churn weekly, alternating the 2.x and 3.x lines) - Benchmarks at 100K–10M facts and a published performance envelope (#394; on
v3:examples/perf_envelope.rs, results indocs/BENCHMARKS.md; follow-ups #528–#532, with #532 superseded by #551's removal of repeated committed-fact net-assert; audit and measurements) - Acceptance evidence for memory/scaling (#837): named-test and Linux RSS gates, nonlinear/multistratum recursion and custom chunk bounds; validation status
- Regression-history/reporting evidence (#840) is complete: all 453 numeric comparisons, preserved independent v3 history, scheduled routes and live notification/cleanup evidence. Separate main/v3 fixes #853/#854 are merged; raw evidence is retained beyond artifact expiry.
- Nightly runtime expansion (#858): 14 Java/JVM and 3 WASI IDs run nightly (contract). The Swift/iOS simulator and Android emulator were qualified against physical Device Farm runs and rejected for every case (report), so no mobile lane exists; a physical-device lane is costed there but not scheduled. The platform restriction from #839 applies only to that accepted manual evidence task.
- Manual migration evidence (#838): native v7-to-v8 through 200k facts; Chromium/Firefox/WebKit through 20k facts, with separate read-only/reopen controls and bounded post-migration cursor churn. Results, frozen fixtures and exclusions; no new nightly route or sustained-pin bound.
- Semantic permutations (#842): correctness-target map and control limits for X07. The exclusion stands; no nightly route or acceptance gate is added.
- Failure paths (#843): correctness-target map for X08. The benchmark exclusion stands; #865 closed the heavy WAL replay gap with the passing
one_million_fact_wal_entry_replays_on_openacceptance test. - Release-cut feature re-audit (#844): every production change since the measured revision, with its benchmark disposition, at v3 head
33b4b165c. The alpha performance envelope was refreshed atbcd74572bon 2026-11-30 (#942; snapshot). OPFS (#441) is excluded and carried to v3.next with the profiler (#185) and rule persistence (#241); no nightly route or gate changes. - Manual shape evidence (#841): native shape sweeps, recursive controls and sustained-reader experiments, with explicit input, timeout and attribution limits. The small-nightly recommendation is separate from execution; this audit adds no nightly route or release-acceptance gate.
- Expression keyword/ref equality (#774; on
v3): resolve literal keywords once per operator, with memory bounded by the expression. Measurements and regression coverage; performance-only, with no v2.x backport. - Higher storage/WAL coverage gates and branch-coverage gates (#396; on
v3: line and branch floors per file incoverage-thresholds.toml, checked on every PR) - Durability, recovery and operations guide (#398; done on
v3:docs/DURABILITY.md, also on the docs site; found #535)
Additive features, kept out of v3.0.0 so the #371 fix is not held up by them:
- Query profiler (#185)
- Rule persistence — design first (#241)
- Temporal graph-traversal research (#273; may result in documentation or a blog post rather than code)
Build tools and examples outside the database engine to help developers use Minigraf.
- 🎯 Database inspector/debugger (separate repository: minigraf-inspector)
- 🎯 Query profiler (#185, v3.next)
- 🎯 Time-travel visualizer (separate repository: minigraf-visualizer)
Tracked in: minigraf-examples.
- 🎯 GraphRAG example that combines Minigraf with a vector store
- 🎯 LangChain / LangChain.js integration example
- 🎯 LlamaIndex integration example
- 🎯 End-to-end examples with notes for agent memory, offline-first mobile apps, and audit logs
- 🎯 Graph algorithms as a separate crate
- 🎯 Optional schema validation
- 🎯 Import/export tools
- 🎯 Backup utilities
Allow a Minigraf database to be forked into an independent .graph file pre-populated with facts from the parent at a given transaction count.
Potential uses include speculative writes, snapshot distribution, test isolation, and agent sandboxing. The design must preserve the single-file, zero-configuration model; a fork should behave as an independent file copy with a fully flushed WAL.
Status: Exploratory. Pursue only with demonstrated user demand.
Magic-sets rewriting is not applied to mixed rules containing not/not-join; those use full semi-naive evaluation. Extending it to negation is well studied but requires care to avoid unsound propagation across stratification boundaries.
Pursue only if profiling demonstrates a real bottleneck in negation-heavy recursive workloads.
Future performance work will be driven by production profiles and reproducible benchmarks. The benchmark documentation records measurements; completed performance work is recorded in the CHANGELOG.
When evaluating features, ask:
- Does it align with the philosophy? (embedded, reliable, simple, bi-temporal)
- Is it needed for target use cases? (audit, event sourcing, knowledge graphs)
- Does it compromise reliability? (stability over features)
- Can it be a separate crate? (keep the core small)
Say no to:
- Distributed consensus
- Multi-datacenter replication
- Built-in ML/AI
- Features useful only at massive scale
- Complex configuration
- Breaking the single-file philosophy
Say yes to:
- Crash safety
- Data integrity
- Temporal queries
- Query performance
- Developer experience
- Cross-platform support
- v2.x maintenance on
v2.x: all bug fixes, including data-integrity and security fixes, but no new features, until 12 months after v3.0.0 final ships (not a prerelease) - v3.0.0-alpha release preparation on
main: the feature and correctness work is complete; remaining release tasks are tracked in the v3.0.0 milestone - v3.next features after v3.0.0
- Ecosystem work tracked in
minigraf-examples - Developer tools tracked in
minigraf-inspectorandminigraf-visualizer
See GitHub Issues for specific tasks, and the CHANGELOG for completed releases.
Last updated: November 2026 — v3.0.0-alpha in preparation.