Parent
#208 (Spec: deepened Store interface)
Blocked by
None.
Deliverables
Add the private Store transaction combinators (expand step — no mass migration yet).
Store::with_immediate_tx<T>(&self, f: impl FnOnce(&rusqlite::Transaction) -> Result<T, StoreError>) -> Result<T, StoreError>: locks conn, opens TransactionBehavior::Immediate, runs f, commits on Ok, rolls back on Err.
Store::with_deferred_read<T>(...) for the sole Deferred read path (store/audit_support.rs::verify_and_replay_aggregate), kept explicitly separate from the write combinator.
- Migrate ONE pilot write site to
with_immediate_tx to prove the shape (leave the rest for the T6 sweep).
- Tests: commit on
Ok; rollback on Err; two racing writers serialize (D-050 write-serialization / TOCTOU closure, cf. D-167/D-169).
Rationale and the full seam are in spec #208 (decision D-001). Files: crates/openspine-kernel/src/store/mod.rs, store/audit_support.rs.
Verification
./scripts/check.sh green (builds openspine-shell bin first, per AGENTS.md). No public API removed yet; conn stays pub(crate) until T6.
🤖 Generated from spec #208 (wayfinder #189, map #182).
Parent
#208 (Spec: deepened Store interface)
Blocked by
None.
Deliverables
Add the private Store transaction combinators (expand step — no mass migration yet).
Store::with_immediate_tx<T>(&self, f: impl FnOnce(&rusqlite::Transaction) -> Result<T, StoreError>) -> Result<T, StoreError>: locksconn, opensTransactionBehavior::Immediate, runsf, commits onOk, rolls back onErr.Store::with_deferred_read<T>(...)for the soleDeferredread path (store/audit_support.rs::verify_and_replay_aggregate), kept explicitly separate from the write combinator.with_immediate_txto prove the shape (leave the rest for the T6 sweep).Ok; rollback onErr; two racing writers serialize (D-050 write-serialization / TOCTOU closure, cf. D-167/D-169).Rationale and the full seam are in spec #208 (decision D-001). Files:
crates/openspine-kernel/src/store/mod.rs,store/audit_support.rs.Verification
./scripts/check.shgreen (buildsopenspine-shellbin first, per AGENTS.md). No public API removed yet;connstayspub(crate)until T6.🤖 Generated from spec #208 (wayfinder #189, map #182).