# task-020

status: done

## goal
Test DefaultRouterReducer — verify state transitions for SteeringNoteAddedEvent and each workflow lifecycle event.

## target artifact
testing/deterministic/src/test/kotlin/RouterReducerTest.kt

## execution steps
- Created `RouterReducerTest.kt` in `testing/deterministic/src/test/kotlin/` with 15 tests
- Tests cover: initial state, WorkflowStartedEvent, WorkflowCompletedEvent, WorkflowFailedEvent, OrchestrationPausedEvent, OrchestrationResumedEvent, StageCompletedEvent (single, multiple, field preservation), StageFailedEvent (with l2Memory entry and currentStageId clear), SteeringNoteAddedEvent (identity on initial and non-initial state), unknown event passthrough, timestamp preservation, and a full lifecycle sequence
- Used `EventFixtures.stored()` factory from `:testing:fixtures` module for building `StoredEvent` instances
- Followed `OrchestrationReducerTest.kt` pattern from `testing/projections/` for test structure

## changed artifacts
- Created: `testing/deterministic/src/test/kotlin/RouterReducerTest.kt`

## blockers
- None

## notes
- Placed test in `testing/deterministic/` per spec (task-020.md), though existing reducer tests live in `testing/projections/`. The `deterministic/` build.gradle already had `:core:router` and `:testing:fixtures` dependencies so no build config changes were needed.
- The reducer does NOT handle `SteeringNoteAddedEvent` — it falls through to `else -> state`. Tests verify this identity behavior explicitly (2 tests).
- All 15 tests pass with `./gradlew :testing:deterministic:test --tests RouterReducerTest`.
