diff --git a/.github/workflows/binary-size.yml b/.github/workflows/binary-size.yml index 91a79d5a31..2664bccba1 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 77b6c565fa..21b586d140 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 a551d34ad2..1c8f469166 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 6185def967..935cd01bf5 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 diff --git a/src/query/datalog/optimizer.rs b/src/query/datalog/optimizer.rs index 0ca7b9c073..a942a9566d 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 }