R2 W2.0: SQLite-backed zero-dep Rust read boundary #2457

Merged
conductor merged 2 commits from r2-wave2-memory-storage into master 2026-10-05 01:56:51 +01:00
Owner

Closes #2456.

What

R2 total-rebase Wave 2 slice 0: retain SQLite and place an explicit zero-dependency Rust read boundary in front of system libsqlite3.

Architecture

  • SQLite stays. No bespoke-store replacement in this tranche.
  • memory_storage is zero Cargo dependencies and uses sqlite3_open_v2(..., SQLITE_OPEN_READONLY).
  • memory_store keeps stdlib SQLite as the default; RUNE_MEMORY_STORAGE=rust opts into proven-identical reads.
  • Existing connection-based transaction semantics are untouched.

Safety

  • No write-capable mems_* exports.
  • Explicit UPDATE SQL rejected by SQLite READONLY.
  • Database SHA-256 identical before/after reads and rejected mutation.
  • Typed parity: INTEGER/FLOAT/TEXT/NULL/BLOB plus NULL/string/numeric/bool parameters.

Scaffolding

Contract BUILDER-2026-10-04T15:54:17Z-cli; canary-first red proven; closure records module:memory_store correctly_predicted.

Evidence

  • canary_memory_storage: 19/19 x3
  • pytest: 2283/0 + 84 subtests
  • diff-cover: 71% (floor 70)
  • ruff clean; type ratchet PASS; henxels all-hold

Propagation: verified dependent umbrellas capability, growth, and perception through the full 2283-test suite plus registered canaries (context_broker, full_system, memory_synthesis, native, P0/P1, query_memory, rune_entry, rune_serve); no dependent code change required because W2.0 is an opt-in read backend with SQLite default unchanged.

Closes #2456. ## What R2 total-rebase Wave 2 slice 0: retain SQLite and place an explicit zero-dependency Rust read boundary in front of system libsqlite3. ## Architecture - SQLite stays. No bespoke-store replacement in this tranche. - `memory_storage` is zero Cargo dependencies and uses `sqlite3_open_v2(..., SQLITE_OPEN_READONLY)`. - `memory_store` keeps stdlib SQLite as the default; `RUNE_MEMORY_STORAGE=rust` opts into proven-identical reads. - Existing connection-based transaction semantics are untouched. ## Safety - No write-capable `mems_*` exports. - Explicit UPDATE SQL rejected by SQLite READONLY. - Database SHA-256 identical before/after reads and rejected mutation. - Typed parity: INTEGER/FLOAT/TEXT/NULL/BLOB plus NULL/string/numeric/bool parameters. ## Scaffolding Contract `BUILDER-2026-10-04T15:54:17Z-cli`; canary-first red proven; closure records `module:memory_store` correctly_predicted. ## Evidence - canary_memory_storage: 19/19 x3 - pytest: 2283/0 + 84 subtests - diff-cover: 71% (floor 70) - ruff clean; type ratchet PASS; henxels all-hold Propagation: verified dependent umbrellas capability, growth, and perception through the full 2283-test suite plus registered canaries (context_broker, full_system, memory_synthesis, native, P0/P1, query_memory, rune_entry, rune_serve); no dependent code change required because W2.0 is an opt-in read backend with SQLite default unchanged.
conductor added 2 commits 2026-10-04 21:08:23 +01:00
Contract BUILDER-2026-10-04T15:54:17Z-cli closed: module:memory_store correctly_predicted; memory_storage crate, mems_loader, and canary honestly new.

- memory_storage crate: zero Cargo dependencies; system libsqlite3 FFI; sqlite3_open_v2(SQLITE_OPEN_READONLY) makes writes impossible at the connection level; no write-capable mems_* exports
- typed read parity: INTEGER/FLOAT/TEXT/NULL/BLOB, bound string/numeric/bool/NULL params, aggregates, empty results, unicode, and honest SQLite errors
- mutation SQL is rejected; fixture SHA-256 is identical before/after all reads and the rejected mutation
- memory_store gains an explicit backend seam: stdlib SQLite remains the default; Rust read path is opt-in via RUNE_MEMORY_STORAGE=rust; connection-based transactional callers are untouched
- stats_for_path is the proving consumer; both backends return identical result shape
- canary-first: crate-absent red proven, now 19/19 three consecutive
- CI builds the crate in both jobs, pins MEMS_RUST_LIB, and runs the crate canary; pytest shim battery covers loader/seam lines

Evidence: full suite 2283/0, diff-cover 71% >= 70, type ratchet PASS, ruff clean, henxels all-hold. SQLite is retained exactly as Nick directed; this slice exports no Rust write path.
Merge remote-tracking branch 'gitea/master' into r2-wave2-memory-storage
deploy / deploy (push) Skipped
CI Pipeline / go-surface (push) Successful in 4s
CI Pipeline / best-practices (push) Successful in 2s
CI Pipeline / documentation (push) Successful in 2s
CI Pipeline / type-check (push) Successful in 28s
CI Pipeline / lint (push) Successful in 37s
CI Pipeline / canary (push) Successful in 46s
CI Pipeline / gitea-offline (push) Successful in 13s
Spec gate (headless) / spec-gate (pull_request) Successful in 5s
CI Pipeline / unit-tests (push) Successful in 4m52s
CI Pipeline / required-checks (push) Successful in 1s
CI Pipeline / CI Pipeline / notify-event-bridge (push) Successful in 2s
Auto-label / priority-gate (pull_request) Skipped
Auto-label / auto-label (pull_request) Successful in 2s
CI Pipeline / go-surface (pull_request) Successful in 5s
CI Pipeline / best-practices (pull_request) Successful in 1s
CI Pipeline / documentation (pull_request) Successful in 2s
CI Pipeline / type-check (pull_request) Successful in 28s
CI Pipeline / lint (pull_request) Successful in 37s
CI Pipeline / canary (pull_request) Successful in 45s
CI Pipeline / gitea-offline (pull_request) Successful in 13s
CI Pipeline / unit-tests (pull_request) Successful in 4m52s
CI Pipeline / required-checks (pull_request) Successful in 1s
CI Pipeline / CI Pipeline / notify-event-bridge (pull_request) Successful in 2s
Auto-version and Release / release (pull_request) Successful in 5s
e94c8e27a8
gitea-actions Bot added the memory label 2026-10-04 21:08:44 +01:00

🤖 Headless spec gate (non-blocking, #204 first slice)

Spec-gate agent produced no text output — check runner logs.

Deterministic floors still govern the merge

This comment is advisory. Required checks (lint, tests, canaries, type-check, coverage, dependency lock, impact gate) remain the merge authority per docs/adversarial-review.md proportionality.

🤖 **Headless spec gate (non-blocking, #204 first slice)** Spec-gate agent produced no text output — check runner logs. <details><summary>Deterministic floors still govern the merge</summary> This comment is advisory. Required checks (lint, tests, canaries, type-check, coverage, dependency lock, impact gate) remain the merge authority per docs/adversarial-review.md proportionality.</details>
gitea-actions Bot added the growthperception labels 2026-10-05 01:51:52 +01:00
conductor merged commit de5445357e into master 2026-10-05 01:56:51 +01:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: conductor/rune#2457