GRI-2052: drop SQLite from the client to clear RUSTSEC-2026-0459 #203

Merged
vivy merged 1 commit from fix/GRI-2052-client-state-json into dev 2026-11-14 21:01:15 +00:00
Member

Splits the SQLite part off GRI-2052 into its own PR, per the chief of staff's direction on the forge issue: the gtk-renderer / advisories-blocking decision is still waiting on the product owner, but this part is needed whatever he decides.

What this does

Clears RUSTSEC-2026-0459 (bundled SQLite CVE in libsqlite3-sys, pulled in through sqlx's sqlite feature on the client) by dropping SQLite from the client entirely for this release:

  • crates/client/src/state.rs: the client's device state (client.db) is now one JSON document, written through a temporary file and renamed into place for an atomic replace, instead of a sqlx/SQLite database. Public API (Store::open, Store::update) is unchanged, so every caller — including the gtk-renderer-gated binaries — needs no changes.
  • crates/client/Cargo.toml: drops sqlx with the sqlite feature; tempfile moves from dev-dependencies to a regular dependency for the atomic-replace temp file. gtk-renderer, its feature flag, and its two binaries are untouched.
  • crates/client/migrations/0001_device_state.sql: removed — there is no database to migrate any more.
  • deny.toml: replaces the single rusqlite ban with two bans (sqlx-sqlite and rusqlite), each explaining why neither can be used here — a real Cargo.lock resolver conflict between libsqlite3-sys versions, not a style preference. Reproduction is in the GRI-2052 forge comment.
  • plan/decisions/0003-postgres-on-the-server-sqlite-on-the-client.md: dated note explaining the SQLite part of this ADR is paused, not reversed, and why.
  • plan/client/offline-first.md: updated to describe the state file as JSON instead of a SQLite schema.

What this deliberately does not touch

  • gtk-renderer, grimoirix-signage-client, renderer_spike, keep_awake, the renderer modules — all untouched. The campus production test still gets its full-screen player.
  • .github/workflows/ci.yml / scripts/local-gates.sh advisories handling — advisories stays continue-on-error: true as it is on dev. Whether it blocks a merge is the product owner's call on GRI-2051/ADR 0013, not part of this PR.
  • deny.toml's [advisories] ignore list — still empty. The three remaining advisories (glib unsoundness, paste/proc-macro-error unmaintained) are untouched and still entangled with gtk-renderer; they are not part of this PR.

Verification

  • cargo check -p client and cargo check -p client --features gtk-renderer both build clean.
  • cargo test -p client --lib state:: — 11/11 pass.
  • cargo fmt --check -p client clean; cargo clippy -p client --all-targets -- -D warnings clean.
  • cargo deny check advisories — RUSTSEC-2026-0459 no longer appears; the three pre-existing gtk-renderer-related advisories remain (expected, out of scope here).
  • cargo deny check bans passes — the new sqlx-sqlite/rusqlite bans do not fire.
  • ./scripts/local-gates.sh --rust-only run in full.
  • repo-boundary --staged clean.
Splits the SQLite part off GRI-2052 into its own PR, per the chief of staff's direction on the forge issue: the gtk-renderer / advisories-blocking decision is still waiting on the product owner, but this part is needed whatever he decides. ## What this does Clears RUSTSEC-2026-0459 (bundled SQLite CVE in `libsqlite3-sys`, pulled in through `sqlx`'s `sqlite` feature on the client) by dropping SQLite from the client entirely for this release: - `crates/client/src/state.rs`: the client's device state (`client.db`) is now one JSON document, written through a temporary file and renamed into place for an atomic replace, instead of a `sqlx`/`SQLite` database. Public API (`Store::open`, `Store::update`) is unchanged, so every caller — including the `gtk-renderer`-gated binaries — needs no changes. - `crates/client/Cargo.toml`: drops `sqlx` with the `sqlite` feature; `tempfile` moves from dev-dependencies to a regular dependency for the atomic-replace temp file. `gtk-renderer`, its feature flag, and its two binaries are untouched. - `crates/client/migrations/0001_device_state.sql`: removed — there is no database to migrate any more. - `deny.toml`: replaces the single `rusqlite` ban with two bans (`sqlx-sqlite` and `rusqlite`), each explaining why neither can be used here — a real `Cargo.lock` resolver conflict between `libsqlite3-sys` versions, not a style preference. Reproduction is in the GRI-2052 forge comment. - `plan/decisions/0003-postgres-on-the-server-sqlite-on-the-client.md`: dated note explaining the SQLite part of this ADR is paused, not reversed, and why. - `plan/client/offline-first.md`: updated to describe the state file as JSON instead of a SQLite schema. ## What this deliberately does not touch - `gtk-renderer`, `grimoirix-signage-client`, `renderer_spike`, `keep_awake`, the renderer modules — all untouched. The campus production test still gets its full-screen player. - `.github/workflows/ci.yml` / `scripts/local-gates.sh` advisories handling — `advisories` stays `continue-on-error: true` as it is on `dev`. Whether it blocks a merge is the product owner's call on GRI-2051/ADR 0013, not part of this PR. - `deny.toml`'s `[advisories] ignore` list — still empty. The three remaining advisories (glib unsoundness, `paste`/`proc-macro-error` unmaintained) are untouched and still entangled with `gtk-renderer`; they are not part of this PR. ## Verification - `cargo check -p client` and `cargo check -p client --features gtk-renderer` both build clean. - `cargo test -p client --lib state::` — 11/11 pass. - `cargo fmt --check -p client` clean; `cargo clippy -p client --all-targets -- -D warnings` clean. - `cargo deny check advisories` — RUSTSEC-2026-0459 no longer appears; the three pre-existing gtk-renderer-related advisories remain (expected, out of scope here). - `cargo deny check bans` passes — the new `sqlx-sqlite`/`rusqlite` bans do not fire. - `./scripts/local-gates.sh --rust-only` run in full. - `repo-boundary --staged` clean.
GRI-2052: drop SQLite from the client to clear RUSTSEC-2026-0459
Some checks failed
CI / the pre-push hook (pull_request) Successful in 1m4s
CI / cargo fmt (pull_request) Successful in 1m4s
CI / cargo clippy (pull_request) Successful in 1m59s
CI / cargo deny (pull_request) Successful in 2m9s
CI / cargo deny advisories (pull_request) Failing after 1m58s
CI / repository boundary (pull_request) Successful in 51s
CI / cargo test (pull_request) Successful in 5m5s
CI / frontend-web (pull_request) Successful in 1m55s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 36s
ef5b73a38c
The client's device state is a plain JSON file (written through a
temporary file and renamed into place) instead of sqlx's sqlite
feature. No sqlx release takes libsqlite3-sys >= 0.39, and rusqlite
cannot coexist with the server's sqlx dependency in the same
Cargo.lock: libsqlite3-sys links = "sqlite3" allows only one version,
and sqlx's weak feature edges to sqlx-sqlite pin a version below the
fix regardless of whether sqlite is ever turned on.

gtk-renderer and the advisories-blocking decision are out of scope
here; both stay as they are on dev pending the product owner's call
on GRI-2051.
vivy merged commit c8fccc2be7 into dev 2026-11-14 21:01:15 +00:00
vivy deleted branch fix/GRI-2052-client-state-json 2026-11-14 21:01:15 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage!203
No description provided.