fix(apps): send workflowId not path from CLI; wire sandboxRoot and systemPromptPath in server; update prompts and fixtures
This commit is contained in:
+2
-1
@@ -4,13 +4,14 @@ import com.correx.core.validation.graph.GraphValidator
|
||||
import com.correx.core.validation.model.ValidationContext
|
||||
import com.correx.core.validation.pipeline.ValidationPipeline
|
||||
import com.correx.testing.fixtures.WorkflowFixtures
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class ValidationReportContractTest {
|
||||
|
||||
@Test
|
||||
fun `report must be deterministic`() {
|
||||
fun `report must be deterministic`(): Unit = runBlocking {
|
||||
|
||||
val graph = WorkflowFixtures.simpleGraph()
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.correx.core.validation.model.ValidationContext
|
||||
import com.correx.core.validation.transition.TransitionValidator
|
||||
import com.correx.testing.fixtures.CycleFixtures
|
||||
import com.correx.testing.fixtures.WorkflowFixtures
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
import org.junit.jupiter.api.Assertions.assertTrue
|
||||
import org.junit.jupiter.api.Test
|
||||
@@ -18,7 +19,7 @@ class GraphValidatorTest {
|
||||
private val validator = GraphValidator()
|
||||
|
||||
@Test
|
||||
fun `should detect dangling transition`() {
|
||||
fun `should detect dangling transition`(): Unit = runBlocking {
|
||||
|
||||
val graph = WorkflowFixtures.simpleGraph().copy(
|
||||
stages = mapOf(StageId("A") to StageConfig()) // B removed → dangling
|
||||
@@ -39,7 +40,7 @@ class GraphValidatorTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `should expose cycles as informational only`() {
|
||||
fun `should expose cycles as informational only`(): Unit = runBlocking {
|
||||
|
||||
val graph = WorkflowFixtures.simpleGraph()
|
||||
val cycles = listOf(CycleFixtures.simpleCycle())
|
||||
@@ -66,7 +67,7 @@ class GraphValidatorTest {
|
||||
)
|
||||
|
||||
@Test
|
||||
fun `should be deterministic`() {
|
||||
fun `should be deterministic`(): Unit = runBlocking {
|
||||
|
||||
val graph = WorkflowFixtures.simpleGraph()
|
||||
|
||||
@@ -82,7 +83,7 @@ class GraphValidatorTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `should flag non-deterministic order when two edges share same from and to`() {
|
||||
fun `should flag non-deterministic order when two edges share same from and to`(): Unit = runBlocking {
|
||||
|
||||
val a = StageId("A")
|
||||
val b = StageId("B")
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.correx.core.validation.pipeline.ValidationOutcome
|
||||
import com.correx.core.validation.pipeline.ValidationPipeline
|
||||
import com.correx.core.validation.pipeline.Validator
|
||||
import com.correx.testing.fixtures.WorkflowFixtures
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
import org.junit.jupiter.api.Assertions.assertFalse
|
||||
import org.junit.jupiter.api.Test
|
||||
@@ -22,7 +23,7 @@ class ValidationPipelineShortCircuitTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `pipeline stops after first validator with errors and report contains only that section`() {
|
||||
fun `pipeline stops after first validator with errors and report contains only that section`(): Unit = runBlocking {
|
||||
var secondCalled = false
|
||||
val trackingValidator = Validator { _ ->
|
||||
secondCalled = true
|
||||
@@ -38,7 +39,7 @@ class ValidationPipelineShortCircuitTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `warnings do not short-circuit the pipeline`() {
|
||||
fun `warnings do not short-circuit the pipeline`(): Unit = runBlocking {
|
||||
var secondCalled = false
|
||||
|
||||
val warningValidator = Validator { _ ->
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.correx.core.validation.semantic.rules.CyclePolicyBindingRule
|
||||
import com.correx.core.validation.transition.TransitionValidator
|
||||
import com.correx.testing.fixtures.CycleFixtures
|
||||
import com.correx.testing.fixtures.WorkflowFixtures
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.junit.jupiter.api.Assertions.assertFalse
|
||||
import org.junit.jupiter.api.Assertions.assertInstanceOf
|
||||
import org.junit.jupiter.api.Test
|
||||
@@ -34,7 +35,7 @@ class ValidationPipelineIntegrationTest {
|
||||
)
|
||||
|
||||
@Test
|
||||
fun `full validation pipeline returns NeedsApproval when cycles are unbound`() {
|
||||
fun `full validation pipeline returns NeedsApproval when cycles are unbound`(): Unit = runBlocking {
|
||||
|
||||
val graph = WorkflowFixtures.simpleGraph()
|
||||
|
||||
@@ -52,7 +53,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`(): Unit = runBlocking {
|
||||
// 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")
|
||||
|
||||
@@ -4,13 +4,14 @@ import com.correx.core.validation.model.ValidationContext
|
||||
import com.correx.core.validation.pipeline.ValidationPipeline
|
||||
import com.correx.core.validation.transition.TransitionValidator
|
||||
import com.correx.testing.fixtures.WorkflowFixtures
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.junit.jupiter.api.Assertions.assertTrue
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class ValidationReplayTest {
|
||||
|
||||
@Test
|
||||
fun `validation must be replay deterministic`() {
|
||||
fun `validation must be replay deterministic`(): Unit = runBlocking {
|
||||
|
||||
val graph = WorkflowFixtures.simpleGraph()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user