feat(sql): migrate engine rusqlite → gluesql-core, drop bundled SQLite (REQ-231)#586
Merged
Conversation
…te (REQ-231) Replaces rusqlite (bundled SQLite C) with gluesql-core (pure Rust) behind the unchanged `sql::query`/`plan_write` API. The ephemeral staging db is now gluesql memory-storage populated from the live store; gluesql's async `execute` is bridged via `futures::executor::block_on` (no runtime). The CI build no longer compiles the SQLite C amalgamation — the per-job weight that compounded #567 runner contention (DD-069). Behavior is identical — all existing tests pass unchanged: core read+write (sql:: 7/7), cli (sql_* 3/3 incl. round-trip fidelity + atomic rejection), serve (sql_endpoint 1/1). rusqlite + libsqlite3-sys removed from the dependency tree. Live V-closure query confirmed on the repo. Follow-on (now enabled): a native gluesql `Store`/`StoreMut` over rivet's store (true virtual tables; INSERT/DELETE/fields/links writes without the staging-diff). Implements: REQ-231 Refs: DD-069, REQ-229, REQ-230 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📐 Rivet artifact deltaNo artifact changes in this PR. Code-only changes (renderer, CLI wiring, tests) don't touch the artifact graph. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Rivet Criterion Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 61b35ad | Previous: db5395b | Ratio |
|---|---|---|---|
traceability_matrix/1000 |
58804 ns/iter (± 305) |
44278 ns/iter (± 867) |
1.33 |
query/10000 |
343338 ns/iter (± 2702) |
237633 ns/iter (± 3019) |
1.44 |
This comment was automatically generated by workflow using github-action-benchmark.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements REQ-231 / DD-069 — the SQL engine swap you greenlit after the verify-first prototype.
What changed
Replaces rusqlite (bundled SQLite C) with gluesql-core (pure Rust) behind the unchanged
sql::query/plan_writeAPI. The ephemeral staging DB is now gluesql memory-storage populated from the live store; gluesql's asyncexecuteis bridged viafutures::executor::block_on(no async runtime).Why
The bundled-SQLite C amalgamation compiled on every CI job — the per-job weight that compounded #567 runner contention (#582 sat ~40 min queued). gluesql-core is
sqlparser+ the engine, pure Rust, nocc.rusqlite+libsqlite3-sysare gone from the dependency tree.Behavior is identical — all tests pass unchanged
sql::7/7 (read SELECT/JOIN + write planning incl. NULL-aware diff)sql_*3/3 (V-closure read, write round-trip fidelity, atomic rejection)sql_endpoint1/1 (read + write-refused + cross-origin guard)rivet sqlV-closure query confirmed on the repo;rivet validatePASS; fmt + clippy cleanNotes
gluesqlcrate, which pulls every storage backend +cc— see DD-069).snapshot()now sorts rows (gluesql doesn't guarantee order withoutORDER BY) for stable change-detection.Store/StoreMutover rivet's store (true virtual tables; INSERT/DELETE/fields/links writes without the staging-diff) — the path to Add document system and improve graph visualization #2.🤖 Generated with Claude Code