epic-13: add cli and tui entry point, finish epic.
This commit is contained in:
@@ -14,7 +14,7 @@ class ValidationPipelineShortCircuitTest {
|
||||
|
||||
private val context = ValidationContext(WorkflowFixtures.simpleGraph())
|
||||
|
||||
private fun errorValidator(name: String) = Validator { _ ->
|
||||
private fun errorValidator(name: String = "first") = Validator { _ ->
|
||||
ValidationSection(
|
||||
name = name,
|
||||
issues = listOf(ValidationIssue("ERR", "failure", ValidationSeverity.ERROR))
|
||||
@@ -29,7 +29,7 @@ class ValidationPipelineShortCircuitTest {
|
||||
ValidationSection(name = "second")
|
||||
}
|
||||
|
||||
val pipeline = ValidationPipeline(listOf(errorValidator("first"), trackingValidator))
|
||||
val pipeline = ValidationPipeline(listOf(errorValidator(), trackingValidator))
|
||||
val outcome = pipeline.validate(context) as ValidationOutcome.Rejected
|
||||
|
||||
assertFalse(secondCalled, "second validator must not run after a rejection")
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.correx.testing.fixtures
|
||||
|
||||
import com.correx.core.context.model.ContextPack
|
||||
import com.correx.core.events.events.EventMetadata
|
||||
import com.correx.core.events.events.InferenceCompletedEvent
|
||||
import com.correx.core.events.events.NewEvent
|
||||
import com.correx.core.events.types.ContextPackId
|
||||
import com.correx.core.events.types.EventId
|
||||
import com.correx.core.events.types.InferenceRequestId
|
||||
import com.correx.core.events.types.ProviderId
|
||||
import com.correx.core.events.types.SessionId
|
||||
@@ -126,9 +128,9 @@ object InferenceFixtures {
|
||||
tokensUsed: TokenUsage,
|
||||
latencyMs: Long,
|
||||
): NewEvent {
|
||||
return com.correx.core.events.events.NewEvent(
|
||||
metadata = com.correx.core.events.events.EventMetadata(
|
||||
eventId = com.correx.core.events.types.EventId("inf-$requestId"),
|
||||
return NewEvent(
|
||||
metadata = EventMetadata(
|
||||
eventId = EventId("inf-$requestId"),
|
||||
sessionId = sessionId,
|
||||
timestamp = Clock.System.now(),
|
||||
schemaVersion = 1,
|
||||
|
||||
@@ -66,7 +66,7 @@ class SessionOrchestratorIntegrationTest {
|
||||
val orchestrationRepository = OrchestrationRepository(orchestrationReplayer)
|
||||
private val inferenceRepository = InferenceRepository(
|
||||
object : EventReplayer<InferenceState> {
|
||||
override fun rebuild(sessionId: com.correx.core.events.types.SessionId) = InferenceState()
|
||||
override fun rebuild(sessionId: SessionId) = InferenceState()
|
||||
},
|
||||
)
|
||||
private val riskAssessor = DefaultRiskAssessor()
|
||||
@@ -270,7 +270,7 @@ class SessionOrchestratorIntegrationTest {
|
||||
val sessionId = SessionId("s7")
|
||||
|
||||
val ex = org.junit.jupiter.api.Assertions.assertThrows(IllegalArgumentException::class.java) {
|
||||
kotlinx.coroutines.runBlocking { orchestrator.run(sessionId, brokenGraph, config) }
|
||||
runBlocking { orchestrator.run(sessionId, brokenGraph, config) }
|
||||
}
|
||||
assertTrue(ex.message?.contains("ghost") == true, "Expected message to mention 'ghost', got: ${ex.message}")
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class ValidationPipelineIntegrationTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `rejected outcome retryable is false — set by validator, not orchestrator`() {
|
||||
fun `rejected outcome retryable is false - set by validator, not orchestrator`() {
|
||||
// A dangling transition triggers GraphValidator ERROR → Rejected(retryable=false).
|
||||
// Ownership rule: the validator sets retryable; the orchestrator must only read it.
|
||||
val a = StageId("A")
|
||||
|
||||
Reference in New Issue
Block a user