From the adversarial review: store.py currently rewrites the ENTIRE Campaign aggregate to snapshot.json on every mutation (indent=2 + fsync), and get_state iterates all characters each call. At many sessions / large NPC rosters this is O(total-state) per beat.
The approved plan's design (characters/.json, combat.json, quests.json, per-session JSONL) is not yet implemented — only snapshot.json exists. Split persistence into per-entity files so a write touches one character, not the whole world. Keep the atomic-write + campaign_lock guarantees.
Not urgent at current scale; do before long multi-session campaigns (Epic 11).
From the adversarial review: store.py currently rewrites the ENTIRE Campaign aggregate to snapshot.json on every mutation (indent=2 + fsync), and get_state iterates all characters each call. At many sessions / large NPC rosters this is O(total-state) per beat.
The approved plan's design (characters/.json, combat.json, quests.json, per-session JSONL) is not yet implemented — only snapshot.json exists. Split persistence into per-entity files so a write touches one character, not the whole world. Keep the atomic-write + campaign_lock guarantees.
Not urgent at current scale; do before long multi-session campaigns (Epic 11).