The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(flows): thread dispatch context through resolver tests
Steven Enamakelad9cb6f4ef08
diff --git a/crates/openhuman-core/src/flows/ops_engine_compatibility_tests.rs b/crates/openhuman-core/src/flows/ops_engine_compatibility_tests.rsindex 512a1c4659..f0e1344926 100644--- a/crates/openhuman-core/src/flows/ops_engine_compatibility_tests.rs+++ b/crates/openhuman-core/src/flows/ops_engine_compatibility_tests.rs@@ -13,7 +13,12 @@ async fn resolver_lookup_rejects_an_incompatible_saved_child() {).unwrap();- let error = load_engine_compatible_flow_graph(&config, &child.id).await+ let error = load_engine_compatible_flow_graph(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ &child.id,+ )+ .await.expect_err("resolver lookup must reject an unsafe legacy child");assert!(error.contains(UNSUPPORTED_NESTED_CONDITIONAL_FAN_IN),@@ -43,7 +48,12 @@ async fn resolver_lookup_rejects_an_incompatible_saved_grandchild() {).unwrap();- let error = load_engine_compatible_flow_graph(&config, &child.id).await+ let error = load_engine_compatible_flow_graph(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ &child.id,+ )+ .await.expect_err("resolver lookup must reject an unsafe saved grandchild");assert!(error.contains(UNSUPPORTED_NESTED_CONDITIONAL_FAN_IN),diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/ops_tier_gate_and_timeouts_tests.rs b/crates/openhuman-core/src/flows/tinyflows/caps/ops_tier_gate_and_timeouts_tests.rsindex 476f84bcd2..199edc2192 100644--- a/crates/openhuman-core/src/flows/tinyflows/caps/ops_tier_gate_and_timeouts_tests.rs+++ b/crates/openhuman-core/src/flows/tinyflows/caps/ops_tier_gate_and_timeouts_tests.rs@@ -423,6 +423,7 @@ async fn resolver_loads_saved_flow_graph_by_id() {let flow_id = flow.value.id.clone();let resolver = OpenHumanWorkflowResolver {+ ctx: crate::core::runtime::DispatchCtx::ambient(),config: config.clone(),};let graph = resolver@@ -439,7 +440,10 @@ async fn resolver_loads_saved_flow_graph_by_id() {async fn resolver_unknown_id_is_a_capability_error() {let tmp = tempfile::TempDir::new().unwrap();let config = Arc::new(resolver_test_config(&tmp));- let resolver = OpenHumanWorkflowResolver { config };+ let resolver = OpenHumanWorkflowResolver {+ ctx: crate::core::runtime::DispatchCtx::ambient(),+ config,+ };let err = resolver.resolve("does-not-exist")@@ -498,7 +502,10 @@ async fn resolver_rejects_an_engine_incompatible_saved_graph() {).unwrap();- let error = OpenHumanWorkflowResolver { config }+ let error = OpenHumanWorkflowResolver {+ ctx: crate::core::runtime::DispatchCtx::ambient(),+ config,+ }.resolve(&flow.id).await.expect_err("resolver must reject an incompatible legacy child");