fix(narration): use plan_rejected kind and include source in instruction
This commit is contained in:
@@ -68,7 +68,7 @@ class NarrationSubscriber(
|
||||
)
|
||||
is ExecutionPlanRejectedEvent -> enqueue(
|
||||
sid,
|
||||
NarrationTrigger(kind = "execution_plan_rejected", instruction = "The execution plan was rejected: ${p.reason}. Explain to the user what happened and what they can do next."),
|
||||
NarrationTrigger(kind = "plan_rejected", instruction = "The execution plan was rejected (${p.source}): ${p.reason}. Explain to the user what happened and what they can do next."),
|
||||
)
|
||||
is OrchestrationPausedEvent -> enqueue(
|
||||
sid,
|
||||
|
||||
+5
-1
@@ -221,10 +221,14 @@ class NarrationSubscriberTest {
|
||||
}
|
||||
|
||||
assertEquals(1, facade.calls.size)
|
||||
assertEquals("execution_plan_rejected", facade.calls[0].second.kind)
|
||||
assertEquals("plan_rejected", facade.calls[0].second.kind)
|
||||
assertTrue(
|
||||
facade.calls[0].second.instruction.contains("Missing required artifact"),
|
||||
"instruction must include the rejection reason",
|
||||
)
|
||||
assertTrue(
|
||||
facade.calls[0].second.instruction.contains("missing_content"),
|
||||
"instruction must include the source",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user