Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(triage): add assertion for escalation failure in tests

Steven Enamakel31fa0bfe5f3a
diff --git a/crates/openhuman-core/src/triage/escalation_tests.rs b/crates/openhuman-core/src/triage/escalation_tests.rs
index e94c710c6e..13524f53e2 100644
--- a/crates/openhuman-core/src/triage/escalation_tests.rs
+++ b/crates/openhuman-core/src/triage/escalation_tests.rs
@@ -168,6 +168,13 @@ async fn react_dispatch_keeps_routing_without_creating_child_lifecycle_records()
..
} if external_id == "esc-react-inline" && target_agent == "trigger_reactor"
)));
+ assert!(!captured.iter().any(|event| matches!(
+ event,
+ DomainEvent::TriggerEscalationFailed {
+ external_id,
+ ..
+ } if external_id == "esc-react-inline"
+ )));
let child_lifecycle = runtime
.run_in(Arc::clone(runtime.context()), async {