SQLite engine open: SqliteOpts, connection architecture, spawn_blocking seam posture (task sqlite-engine-open-opts)

- SqliteOpts (poll_interval: Option<Duration>, None = 1 ms shipping
  default ADR-023 §4; max_readers, DEFAULT_MAX_READERS = 8; opts
  exemption from non_exhaustive per ADR-017 §3)
- open(path, opts) -> Box<dyn Store>: writer slot, reader pool,
  SharedUpdateWatcher with fallible spawn mapped W-2-style into
  Error::Database; plain-path posture (ADR-023 §3) pinned by test
- Substrate delta D-30: open_conn_bootstrapped — every connection
  (writer and pooled readers) carries the full bootstrap surface
  (pragmas, notify, alkstore functions, schema) per engine-sqlite.md;
  lineage opened readers pragmas-only. Registered in PROVENANCE.md
- spawn_blocking seam helper + error mappings (string/rusqlite ->
  Database, source chains preserved); helper cfg(test)-gated until
  sqlite-engine-seam-tx wires the trait impls
- Store trait stubbed with Database errors (no panics); close()/Drop
  join the watcher, clear subscribers (death-guard), close pool+writer
- 15 new tests (open boot, watcher fanout/death-close, cadence
  accounting, plain-path literal filename, :memory:, pool bounding,
  drop teardown, seam smoke incl. panic mapping); gates green
This commit is contained in:
glm-5.3-flash committed 2026-10-08 11:25:16 +00:00
1 parent 5474141f2b
commit 7d400906f5
11 files changed
+937 -13

No files matched your search

+3 -1
View File
@@ -11,6 +11,7 @@ parking_lot = "0.12"
rusqlite = { version = "0.40", features = ["bundled", "functions"] }
serde_json = "1"
thiserror = "2"
tokio = { version = "1", features = ["rt", "sync"] }
# file-id only supports unix and windows. Other targets (WASI, Redox,
# illumos, etc.) get the `(0, 0)` fallback in substrate::watcher's
@@ -19,4 +20,5 @@ thiserror = "2"
file-id = "0.2"
[dev-dependencies]
alkstore-contract-suite = { path = "../alkstore-contract-suite" }
alkstore-contract-suite = { path = "../alkstore-contract-suite" }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time"] }