# testing/projections

## Purpose

Verifies that reducers and projectors rebuild state correctly from event sequences. Covers: `DefaultSessionReducer`, `OrchestrationReducer`/`Projector`, `InferenceReducer`/`Projector`, `ArtifactReducer`, `ContextReducer`/`Projector`, `RouterProjector`, `DecisionJournalProjector`, `SessionProjector`, `ProjectMemoryDistiller`, and `PreemptSteeringJournal`.

## Ownership

Tests in this submodule. Production modules exercised: `core:events`, `core:sessions`, `core:transitions`, `core:context`, `core:inference`, `core:kernel`, `core:artifacts`, `core:router`, `core:journal`.

## Local Contracts

- Projections must be rebuilt from events only — no test may assert on a persisted State object.
- Reducers are pure functions: same events → same state, always. Tests must verify this property explicitly (run twice, compare).
- Any new reducer or projector added to a `core:*` module needs a corresponding test here.

## Work Guidance

- Suspend tests use `runBlocking { ... }`.
- Keep event sequences in tests minimal — use `testing:fixtures` builders rather than raw event construction.

## Verification

```
./gradlew :testing:projections:test --rerun-tasks
```

## Child DOX Index

No child AGENTS.md (leaf module).
