Repository navigation
v2.0.9 — 2026-10-21
Release Notes
Patch release on the v2.x line under the support policy: two data-integrity fixes, for a pseudo-attribute in a rule body that read the wrong valid time and tx metadata (#661) and for a fact of more than four elements whose extra elements were silently dropped (#649), plus error codes in BrowserDb rejections (#673). File format is unchanged (v7). No API changes; a fact of more than four elements, which used to be stored truncated, now fails with PRS-108. Upgrading is recommended for every v2.x user who reads :db/valid-from, :db/valid-to, :db/tx-count or :db/tx-id in rules.
This is also the first release whose language packages are installed and used, the way a user installs them, before they are published and again after (binding consumer tests). That check found and fixed packaging bugs in the 2.0.8 packages: the npm minigraf package did not load, the Android AAR had no classes, the Swift package did not compile, the C macOS library pointed at the CI build path and the Windows archive had no import library, the Java jar did not load on Alpine or Windows arm64, and the C and WASM packages shipped no license files. Use 2.0.9 or later of every binding.
Fixed
BrowserDberrors carry their error code (#673). The browser API (@minigraf/browser) rejected with the error's top-level message only, such asUnknown command: nosuchcommand, while every other API reports[PRS-001] Unknown command: nosuchcommand. EveryBrowserDbrejection now goes throughMinigrafError, so it starts with its code. Host errors that have no code yet (no IndexedDB, an import blob whose length is not a multiple of the page size) are unchanged.- A pseudo-attribute in a rule body reads the stored fact (#661). In a rule without
not,not-join,ororor-join,:db/valid-from,:db/valid-to,:db/tx-countand:db/tx-idread the rule evaluator's working copy of the fact: valid-from was the time the query ran, valid-to forever, and the tx-count and tx-id those of the copy. With[:a :edge :b]valid from 2020-01-01 to 2021-01-01,(rule [(vf ?x ?t) [?x :edge ?y] [?x :db/valid-from ?t]])returned the query's time for:a; it now returns 2020-01-01, as the same pattern in a query body does. Stored data was never affected. Present since v0.15.0. - A fact with more than four elements is rejected (#649).
transactread a fact's 4th element as its optional valid-time map and ignored everything after it, so[[:alice :person/age 1 {} 99 :junk]]stored[:alice :person/age 1]and dropped the rest without an error; two facts run together by a misplaced bracket lost one. A fact of more than four elements now fails with the newPRS-108, numbered as in v3.0.0, and the transaction writes nothing. A fact of five or more elements whose 4th is not a map now getsPRS-108instead ofPRS-047. Present since v0.4.0.
Tests
- Parser vs grammar verifier (#643), backported from v3.0.0.
src/query/datalog/parser/verifier.rschecks, for every generated input, that the parser rejects whattests/grammar/grammar.pestrejects, and accepts what it accepts unless the error code is semantic (a listed code with a witness pest accepts). It runs every string of 1 to 3 characters over 102 characters (ASCII,\t \n \r, four non-ASCII stand-ins) throughparse_edn, and every bracket-balanced sequence of up toMINIGRAF_GRAMMAR_BOUND(default 3) of 32 tokens in 15 command templates throughparse_datalog_command, also with no separators up to 3 tokens. Deterministic; about 40 s by default in a debug build. On v2.xINT-019still mixes syntax and semantic parse errors (v3.0.0 splits it intoPRS-083–PRS-107), so it counts as semantic here, and a syntax error codedINT-019that pest accepts is not caught (v3.0.0 checks that too). The drift it found is the same as on v3 and is listed inKNOWN_DRIFTby cause (comments and non-ASCII letters #650, since documented: see below; empty sections, ignored keywords, rule and call heads, a lone:or-, unterminated strings #651; a fact of more than four elements, #649, is fixed above). - The grammar documents comments and non-ASCII identifiers (#650), backported from v3.0.0. The parser has always accepted both;
tests/grammar/grammar.pestnow says so. A;starts a comment that runs to the end of the line and is skipped like whitespace. Symbols, variables, keywords and bind slots take Unicode letters and numerals (:person/名前,?ñ), as Rust'schar::is_alphabeticandchar::is_numericdefine them; a symbol starts with a letter or_, and-followed by a numeral starts a number, not a symbol. Nothing the parser accepts or rejects changes.grammar.pestnow says what the parser means: a fact is exactly[e a v]plus an optional valid-time map and a retracted fact exactly[e a v];not,not-join,or,or-join(andandinside anor) are never rule names; literal keywords end at a word boundary (:find?xis one keyword). A nightly workflow,grammar-verifier.yml, runs it at bound 4 onmainand onv3, and opens or comments on an issue when it fails.
Known issues
- Same-transaction multi-valued facts can read back as one value (#371, #287), a fact retracted and re-asserted in one
WriteTransactionis lost at commit (#477), a later assertion does not replace an earlier valid-time window (#435),save()is not crash-atomic (#374), and a.walfrom a later checkpoint is replayed onto an older.graph(#535); all are fixed in v3.0.0. All v2.x known issues, with affected versions and workarounds, are listed in the pinned issue #421.
Download minigraf 2.0.9
| File | Platform | Checksum |
|---|---|---|
| minigraf-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
| minigraf-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
| minigraf-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
| minigraf-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
| minigraf-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |