> For the complete documentation index, see [llms.txt](https://faction-os.gitbook.io/faction-os-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase23-session04-store-persistence-boundaries/tasks.md).

# Task Checklist

**Session ID**: `phase23-session04-store-persistence-boundaries` **Total Tasks**: 16 **Estimated Duration**: 3-4 hours **Created**: 2026-07-05

***

Legend: `[x]` completed; `[ ]` pending; `[P]` parallelizable; `[SNNMM]` session ref; `TNNN` task ID.

***

## Setup (3 tasks)

* [x] T001 \[S2304] Verify existing projection persistence helpers, timers, flush hooks, reset cleanup, and store folding paths (`apps/web/src/store/useGameStore.ts`, `apps/web/src/lib/gameProjection.ts`)
* [x] T002 \[S2304] Verify existing browser-local erasure projection-key coverage and storage inventory helpers (`apps/web/src/lib/localErasure.ts`, `apps/web/tests/localErasure.test.ts`)
* [x] T003 \[S2304] Verify Session 03 scanner snapshot factories and reducer camp expectations that can be reused for store-level tests (`apps/web/tests/gameProjection.test.ts`, `apps/web/tests/gameProjectionStore.test.ts`)

***

## Foundation (4 tasks)

* [x] T004 \[S2304] Add store-test scanner issue fixtures for multi-sector camp snapshots and clean snapshots with aggregate-only safe values (`apps/web/tests/gameProjectionStore.test.ts`)
* [x] T005 \[S2304] Add helper assertions for persisted projection reads, camp storage-key inventory, and absence of camp-specific storage keys (`apps/web/tests/gameProjectionStore.test.ts`)
* [x] T006 \[S2304] Add helper assertions that serialized projection state omits raw issue messages, prompts, terminal output, provider payloads, file contents, absolute paths, environment values, and secrets (`apps/web/tests/gameProjectionStore.test.ts`)
* [x] T007 \[S2304] \[P] Add local-erasure test helpers or assertions for projection-key cleanup and no camp-specific browser storage keys (`apps/web/tests/localErasure.test.ts`)

***

## Implementation (5 tasks)

* [x] T008 \[S2304] Add store-level test proving normal `applyEvent` reconciles scanner camps and persists them through `GAME_PROJECTION_STORAGE_KEY` after explicit flush with existing debounce semantics (`apps/web/tests/gameProjectionStore.test.ts`)
* [x] T009 \[S2304] Add store-level test proving replayed scanner snapshots stay camp-inert and do not write projection storage through `dispatchReplayEntries` with replay flags (`apps/web/tests/gameProjectionStore.test.ts`)
* [x] T010 \[S2304] Add store-level test proving mock-enabled scanner snapshots may fold drill camps in memory while persisted projection storage stays byte-for-byte unchanged (`apps/web/tests/gameProjectionStore.test.ts`)
* [x] T011 \[S2304] Add store-level tests proving server hydration snapshots after boot reconcile through the non-replay path and clean snapshots remove camps only through real snapshot reconciliation (`apps/web/tests/gameProjectionStore.test.ts`)
* [x] T012 \[S2304] Make minimal production repairs only if tests expose a gap in store persistence, projection parsing, or erasure inventory, with no new storage key or trusted-erasure claim (`apps/web/src/store/useGameStore.ts`, `apps/web/src/lib/gameProjection.ts`, `apps/web/src/lib/localErasure.ts`)

***

## Testing (4 tasks)

* [x] T013 \[S2304] Add reset regression coverage proving `resetToSeed()` clears pending camp writes, resets in-memory camps, and removes the projection key (`apps/web/tests/gameProjectionStore.test.ts`)
* [x] T014 \[S2304] Add browser-local erasure regression coverage proving camp aggregate storage is removed and duplicate erasure idempotency does not leak raw projection values (`apps/web/tests/localErasure.test.ts`)
* [x] T015 \[S2304] Run focused Vitest for store persistence and local erasure regressions (`npm --workspace @factionos/web test -- gameProjectionStore.test.ts localErasure.test.ts`)
* [x] T016 \[S2304] Run web typecheck and ASCII/LF validation for changed files (`npm --workspace @factionos/web run typecheck`, `apps/web/tests/gameProjectionStore.test.ts`, `apps/web/tests/localErasure.test.ts`)

***

## Completion Checklist

* [x] All tasks marked `[x]`
* [x] All tests and checks passing
* [x] All files ASCII-encoded with LF line endings
* [x] implementation-notes.md updated
* [x] Ready for `creview` (next step in the implement -> creview -> validate sequence)

***

## Next Steps

Run the `creview` workflow step.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase23-session04-store-persistence-boundaries/tasks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
