fix(build): resolve three failing tests across integration and tui modules
SessionOrchestratorIntegrationTest: wire approvalRepository into OrchestratorRepositories constructor which gained the field in the kernel refactor. TambouiKeyMapperTest: correct ctrl-h to alt-h — the mapper has always placed ToggleApprovalOverlay under the Alt branch, not Ctrl. SessionOrchestrator.emit: replace substring(0,7) with take(7) to avoid StringIndexOutOfBoundsException when session IDs are shorter than 7 chars.
This commit is contained in:
@@ -60,8 +60,8 @@ class TambouiKeyMapperTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `ctrl-h maps to ToggleApprovalOverlay`() {
|
||||
assertEquals(KeyEvent.ToggleApprovalOverlay, mapKey(TambouiKeyEvent(KeyCode.CHAR, KeyModifiers.CTRL, 'h'.code)))
|
||||
fun `alt-h maps to ToggleApprovalOverlay`() {
|
||||
assertEquals(KeyEvent.ToggleApprovalOverlay, mapKey(TambouiKeyEvent(KeyCode.CHAR, KeyModifiers.ALT, 'h'.code)))
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+1
-1
@@ -646,7 +646,7 @@ abstract class SessionOrchestrator(
|
||||
// --- event emission ---
|
||||
|
||||
internal suspend fun emit(sessionId: SessionId, payload: EventPayload) {
|
||||
log.debug("[session {}] emitting event, payload: {}", sessionId.value.substring(0, 7), payload)
|
||||
log.debug("[session {}] emitting event, payload: {}", sessionId.value.take(7), payload)
|
||||
eventStore.append(
|
||||
NewEvent(
|
||||
metadata = EventMetadata(
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import com.correx.core.approvals.ApprovalOutcome
|
||||
import com.correx.core.approvals.ApprovalProjector
|
||||
import com.correx.core.approvals.ApprovalStatus
|
||||
import com.correx.core.approvals.DefaultApprovalReducer
|
||||
import com.correx.core.approvals.DefaultApprovalRepository
|
||||
import com.correx.core.approvals.Tier
|
||||
import com.correx.core.approvals.domain.DefaultApprovalEngine
|
||||
import com.correx.core.approvals.model.ApprovalContext
|
||||
@@ -87,12 +90,17 @@ class SessionOrchestratorIntegrationTest {
|
||||
private val riskAssessor = DefaultRiskAssessor()
|
||||
private val artifactStore = NoopArtifactStore()
|
||||
|
||||
private val approvalRepository = DefaultApprovalRepository(
|
||||
DefaultEventReplayer(eventStore, ApprovalProjector(DefaultApprovalReducer())),
|
||||
)
|
||||
|
||||
private val repositories = OrchestratorRepositories(
|
||||
eventStore = eventStore,
|
||||
inferenceRepository = inferenceRepository,
|
||||
orchestrationRepository = orchestrationRepository,
|
||||
sessionRepository = sessionRepository,
|
||||
artifactRepository = LiveArtifactRepository(eventStore, DefaultArtifactReducer()),
|
||||
approvalRepository = approvalRepository,
|
||||
)
|
||||
|
||||
private val engines = OrchestratorEngines(
|
||||
|
||||
Reference in New Issue
Block a user