From 525e304402c2a0cb38df0d0a05e8d4455b0453ae Mon Sep 17 00:00:00 2001 From: Aditya Mukhopadhyay Date: Wed, 18 Nov 2026 09:46:23 +0530 Subject: [PATCH 1/2] release: v2.0.12 Sync release documentation and bump to 2.0.12. BrowserDb IndexedDB flushes are atomic and ordered, and a failed handle refuses later durable work (#894). File format v7 and the public API are unchanged. Co-Authored-By: Claude Sonnet 5.5 --- CHANGELOG.md | 8 ++++++++ CLAUDE.md | 4 +--- Cargo.toml | 2 +- README.md | 2 +- ROADMAP.md | 13 ++++++++++++- docs/TEST_COVERAGE.md | 2 +- 6 files changed, 24 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8682dac0..bdf3887dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## v2.0.12 — 2026-11-18 + +Patch release on the v2.x line under the [support policy](PHILOSOPHY.md#support-policy): a `BrowserDb` (IndexedDB) durability fix, for a failed flush that left the store with a meta referencing missing pages and later writes reporting success without persisting (#894). File format is unchanged (v7). No API changes; two error codes, `STG-046` and `STG-048`, are registered. Upgrading is recommended for every v2.x user who runs `BrowserDb` against IndexedDB. Native v2.x behavior is unchanged. + ### Fixed - **IndexedDB flushes are atomic, settle on abort, and refuse later writes after a failure (#894)**, backported from v3 for the next v2.x patch. A synchronous exception while queueing pages aborts the whole batch; an abort with no request error rejects instead of hanging, and repeated request errors cannot throw from a consumed callback. The failed operation reports `STG-048` naming the IndexedDB write and browser exception (page-preparation errors retain their own code). Subsequent transact/retract, checkpoint and import calls report `STG-046` without changing memory. Overlapping flushes run in order; a checkpoint waits for earlier writes even when it has no dirty pages. Queries, rules and export remain available, including rejected work already applied in memory; export is not a durability acknowledgement. Discard the failed handle and reopen to recover the successful prefix before the failure. A failed import leaves IndexedDB unchanged. Format v7, the IndexedDB schema, public methods, healthy write volume and read-only open behavior are unchanged. Native v2.x behavior is unchanged; the two error codes retain their v3 meanings. @@ -21,6 +25,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Correct ordinary aggregate examples and lists (#777): v2 supports `count`, `count-distinct`, `sum`, `sum-distinct`, `min` and `max`; `avg` requires `:over`. Query behavior is unchanged. - Retire production-readiness tracker #383 in favor of the v3.0.0 milestone, preserving its release gates there. +### Known issues + +- Same-transaction multi-valued facts can read back as one value (#371, #287), a fact retracted and re-asserted in one `WriteTransaction` is lost at commit (#477), a later assertion does not replace an earlier valid-time window (#435), `save()` is not crash-atomic (#374), and a `.wal` from 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. + ## v2.0.11 — 2026-10-26 Patch release on the v2.x line under the [support policy](PHILOSOPHY.md#support-policy): two query data-integrity fixes, for expressions that compared a keyword and a ref to its entity differently from joins (#744), and float-literal rule calls whose `-0.0` rows varied between runs (#750), plus `checkpoint()` deadlocking inside a `WriteTransaction` (#734). File format is unchanged (v7). No API changes. Upgrading is recommended for every v2.x user who compares entity refs in expressions, passes float constants to rules, or uses `WriteTransaction`. diff --git a/CLAUDE.md b/CLAUDE.md index 92c8670af..e39249c71 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -188,9 +188,7 @@ Ordinary aggregates on v2 are `count`, `count-distinct`, `sum`, `sum-distinct`, ## Current Maintainer Context -**Unreleased, next v2.x patch** — the #894 IndexedDB backport makes flushes atomic and ordered, rejects abort-only failures, and refuses later durable work on a failed browser handle with STG-046. STG-048 names the failed IndexedDB write and DOM exception. Format v7 and the public API are unchanged. - -**v2.0.11 released** (2026-10-26) — expression `=` / `!=` equates a keyword with a ref to its entity (#744), float-literal rule calls return `-0.0` rows in every run (#750), and `checkpoint` inside a `WriteTransaction` returns `INT-001` instead of deadlocking (#734). **v2.0.10 released** (2026-10-23) — WAL entries of more than 1,000,000 facts replay (#686), float constants match equal floats only (#706), prepared queries use the database's rule limits (#679); Kani proofs of `encode_value` backported (#627). **v2.0.9** (2026-10-21) — a pseudo-attribute in a rule body reads the stored fact (#661), a fact of more than four elements is rejected with PRS-108 (#649), `BrowserDb` rejections carry their error code (#673); every binding package is consumer-tested before and after publishing. **v2.0.8** (2026-10-20) — query data-integrity patch: `:db/valid-at` in `not-join` bodies and rule definitions (#615, #617), `or` branches with outer-variable expressions, `or`-bound expression variables and keyword/entity joins (#620, #625, #637), rules calling or recursing through a `not`/`or` rule (#628, #633). **v2.0.7** (2026-10-16) — prepared queries keep a literal `:as-of`/`:valid-at` (#603), rule calls with a literal argument return every row (#608), an `or` sharing no variable returns its cross product (#610). **v2.0.6** (2026-10-14) — concurrent-query data-integrity patch: queries see whole transactions (#554), one state per query (#555), no half-written checkpoint reads (#558). **v2.0.5** (2026-10-11) — short-file open refused with STG-045 (#506), commit after a torn WAL entry no longer lost, WAL-007 (#513); backported rule-query `max_results` (#528), all-checkpointed WAL removal (#457) and `usize::MAX` close-time save (#476); weekly soak test (#392), real coverage gates (#396). **v2.0.4** (2026-10-08) — `BrowserDb` IndexedDB flush returns an error for an unreadable dirty page (#470); golden-file v7 corpus (#391) and SIGKILL committed-data crash test (#384). **v2.0.3** (2026-10-06) — data-integrity patch under the support policy: indexed queries with >65,535 uncheckpointed facts (#445), tx counter rewound on reopen next to an already-checkpointed WAL (#447). **v2.0.2** (2026-09-27) — last planned v2.x feature/fix release: query fixes (#297, #405, #407, #410), directory fsync (#389), point-query/attribute-scan/checkpoint perf mitigations (#323, #381, #315), CI policy checks (#395), support policy and tiers (#397, #399, #400). **v2.0.1** (2026-09-25) fixed index rebuild on open (#370). **v2.0.0** introduced kernel file locking (#317, #304), structured runtime error codes (#277), `OpenOptions` `#[non_exhaustive]`, and an MSRV of Rust 1.89. See `CHANGELOG.md` for the full rationale and release history. +**v2.0.12 released** (2026-11-18) — `BrowserDb` IndexedDB flushes are atomic and ordered, abort-only failures reject, and a failed handle refuses later durable work with STG-046; STG-048 names the failed IndexedDB write and DOM exception (#894). Format v7 and the public API are unchanged. **v2.0.11** (2026-10-26) — expression `=` / `!=` equates a keyword with a ref to its entity (#744), float-literal rule calls return `-0.0` rows in every run (#750), and `checkpoint` inside a `WriteTransaction` returns `INT-001` instead of deadlocking (#734). **v2.0.10 released** (2026-10-23) — WAL entries of more than 1,000,000 facts replay (#686), float constants match equal floats only (#706), prepared queries use the database's rule limits (#679); Kani proofs of `encode_value` backported (#627). **v2.0.9** (2026-10-21) — a pseudo-attribute in a rule body reads the stored fact (#661), a fact of more than four elements is rejected with PRS-108 (#649), `BrowserDb` rejections carry their error code (#673); every binding package is consumer-tested before and after publishing. **v2.0.8** (2026-10-20) — query data-integrity patch: `:db/valid-at` in `not-join` bodies and rule definitions (#615, #617), `or` branches with outer-variable expressions, `or`-bound expression variables and keyword/entity joins (#620, #625, #637), rules calling or recursing through a `not`/`or` rule (#628, #633). **v2.0.7** (2026-10-16) — prepared queries keep a literal `:as-of`/`:valid-at` (#603), rule calls with a literal argument return every row (#608), an `or` sharing no variable returns its cross product (#610). **v2.0.6** (2026-10-14) — concurrent-query data-integrity patch: queries see whole transactions (#554), one state per query (#555), no half-written checkpoint reads (#558). **v2.0.5** (2026-10-11) — short-file open refused with STG-045 (#506), commit after a torn WAL entry no longer lost, WAL-007 (#513); backported rule-query `max_results` (#528), all-checkpointed WAL removal (#457) and `usize::MAX` close-time save (#476); weekly soak test (#392), real coverage gates (#396). **v2.0.4** (2026-10-08) — `BrowserDb` IndexedDB flush returns an error for an unreadable dirty page (#470); golden-file v7 corpus (#391) and SIGKILL committed-data crash test (#384). **v2.0.3** (2026-10-06) — data-integrity patch under the support policy: indexed queries with >65,535 uncheckpointed facts (#445), tx counter rewound on reopen next to an already-checkpointed WAL (#447). **v2.0.2** (2026-09-27) — last planned v2.x feature/fix release: query fixes (#297, #405, #407, #410), directory fsync (#389), point-query/attribute-scan/checkpoint perf mitigations (#323, #381, #315), CI policy checks (#395), support policy and tiers (#397, #399, #400). **v2.0.1** (2026-09-25) fixed index rebuild on open (#370). **v2.0.0** introduced kernel file locking (#317, #304), structured runtime error codes (#277), `OpenOptions` `#[non_exhaustive]`, and an MSRV of Rust 1.89. See `CHANGELOG.md` for the full rationale and release history. Current plan (see `ROADMAP.md` and the milestones): - **v2.x** (`main`, format v7) now gets only data-integrity and security fixes as patch releases (v2.0.3 is the first); v2.0.2 was the last planned v2.x release. diff --git a/Cargo.toml b/Cargo.toml index 19b41e2ab..b0e7ee4e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ resolver = "2" [package] name = "minigraf" -version = "2.0.11" +version = "2.0.12" edition = "2024" rust-version = "1.89" description = "Zero-config, single-file, embedded graph database with bi-temporal Datalog queries" diff --git a/README.md b/README.md index 7659c1372..66d149e02 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ In v2, the ordinary aggregates are `count`, `count-distinct`, `sum`, `sum-distin ```toml [dependencies] -minigraf = "2.0.11" +minigraf = "2.0.12" ``` Or via cargo: diff --git a/ROADMAP.md b/ROADMAP.md index cfa808339..b38ac8a99 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -19,6 +19,17 @@ unchanged. See [Unreleased](CHANGELOG.md#unreleased). --- +## v2.0.12 — BrowserDb Flush Patch (released 2026-11-18) + +File format stays v7 and the public API does not change. Details are in the [CHANGELOG](CHANGELOG.md). + +Shipped: + +- `BrowserDb` IndexedDB flushes are atomic, settle on abort and, after a failure, refuse later durable work with `STG-046`; `STG-048` names the failed write (#894) +- Browser library linted on `wasm32-unknown-unknown` in CI; `BrowserDb` tests run in Firefox, Chrome and Safari (#905, #906) + +--- + ## v2.0.11 — Query and Write-Transaction Patch (released 2026-10-26) File format stays v7 and the public API does not change. Details are in the [CHANGELOG](CHANGELOG.md). @@ -295,4 +306,4 @@ See [GitHub Issues](https://github.com/project-minigraf/minigraf/issues) for spe --- -**Last updated**: October 2026 — v2.0.11, a query and write-transaction patch on v2.x, is the current release; v3.0.0 work, including the file-format v8 fix for #287/#371, is developed on the long-lived `v3` branch and merges into `main` at the v3.0.0 cut. +**Last updated**: November 2026 — v2.0.12, a `BrowserDb` flush patch on v2.x, is the current release; v3.0.0 work, including the file-format v8 fix for #287/#371, is developed on the long-lived `v3` branch and merges into `main` at the v3.0.0 cut. diff --git a/docs/TEST_COVERAGE.md b/docs/TEST_COVERAGE.md index 8889e75aa..90df1cdbd 100644 --- a/docs/TEST_COVERAGE.md +++ b/docs/TEST_COVERAGE.md @@ -2,7 +2,7 @@ #777 corrects documentation only on v2; query behavior and test counts are unchanged. Ordinary `avg` still raises PRS-027 without `:over`. -## Unreleased v2.x Coverage Summary +## v2.0.12 Coverage Summary | | | |---|---| From 2719ada39296409ce3610f8b0839c22d6928257f Mon Sep 17 00:00:00 2001 From: Aditya Mukhopadhyay Date: Wed, 18 Nov 2026 09:48:15 +0530 Subject: [PATCH 2/2] docs: drop stale unreleased wording from the v2.0.12 release prep Co-Authored-By: Claude Sonnet 5.5 --- CHANGELOG.md | 2 +- README.md | 4 ++-- ROADMAP.md | 11 ----------- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdf3887dd..c955b748a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ Patch release on the v2.x line under the [support policy](PHILOSOPHY.md#support- ### Fixed -- **IndexedDB flushes are atomic, settle on abort, and refuse later writes after a failure (#894)**, backported from v3 for the next v2.x patch. A synchronous exception while queueing pages aborts the whole batch; an abort with no request error rejects instead of hanging, and repeated request errors cannot throw from a consumed callback. The failed operation reports `STG-048` naming the IndexedDB write and browser exception (page-preparation errors retain their own code). Subsequent transact/retract, checkpoint and import calls report `STG-046` without changing memory. Overlapping flushes run in order; a checkpoint waits for earlier writes even when it has no dirty pages. Queries, rules and export remain available, including rejected work already applied in memory; export is not a durability acknowledgement. Discard the failed handle and reopen to recover the successful prefix before the failure. A failed import leaves IndexedDB unchanged. Format v7, the IndexedDB schema, public methods, healthy write volume and read-only open behavior are unchanged. Native v2.x behavior is unchanged; the two error codes retain their v3 meanings. +- **IndexedDB flushes are atomic, settle on abort, and refuse later writes after a failure (#894)**, backported from v3. A synchronous exception while queueing pages aborts the whole batch; an abort with no request error rejects instead of hanging, and repeated request errors cannot throw from a consumed callback. The failed operation reports `STG-048` naming the IndexedDB write and browser exception (page-preparation errors retain their own code). Subsequent transact/retract, checkpoint and import calls report `STG-046` without changing memory. Overlapping flushes run in order; a checkpoint waits for earlier writes even when it has no dirty pages. Queries, rules and export remain available, including rejected work already applied in memory; export is not a durability acknowledgement. Discard the failed handle and reopen to recover the successful prefix before the failure. A failed import leaves IndexedDB unchanged. Format v7, the IndexedDB schema, public methods, healthy write volume and read-only open behavior are unchanged. Native v2.x behavior is unchanged; the two error codes retain their v3 meanings. ### CI diff --git a/README.md b/README.md index 66d149e02..5100b3ac4 100644 --- a/README.md +++ b/README.md @@ -200,11 +200,11 @@ See the [Mobile Integration](https://project-minigraf.github.io/minigraf-docs/la ### For WASM / Browser -**Unreleased, next v2.x patch (#894):** after an IndexedDB flush fails, later +**From v2.0.12 (#894):** after an IndexedDB flush fails, later writes, checkpoints and imports reject with `STG-046`. Discard the handle and reopen to recover the successful prefix before the failure. Queries, rules and export remain usable; export includes rejected work still held in memory and -does not acknowledge durability. See the [changelog](CHANGELOG.md#unreleased) +does not acknowledge durability. See the [changelog](CHANGELOG.md#v2012--2026-11-18) and [error reference](docs/ERROR_REFERENCE.md#stg-046-earlier-checkpoint-or-indexeddb-flush-failed-on-this-handle). Published as [`@minigraf/browser`](https://www.npmjs.com/package/@minigraf/browser) on npm (IndexedDB-backed, `wasm-pack`). WASI build (`wasm32-wasip1`) available as [`@minigraf/wasi`](https://www.npmjs.com/package/@minigraf/wasi) on npm and as a GitHub Releases artifact (Wasmtime / Wasmer). See the [Use Cases](https://project-minigraf.github.io/minigraf-docs/latest/use-cases/). The [playground](https://minigraf-playground.vercel.app/) and the [time travel visualizer](https://project-minigraf.github.io/minigraf-visualizer/) are both built on `@minigraf/browser`. diff --git a/ROADMAP.md b/ROADMAP.md index b38ac8a99..83ee0c046 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -8,17 +8,6 @@ Completed releases and their implementation details live in the [CHANGELOG](CHAN --- -## Next v2.x Patch — IndexedDB Durability (unreleased) - -Backport #894 from v3: atomic, always-settling IndexedDB flushes, ordered -persistence and checkpoint boundaries, and STG-046 refusal of later durable -work after a failed browser flush. The failure reports STG-048 (preparation -errors retain their engine code). Reopen recovers the successful prefix before -the failure. Format v7, IndexedDB schema, public methods and open behavior stay -unchanged. See [Unreleased](CHANGELOG.md#unreleased). - ---- - ## v2.0.12 — BrowserDb Flush Patch (released 2026-11-18) File format stays v7 and the public API does not change. Details are in the [CHANGELOG](CHANGELOG.md).