> 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/phases/phase_22/session_07_honesty_regression_tests.md).

# Session 07: Honesty Regression Tests

**Session ID**: `phase22-session07-honesty-regression-tests` **Package**: apps/web **Status**: Not Started **Estimated Tasks**: \~12-25 **Estimated Duration**: 2-4 hours

***

## Objective

Lock the replay, reconnect, and mock/drill anti-farming guarantees through public store and replay seams.

***

## Scope

### In Scope (MVP)

* Add or extend store/persistence tests in the smallest local fixture, either `apps/web/tests/gameProjectionStore.test.ts`, `apps/web/tests/replayPersist.test.ts`, or another existing persistence-style test.
* Test that `dispatchReplayEntries()` with the replay flag does not change persisted progress numbers.
* Test that replaying the same `mission_complete` or failed `tool_result` sequence twice does not double progress-like counters.
* Test reconnect-style `roster_update`, `mission_state`, and `suggestion_update` snapshots as reconciliation that cannot change XP, essence, banners, kills, title progress, or War Tide numbers.
* Test `mockEnabled: true` so in-memory folding remains allowed only as implemented, while persisted projection writes stay disabled.
* Test that transient presentation facts such as visible hero slots, strike queues, combo stages, sound cues, animation pulses, and toast effects are absent from serialized projection snapshots.

### Out of Scope

* Follow the explicit out-of-scope and deferred-work boundaries in the Dependencies / Notes section below.
* Do not add rendering, audio, hosted persistence, protocol changes, or a second game state authority unless this session explicitly lists that work as in scope.

***

## Dependencies / Notes

* Depends on Session 06.
* Prefer fixed timestamp builders and small typed event builders matching local test style.
* Do not add component rendering unless the store lifecycle hook requires React `act()`.
* Out of scope: adding XP, essence, banners, kills, War Tide gain/loss behavior, or UI ceremony just to make anti-farming tests more visible.

***

## Prerequisites

* [ ] Session 06 completed and validated.

***

## Deliverables

1. Regression coverage for the known replay/reconnect farming exploit.
2. Tests that document the mock/drill persistence boundary from public store and replay behavior.

***

## Success Criteria

* [ ] Shared replay and reconnect hydration cannot change persisted projection progress numbers.
* [ ] Mock/drill traffic cannot be persisted as real progress.
* [ ] The tests fail if future reducer work starts accumulating progress during replay, reconnect snapshots, or mock mode.
* [ ] The serialized projection remains bounded aggregate state rather than an event log or presentation queue.


---

# 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/phases/phase_22/session_07_honesty_regression_tests.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.
