Skip to content

⬆️ chore(deps): bump rusqlite to 0.42.0 (#733) - #734

Merged
kbrdn1 merged 5 commits into
devfrom
chore/#733-rusqlite-0-42
Nov 12, 2026
Merged

kbrdn1 merged 5 commits into
devfrom
chore/#733-rusqlite-0-42

Conversation

@kbrdn1

@kbrdn1 kbrdn1 commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Description

Bumps rusqlite 0.41.1 → 0.42.0. The SQLite compiled into gwm does not change, and none of the 0.42 fixes reach a code path gwm uses.

Closes #733

Type of change

  • ✨ Feature (new functionality)
  • 🐛 Fix (bug fix)
  • 🚑️ Hotfix (critical production fix)
  • ♻️ Refactor (no behaviour change)
  • 📝 Docs
  • ✅ Tests
  • ⚡ Perf
  • 🔧 Chore / CI / build

Changes

  • Cargo.toml: rusqlite = { version = "0.42.0", features = ["bundled"] }. One word of the MSRV comment goes to the past tense ("which rusqlite 0.41.1 brought in"), since 0.41.1 is no longer in the graph; the [Task]: re-measure the MSRV floor: libsqlite3-sys 0.39 no longer sets it #722 measurement it reports is left as recorded, not restated.
  • Cargo.lock: four packages move, all forced by rusqlite 0.42's requirements:
    • rusqlite 0.41.1 → 0.42.0
    • libsqlite3-sys 0.39.1 → 0.40.0. diff -rq of the two crate sources: sqlite3/ (the amalgamation, SQLITE_VERSION "3.54.1", same SQLITE_SOURCE_ID), build.rs and src/ are byte-identical. What changes is the version, the optional sqlcipher-src pin (=419.0.6 → =420.0.0, only with bundled-sqlcipher) and the SQLCipher bindings. The "bundled SQLite 3.54.1" line of the 0.42 release notes was already shipped by 0.39.1 ([Bug]: cargo audit red on dev: RUSTSEC-2026-0459 (libsqlite3-sys) and RUSTSEC-2026-0486 (rustix) #720).
    • sqlite-wasm-rs 0.5.5 → 0.6.3 and rsqlite-vfs 0.1.1 → 0.2.0: 0.42 raises its sqlite-wasm-rs requirement from >=0.5.1 to >=0.6.3. Both sit under cfg(all(target_family = "wasm", target_os = "unknown")); cargo tree -i sqlite-wasm-rs prints nothing on the host and finds them only with --target wasm32-unknown-unknown. No second SQLite reaches the binary.
  • CHANGELOG.md: entry under [Unreleased] > Dependencies.

Why nothing else changes for gwm

Active rusqlite features (cargo tree -e features -i rusqlite): bundled, modern_sqlite, cache/hashlink, ffi-sqlite-wasm-rs (inert off wasm). gwm calls open_with_flags(READ_ONLY | NO_MUTEX), prepare, query_map, Row::get, Row::get_ref and matches ValueRef::Null (src/agent_sessions.rs::opencode_scan_db, plus Connection::open / execute / params! in tests). Between 0.41.1 and 0.42.0, row.rs, statement.rs, types/value_ref.rs and params.rs are identical. The changed files map to features or calls gwm does not use:

0.42 change Gate
UAF in Session::apply / apply_strm (#1941) session feature, off
leak registering a collation / function with an invalid name (#1942) collation / functions, off
RawValue, InvalidParameterType replaces two error variants (#1933) functions / vtab, off
rarray ordering (#1934) array, off
sqlite3_key_v2 / rekey_v2, SQLCipher 4.20.0, wasm SQLCipher (#1930, #1932, #1921) sqlcipher / codec, off
set_clientdata on OOM (#1944), and the null-handler path in busy.rs reached through Connection::busy_handler / busy_timeout and the hook setters; gwm calls none of them, and open_with_flags sets its default timeout with a raw ffi::sqlite3_busy_timeout (inner_connection.rs:90)
new cfg_select! uses in lib.rs inside mod test; rusqlite defines its own macro_rules! cfg_select (error.rs:11), as 0.41.1 did

MSRV

No change. Declared floors: rusqlite 0.42.0 1.89.0 (same as 0.41.1), libsqlite3-sys 0.40.0 1.88.0 (same as 0.39.1), sqlite-wasm-rs 0.6.3 and rsqlite-vfs 0.2.0 1.81.0 (wasm only). The declared rust-version stays 1.95. The graph floor of 1.90 recorded for #722 was not re-measured here; the C sources and build script it compiled are byte-identical, and no newly reached code declares above 1.89.

third-party/

No change. The bundled SQLite stays 3.54.1, and SQLite is public domain (a "blessing" in place of a license), so it carries no notice obligation. Pre-existing and out of scope here: third-party/README.md says gwm links "two C libraries" statically, which leaves out the bundled SQLite.

Tests

  • cargo test passes locally
  • cargo fmt --check passes
  • cargo clippy -- -D warnings passes (--all-targets)
  • New tests added under tests/ (TDD: a PR adding behaviour without tests is sent back)

TDD exception, per CLAUDE.md: dependency bump without behaviour change, CI green is the test. The existing opencode coverage exercises every rusqlite call gwm makes against a real SQLite file: agent_sessions_tests (opencode_scan_reads_the_sqlite_db_when_present and siblings) and cli_binary (opencode_db_sessions_are_read_without_a_sqlite3_cli, opencode_detection_honors_xdg_data_home).

Also run locally, exit codes read without pipes:

  • cargo audit --deny warnings: exit 0, no audit.toml, no ignore
  • third_party_notices_tests: green
  • full cargo test: exit 0, 112 test result: ok lines out of 112, 3594 passed, 0 failed, 4 ignored (pre-existing #[ignore])
  • opencode tests on their own first: agent_sessions_tests 72 passed, cli_binary opencode 2 passed
  • cargo +1.95 check --all-targets --locked (the msrv job's command, throwaway target dir, RUSTFLAGS=""): exit 0, builds libsqlite3-sys 0.40.0

Not run: the stripped-PATH one-liner from CLAUDE.md. No env-dependent test is touched, and on this machine (macOS arm64) that one-liner fails at link time (library 'iconv' not found).

Screenshots / TUI captures

n/a

Checklist

  • Branch follows <type>/#<issue>-<description>
  • Commits follow Gitmoji + Conventional Commits (see CONTRIBUTING.md)
  • CHANGELOG.md updated under ## [Unreleased]
  • README updated if CLI surface changed (n/a)
  • examples/gwm.toml.example updated if config schema changed (n/a)
  • No unwrap() on user-facing paths (return GwmError instead)
  • No println! in TUI render code (status bar only)

Linked issues / docs

Notes for reviewers

The lock moves rusqlite (0.41.1 -> 0.42.0), libsqlite3-sys (0.39.1 -> 0.40.0) and the wasm-only sqlite-wasm-rs (0.5.5 -> 0.6.3) / rsqlite-vfs (0.1.1 -> 0.2.0), whose floor 0.42 raises to >=0.6.3; those two sit under cfg(all(target_family = "wasm", target_os = "unknown")) and never build on a native target.

libsqlite3-sys 0.40.0 ships the same SQLite as 0.39.1: the amalgamation (3.54.1, same source id), build.rs and src/ are byte-identical; only the optional sqlcipher-src pin moves. The 0.42 fixes sit behind features gwm does not enable (session, collation, functions, vtab, array, sqlcipher) or calls it never makes (busy_handler, the hook setters). Declared rust-versions are unchanged (rusqlite 1.89, libsqlite3-sys 1.88).

The MSRV comment says 0.41.1 "brought in" 0.39.1: it is no longer in the graph.

refs #733
@kbrdn1 kbrdn1 added chore Repo maintenance dependencies Dependency updates (dependabot) labels Nov 12, 2026
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0871bc84-c3a8-4686-a46f-c86fd1daf964

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

…#733)

Review nits: libsqlite3-sys 0.40.0 regenerates its SQLCipher bindings, so only src/ (not every Rust file) is byte-identical to 0.39.1's; and the MSRV claim now cites the 1.95 build instead of the crates' declared rust-versions.

closes #733
@kbrdn1
kbrdn1 merged commit 2d43db2 into dev Nov 12, 2026
15 checks passed
@kbrdn1 kbrdn1 mentioned this pull request Nov 12, 2026
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Repo maintenance dependencies Dependency updates (dependabot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant