feat(2-4): SqliteStore persistence layer#20
Merged
Conversation
RED phase — 30 tests covering all 11 ACs: - SessionStore trait / SqliteStore implementation - Save/load roundtrip with SavedSession, SessionMeta - Narrative append, recent_narrative with limit - "Previously On" recap generation / empty recap - Directory tree scanning for list_saves - Schema idempotency (reopen same DB) - PersistError variants - In-memory constructor for testing - tempfile dev-dependency for directory tests Compile errors expected: - SqliteStore, SessionStore, SavedSession, SessionMeta, PersistError types do not exist yet (need refactoring from GameStore) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add SessionStore trait with save/load/append_narrative/recent_narrative/generate_recap - SqliteStore implementation with singleton tables (session_meta, game_state, narrative_log) - SavedSession bundles meta + snapshot + recap in one load - "Previously On..." recap from last 20 narrative entries - Directory tree scanning via list_saves() for save.db files - WAL mode, schema idempotency (CREATE IF NOT EXISTS) - PersistError with typed variants (#[non_exhaustive]) - Backward compat: GameStore/PersistenceError/SaveInfo preserved All 28 tests GREEN. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 tasks
slabgorb
added a commit
that referenced
this pull request
Apr 4, 2026
Bug #1/#3 (agency): Inject PC agency constraint every turn regardless of multiplayer state. Explicitly list all PC names. Prohibit PC-to-PC physical scripting. Previously only fired when other_pcs was non-empty. Bug #6 (GM watcher): Send GameStateSnapshot for all active sessions on watcher WebSocket connect. Previously forward-only stream with no replay — late-connecting GM panel showed "Waiting for first turn..." indefinitely. Bug #20 (music rotation): Increase ThemeRotator history depth from 3 to 6 and candidate pool from 3 to 5. History of 3 was too shallow for 8+ tracks per mood, causing same-track repetition within the selection window. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 tasks
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.
Summary
SessionStoretrait andSqliteStoreimplementation alongside existingGameStoreSavedSessionbundles meta + snapshot + recap in one loadlist_saves()PersistErrorwith typed variants (#[non_exhaustive])Test plan
🤖 Generated with Claude Code