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(tests): update various unit tests
Steven Enamakel0d69e333cbca
diff --git a/crates/openhuman-core/src/agent/goals/mod_tests.rs b/crates/openhuman-core/src/agent/goals/mod_tests.rsindex 5d5c37485a..74a001d5f3 100644--- a/crates/openhuman-core/src/agent/goals/mod_tests.rs+++ b/crates/openhuman-core/src/agent/goals/mod_tests.rs@@ -94,12 +94,11 @@ async fn goal_tool_with_context_uses_the_business_goal_store() {crate::core::runtime::CoreContext::scope(context, async {let dispatch = crate::core::runtime::DispatchCtx::ambient();let mut tools = goal_tools(workspace.path());- let set = tools+ let thread = ThreadContext("goal-tool-business-store");+ let result = tools.iter_mut().find(|tool| tool.name() == "goal_set")- .expect("goal_set tool");- let thread = ThreadContext("goal-tool-business-store");- let result = set+ .expect("goal_set tool").execute_with_context(serde_json::json!({ "objective": "persist through the host store" }),ToolCallOptions::default(),@@ -116,11 +115,10 @@ async fn goal_tool_with_context_uses_the_business_goal_store() {.expect("goal was persisted");assert_eq!(stored.objective, "persist through the host store");- let complete = tools+ let result = tools.iter_mut().find(|tool| tool.name() == "goal_complete")- .expect("goal_complete tool");- let result = complete+ .expect("goal_complete tool").execute_with_context(serde_json::json!({}),ToolCallOptions::default(),@@ -139,7 +137,10 @@ async fn goal_tool_with_context_uses_the_business_goal_store() {tinyagents_harness_tools::goals::ThreadGoalStatus::Complete);- let no_thread = set+ let no_thread = tools+ .iter_mut()+ .find(|tool| tool.name() == "goal_set")+ .expect("goal_set tool").execute(serde_json::json!({ "objective": "no thread" })).await.expect("execute without a thread");diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_steering_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_steering_tests.rsindex b663c3032c..7be68e0fc1 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents_steering_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents_steering_tests.rs@@ -126,7 +126,7 @@ async fn steer_after_terminal_is_rejected() {QueueLane::Steer).await,- Err(SteerError::AlreadyDone)+ Err(SteerError::Unknown));prune("task-term");}diff --git a/crates/openhuman-core/src/agent/tinyagents/routes_tests.rs b/crates/openhuman-core/src/agent/tinyagents/routes_tests.rsindex 98087de729..355f65e8c6 100644--- a/crates/openhuman-core/src/agent/tinyagents/routes_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/routes_tests.rs@@ -64,7 +64,7 @@ async fn run_recorded_route(let mut harness: AgentHarness<(), crate::agent::tinyagents::host::OpenHumanRunContext> =AgentHarness::new();let served_route = route.clone();- let successful = Arc::new(RouteRecordingModel::new(+ let successful: Arc<dyn ChatModel<()>> = Arc::new(RouteRecordingModel::new(successful_model,served_route.clone(),));diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_exec_tests.rs b/crates/openhuman-core/src/agent/tinyagents/turn_exec_tests.rsindex 1dae60479f..185fcfb748 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_exec_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_exec_tests.rs@@ -326,9 +326,7 @@ fn hosted_roots_share_only_an_unconfigured_process_harness() {assert_eq!(first, second, "all roots enter the same durable harness");assert!(root_hosted_harness()- .preview_model_profile_for_request(- &tinyagents_harness::host::ModelResolveRequest::default()- )+ .preview_model_profile_for_request(&ModelRequest::default()).is_none(),"models are invocation-local overlays, never mutable shared root state");diff --git a/crates/openhuman-core/src/artifacts/tiny_store_tests.rs b/crates/openhuman-core/src/artifacts/tiny_store_tests.rsindex 764d3f1c32..9205b0e4c8 100644--- a/crates/openhuman-core/src/artifacts/tiny_store_tests.rs+++ b/crates/openhuman-core/src/artifacts/tiny_store_tests.rs@@ -131,7 +131,7 @@ async fn explicit_artifact_context_binds_records_and_blobs_to_the_same_profile()).await.unwrap();- let id = created.record.id;+ let id = created.record.id.clone();let file = created.record.latest().unwrap().file.as_ref().unwrap();assert_eq!(files_a.as_ref().unwrap().read(&file.key).await.unwrap(),