From 4298ad2ee0af9088b390cacf4fb83fbf68880141 Mon Sep 17 00:00:00 2001 From: Aditya Mukhopadhyay Date: Fri, 13 Nov 2026 19:41:53 +0530 Subject: [PATCH 1/2] ci: raise v3 binary-size budget to 1250 KiB --- .github/workflows/binary-size.yml | 2 +- CHANGELOG.md | 2 ++ CLAUDE.md | 2 +- PHILOSOPHY.md | 4 ++++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/binary-size.yml b/.github/workflows/binary-size.yml index 91a79d5a3..2664bccba 100644 --- a/.github/workflows/binary-size.yml +++ b/.github/workflows/binary-size.yml @@ -14,7 +14,7 @@ jobs: name: Check distribution binary size runs-on: ubuntu-latest env: - SIZE_LIMIT_BYTES: 1269760 # 1240 KiB — #277 error codes, #306 top-k, #723 ancestor join planning, #870/#861 query limit keywords; see PHILOSOPHY.md §4 + SIZE_LIMIT_BYTES: 1280000 # 1250 KiB — approved headroom after the Rust 1.100 CI update; see PHILOSOPHY.md §4 steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 77b6c565f..21b586d14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- **v3 binary-size CI budget**: raise the enforced distribution-binary limit from 1,240 to 1,250 KiB (1,280,000 bytes). Unchanged production source measured 1,242 KiB after CI moved to Rust 1.100.0 and a newer runner image; the additional headroom changes no production code or build settings. + - **INT-001 text** (#824): `a WriteTransaction is already in progress on this thread; use tx.execute() instead` now reads `a write transaction is already in progress on this thread; use tx.execute() instead`, since owned and browser transactions raise it too. The code and the calls that raise it for a borrowed transaction are unchanged. - **INT-015 text** (#870): `{} must be a positive integer` is now `{} must be a non-negative integer`, because `:query-memory-limit` accepts 0. The code and when `:max-derived-facts`/`:max-results` raise it are unchanged. diff --git a/CLAUDE.md b/CLAUDE.md index a551d34ad..1c8f46916 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -47,7 +47,7 @@ Minigraf follows the "SQLite for bi-temporal graph databases" philosophy: - **Zero-configuration** - No setup, no config files, just works - **Embedded-first** - Library not server, in-process execution - **Single-file database** - One portable `.graph` file -- **Self-contained** - Minimal dependencies, small binary (~1.2MB budget as of #277, 1,240 KiB enforced on v3 since #870; see PHILOSOPHY.md §4) +- **Self-contained** - Minimal dependencies, small binary (~1.2MB budget as of #277, 1,250 KiB enforced on v3 after the Rust 1.100 CI update; see PHILOSOPHY.md §4) - **Cross-platform** - Native, WASM, mobile, embedded - **Reliability over features** - Do less, do it perfectly - **Bi-temporal first-class** - Time travel is a core feature, not addon diff --git a/PHILOSOPHY.md b/PHILOSOPHY.md index 6185def96..935cd01bf 100644 --- a/PHILOSOPHY.md +++ b/PHILOSOPHY.md @@ -123,6 +123,10 @@ SQLite's success comes from a clear philosophy: be a library, not a server. Be s limit bind slots and the `PreparedQuery` setters (#870) measured +672 bytes, 312 over the old gate, and the limit leaves room for `:max-iterations` (#861), which is built the same way. + The approved budget is now 1,250 KiB (1,280,000 bytes): unchanged production + source measured 1,239 KiB with Rust 1.99.1 and 1,242 KiB after CI moved to + Rust 1.100.0 and a newer runner image. This provides build-environment + headroom while retaining an enforced limit. The gate builds the x86_64 Linux CLI with cargo-dist's `dist` profile, the one releases ship. From v3.0.0 `dist` keeps release's full LTO rather than thin LTO, 7–31% smaller per target (#796; sizes per target From ec7dc39f9e0a25c02c0767d0bed14dc4c498092c Mon Sep 17 00:00:00 2001 From: Aditya Mukhopadhyay Date: Fri, 13 Nov 2026 19:49:57 +0530 Subject: [PATCH 2/2] fix: simplify optimizer switch for Rust 1.100 clippy --- src/query/datalog/optimizer.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/query/datalog/optimizer.rs b/src/query/datalog/optimizer.rs index 0ca7b9c07..a942a9566 100644 --- a/src/query/datalog/optimizer.rs +++ b/src/query/datalog/optimizer.rs @@ -23,9 +23,8 @@ thread_local! { #[inline] pub(crate) fn reorder() -> bool { #[cfg(any(test, feature = "test-hooks"))] - if !REORDER.with(std::cell::Cell::get) { - return false; - } + return REORDER.with(std::cell::Cell::get); + #[cfg(not(any(test, feature = "test-hooks")))] true }