feat(server): intent input channel — StartSession.input seeds decision journal
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import com.correx.core.events.events.InitialIntentEvent
|
||||
import com.correx.core.events.events.SteeringNoteAddedEvent
|
||||
import com.correx.core.events.events.TransitionExecutedEvent
|
||||
import com.correx.core.events.types.SessionId
|
||||
@@ -35,6 +36,17 @@ class DecisionJournalProjectorTest {
|
||||
assertEquals(DecisionKind.TRANSITION, s.records[1].kind)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `initial intent becomes a journal record`() {
|
||||
val s = projector.apply(
|
||||
projector.initial(),
|
||||
stored(payload = InitialIntentEvent(SessionId("x"), "add auth layer"), sequence = 1L),
|
||||
)
|
||||
assertEquals(1, s.records.size)
|
||||
assertEquals(DecisionKind.INTENT, s.records[0].kind)
|
||||
assertEquals("Goal: add auth layer", s.records[0].summary)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `unrelated events are ignored`() {
|
||||
val s0 = projector.initial()
|
||||
|
||||
Reference in New Issue
Block a user