fix: address P0-4 chat zombie, P0-5 double SessionStarted, P0-6 steering wrong content

This commit is contained in:
2026-05-28 23:10:29 +04:00
parent cdee5f2245
commit eed557fe9c
8 changed files with 47 additions and 83 deletions
@@ -1,5 +1,6 @@
package com.correx.core.kernel.orchestration
import com.correx.core.events.events.ChatSessionStartedEvent
import com.correx.core.events.events.OrchestrationPausedEvent
import com.correx.core.events.events.OrchestrationResumedEvent
import com.correx.core.events.events.RetryAttemptedEvent
@@ -16,6 +17,12 @@ class DefaultOrchestrationReducer : OrchestrationReducer {
state: OrchestrationState,
event: StoredEvent,
): OrchestrationState = when (val p = event.payload) {
is ChatSessionStartedEvent -> state.copy(
workflowId = "chat",
status = OrchestrationStatus.CHAT,
currentStageId = null,
)
is WorkflowStartedEvent -> state.copy(
workflowId = p.workflowId,
status = OrchestrationStatus.RUNNING,