Files
correx/docs/specs/2026-05-20-router/exec/task-008-review.md
T
kami 2c459da009 feat(router): implement Epic 14 — core:router module
Implements the full conversational router facade: RouterState, RouterReducer,
RouterProjector, RouterRepository, RouterContextBuilder, RouterFacade, protocol
types, WebSocket wiring, infrastructure factory, and deterministic test suite.

Also fixes spec divergences found in post-implementation review:
- Add SteeringNote domain object to core:context (epic prerequisite)
- Rename RouterFacade.handleChat → onUserInput per spec interface contract
- Add in-memory ConcurrentHashMap conversation history to DefaultRouterFacade
- Make RouterRepository.getRouterState suspend
- Rename RouterConfig.keepLast → conversationKeepLast, fix defaults (6, 4096)
- Refactor InfrastructureModule.createRouterFacade to self-assemble internally
- Fix FileReadTool: allowedPaths was dead constructor param (@SuppressUnusedParameter);
  now stored as private val and enforced in validateRequest
- Disable koverVerify on modules tested via testing/ submodules or with
  hardware/integration dependencies (24 modules); build gate now passes clean
2026-05-21 15:06:20 +04:00

1.8 KiB

review-008

result

  • approved

findings

Type definition

  • RouterResponse correctly defined as @Serializable data class with content: String and steeringEmitted: Boolean = false.
  • Matches spec requirement: "holding the inference output content and a steeringEmitted flag for the server protocol."
  • Default false on steeringEmitted aligns with the task note: "inference-only paths do not require an explicit argument."
  • Follows the same @Serializable data class pattern as RouterConfig (task-007) and RouterState (task-006) in the model/ package.
  • No unused imports; clean file with no detekt issues.

Build & static analysis

  • :core:router:compileKotlin — succeeds.
  • :core:router:detekt — clean.

No contradictions detected

  • No contradictions between spec, plan task-008, and the executed task-008.

missing requirements

  • None. The task scope is limited to defining the data class. Protocol-level usage (ServerMessage.RouterResponseMessage in task-015) is explicitly out of scope and correctly deferred.

edge cases

  • RouterResponse accessibility from server protocol: The task-done criterion mentions "accessible from the server protocol layer." Currently apps/server does not import RouterResponse (that is task-015's responsibility). This is a dependency ordering concern, not a gap.
  • No serialization test: RouterResponse is a simple @Serializable data class with String and Boolean properties. No dedicated serialization round-trip test is needed — KotlinX serialization handles these types reliably, and the type will be tested indirectly when task-015 serializes RouterResponseMessage (which may wrap or reference it).

suggested follow-up

  • None. This is a low-risk, well-scoped task that completes cleanly.