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): tidy copilot bus and tinyflows test helpers
Steven Enamakel6284704e400f
diff --git a/crates/openhuman-core/src/flows/copilot_bus_tests.rs b/crates/openhuman-core/src/flows/copilot_bus_tests.rsindex f7600b1677..3e4a411cff 100644--- a/crates/openhuman-core/src/flows/copilot_bus_tests.rs+++ b/crates/openhuman-core/src/flows/copilot_bus_tests.rs@@ -47,11 +47,11 @@ async fn model_arguments_cannot_replace_the_scoped_host_callback_address() {}fn tool_context(- core: Arc<crate::core::runtime::CoreContext>,+ core: &Arc<crate::core::runtime::CoreContext>,id: &str,) -> tinyagents_harness::tool::ToolExecutionContext {let run = crate::agent::tinyagents::host::run_context::OpenHumanRunContext::new()- .with_core(Some(core))+ .with_core(Some(Arc::clone(core))).into_tinyagents(tinyagents_harness::context::RunConfig::new(id));tinyagents_harness::tool::ToolExecutionContext::from_run_context(&run,@@ -90,14 +90,9 @@ async fn concurrent_tool_callbacks_keep_each_explicit_profile_scope() {let graph = graph.clone();let name = name.to_string();CoreContext::scope(context.clone(), async move {- crate::flows::ops::flows_create(- &config,- name,- graph,- false,- )- .await- .expect("profile flow creation");+ crate::flows::ops::flows_create(&config, name, graph, false)+ .await+ .expect("profile flow creation");}).await;}@@ -106,8 +101,8 @@ async fn concurrent_tool_callbacks_keep_each_explicit_profile_scope() {let tool = catalog.tool("list_flows").expect("list_flows is catalogued");- let alice_call = tool_context(alice, "copilot-alice");- let bob_call = tool_context(bob, "copilot-bob");+ let alice_call = tool_context(&alice, "copilot-alice");+ let bob_call = tool_context(&bob, "copilot-bob");let alice_future = tool.execute_with_context(json!({}),tinytools::ToolCallOptions::default(),diff --git a/crates/openhuman-core/src/modules/tinyflows_tests.rs b/crates/openhuman-core/src/modules/tinyflows_tests.rsindex f7ca1c80bd..7a45499be2 100644--- a/crates/openhuman-core/src/modules/tinyflows_tests.rs+++ b/crates/openhuman-core/src/modules/tinyflows_tests.rs@@ -154,7 +154,7 @@ async fn cancelling_partial_callback_registration_unserves_and_releases_its_contlet path = format!("/ai/tinyhumans/openhuman/TestRegistration/{}",- uuid::Uuid::new_v4()+ uuid::Uuid::new_v4().simple());let dropped = Arc::new(tokio::sync::Notify::new());let context = Arc::new(());@@ -192,10 +192,7 @@ async fn cancelling_partial_callback_registration_unserves_and_releases_its_cont"ai.tinyhumans.openhuman.TestRegistration",).expect("probe proxy");- assert!(proxy- .call::<serde_json::Value>("Ping", ())- .await- .is_ok());+ assert!(proxy.call::<serde_json::Value>("Ping", ()).await.is_ok());registration.abort();let cleanup = dropped.notified();@@ -208,8 +205,5 @@ async fn cancelling_partial_callback_registration_unserves_and_releases_its_contweak_context.upgrade().is_none(),"callback context is released");- assert!(proxy- .call::<serde_json::Value>("Ping", ())- .await- .is_err());+ assert!(proxy.call::<serde_json::Value>("Ping", ()).await.is_err());}