test(gateway): prove SQLite session rollback and reopen durability #607

Closed
opened 2026-10-27 13:37:00 +00:00 by sam · 0 comments
Owner

The SQLite SessionStore uses real transactions and WAL, but current tests only verify successful operations through the same open handle. Add adversarial file-backed tests that prove persisted session/message state survives close+reopen and that injected failures during Delete and ReplaceMessages roll the transaction and FTS index back to the original state.

Acceptance Criteria

A file-backed store is closed and reopened with sessions, canonical MessageID, SourceID, text, sender, and timestamps intact; PRAGMA quick_check returns ok; deterministic abort triggers force mid-Delete and mid-ReplaceMessages failures; after each failure the original session, history, counts, and search results remain unchanged; focused and race tests pass.


Imported from beads archie-core-1786637491876-80-74417b6f · GitHub #101 · type task · priority P2 · created 2026-08-08 · closed 2026-08-08

The SQLite SessionStore uses real transactions and WAL, but current tests only verify successful operations through the same open handle. Add adversarial file-backed tests that prove persisted session/message state survives close+reopen and that injected failures during Delete and ReplaceMessages roll the transaction and FTS index back to the original state. ### Acceptance Criteria A file-backed store is closed and reopened with sessions, canonical MessageID, SourceID, text, sender, and timestamps intact; PRAGMA quick_check returns ok; deterministic abort triggers force mid-Delete and mid-ReplaceMessages failures; after each failure the original session, history, counts, and search results remain unchanged; focused and race tests pass. --- _Imported from beads `archie-core-1786637491876-80-74417b6f` · GitHub #101 · type task · priority P2 · created 2026-08-08 · closed 2026-08-08_
sam added the mediumtask labels 2026-10-27 13:37:00 +00:00
sam self-assigned this 2026-10-27 13:37:00 +00:00
sam closed this issue 2026-10-27 13:37:00 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#607