# task-021

status:
- done

## goal
Test RouterProjector — verify initial() returns empty defaults and apply() correctly chains reducer output.

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

## execution steps
- Create RouterProjectorTest.kt in testing/deterministic/src/test/kotlin/
- Test initial() returns RouterState with IDLE status, null sessionId, null currentStageId, empty l2Memory and conversationHistory
- Test initial() returns same state as reducer.initial (delegation verification)
- Test apply(WorkflowStartedEvent) delegates to reducer and sets RUNNING
- Test apply(WorkflowCompletedEvent) delegates to reducer and sets COMPLETED, clears currentStageId
- Test apply(WorkflowFailedEvent) delegates to reducer and sets FAILED, clears currentStageId
- Test apply(OrchestrationPausedEvent) delegates to reducer and sets PAUSED
- Test apply(OrchestrationResumedEvent) delegates to reducer and sets RUNNING
- Test apply(StageCompletedEvent) delegates to reducer and appends l2Memory entry with SUCCESS
- Test apply(StageFailedEvent) delegates to reducer and appends FAILURE entry, clears currentStageId
- Test apply(SteeringNoteAddedEvent) leaves state unchanged (unhandled event)
- Test apply(ToolInvokedEvent) leaves state unchanged (unhandled event)
- Test apply produces same result as reducer.reduce for every handled event (full equivalence)
- Test full lifecycle through projector mirrors reducer pipeline
- Run ./gradlew :testing:deterministic:test --tests RouterProjectorTest --rerun-tasks

## changed artifacts
- testing/deterministic/src/test/kotlin/RouterProjectorTest.kt (created)

## blockers
- None

## notes
- Kotlin backtick-quoted test names cannot contain dots (parsed as member access); avoided dots in test name strings
- Projector is a thin delegate over RouterReducer; tests verify both individual event paths and full equivalence with direct reducer calls
