Skip to content

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

test(triage): update react dispatch test with runtime execution

Steven Enamakel5014525fa25f
diff --git a/crates/openhuman-core/src/triage/escalation_tests.rs b/crates/openhuman-core/src/triage/escalation_tests.rs
index 4207950b31..e3b1591020 100644
--- a/crates/openhuman-core/src/triage/escalation_tests.rs
+++ b/crates/openhuman-core/src/triage/escalation_tests.rs
@@ -98,17 +98,21 @@ async fn react_dispatch_keeps_routing_without_creating_child_lifecycle_records()
let envelope = envelope("esc-react-inline");
crate::core::bus::init().await.expect("bus init");
- apply_decision(
- &ctx,
- run_with_target(
- TriageAction::React,
- "trigger_reactor",
- "handle this trigger inline",
- ),
- &envelope,
- )
- .await
- .expect("react escalation should complete");
+ runtime
+ .run_in(
+ Arc::clone(runtime.context()),
+ apply_decision(
+ &ctx,
+ run_with_target(
+ TriageAction::React,
+ "trigger_reactor",
+ "handle this trigger inline",
+ ),
+ &envelope,
+ ),
+ )
+ .await
+ .expect("react escalation should complete");
// Prove that the requested route reached the model before checking the
// lifecycle boundary below, so a skipped dispatch cannot satisfy it.