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(orchestration): add coverage for subagent and session host paths
Steven Enamakelfe00eb57a96b
diff --git a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime_tests.rs b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime_tests.rsindex 9245e4578f..a6216b4e35 100644--- a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime_tests.rs@@ -80,8 +80,9 @@ fn mock_parent(model: Arc<dyn ChatModel<()>>) -> ParentExecutionContext {session_parent_prefix: None,on_progress: None,run_queue: None,+ },+ host_env: Default::default(),}-}fn test_config() -> (tempfile::TempDir, Config) {let dir = tempfile::tempdir().expect("tempdir");diff --git a/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs b/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rsindex 51d2385189..9bff64d59a 100644--- a/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs+++ b/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs@@ -119,6 +119,7 @@ pub(crate) async fn build_root_parent(session_parent_prefix: agent.session_parent_prefix().map(str::to_string),on_progress: None,run_queue: None,+ host_env: Default::default(),})}diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rsindex a094c6e503..fedaf2f641 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs@@ -276,6 +276,7 @@ async fn unscoped_async_spawn_refuses_before_persisting_a_running_session() {session_parent_prefix: None,on_progress: None,run_queue: None,+ host_env: Default::default(),};let run = crate::agent::tinyagents::host::OpenHumanRunContext::new().with_parent(parent)diff --git a/crates/openhuman-core/src/agent/orchestration/tools/close_subagent_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/close_subagent_tests.rsindex 5ddf158380..e31daff6ec 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/close_subagent_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/close_subagent_tests.rs@@ -127,5 +127,6 @@ fn parent_context(workspace_dir: &Path) -> ParentExecutionContext {session_parent_prefix: None,on_progress: None,run_queue: None,+ },+ host_env: Default::default(),}-}diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rsindex a4c01eacd0..7a872e0073 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs@@ -586,8 +586,9 @@ fn parent_context(workspace_dir: &Path) -> ParentExecutionContext {session_parent_prefix: None,on_progress: None,run_queue: None,+ },+ host_env: Default::default(),}-}/// The session builder swaps in a scoped instance so the WIRE schema (read/// from the registered tool on native tool calling) carries only the ids thediff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rsindex 354e11155e..f4940eb20b 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs@@ -90,8 +90,9 @@ fn parent_context_with_tools() -> ParentExecutionContext {let mut parent = parent_context(max_parallel_tools);parent.all_tools = Arc::new(tools);- parent-}+ parent,+ host_env: Default::default(),+ }/// The live harness does not recover ambient cancellation. Its typed/// dispatch receives the parent `RunContext`, so an already-cancelled parent@@ -639,8 +640,9 @@ async fn agent_turn_runs_long_parallel_subagent_flow_with_many_nested_tool_callsfn parent_admitting(ids: &[&str], tools: Vec<Box<dyn Tool>>) -> ParentExecutionContext {let mut parent = parent_context_with_tools(8, tools);parent.allowed_subagent_ids = ids.iter().map(|id| id.to_string()).collect();- parent-}+ parent,+ host_env: Default::default(),+ }/// Helper: the single write-capable tool the dispatch fixtures share.fn write_fixture_tools() -> Vec<Box<dyn Tool>> {diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread_tests.rsindex e08dca1ed0..bab959bb15 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread_tests.rs@@ -37,8 +37,9 @@ fn test_parent_ctx(workspace_dir: PathBuf) -> ParentExecutionContext {run_queue: None,agent_config: crate::config::AgentConfig::default(),tool_call_format: tinytools_agent::dialect::ToolCallFormat::Native,+ },+ host_env: Default::default(),}-}#[tokio::test]async fn rejects_if_already_worker_thread() {diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rsindex d8f5aecec6..a15baaec2a 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs@@ -504,8 +504,9 @@ fn parent_context(session_parent_prefix: None,on_progress: None,run_queue: None,+ },+ host_env: Default::default(),}-}struct ScriptedModel {responses: Vec<(&'static str, &'static str)>,diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session.rs b/crates/openhuman-core/src/agent/session_host/runtime_session.rsindex 3a6fbd6deb..25faf7b267 100644--- a/crates/openhuman-core/src/agent/session_host/runtime_session.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime_session.rs@@ -551,7 +551,8 @@ impl OpenHumanTurnPrelude {session_parent_prefix: self.session_parent_prefix.clone(),on_progress: self.on_progress.clone(),run_queue: self.run_queue.clone(),- }+ },+ host_env: Default::default(),}fn apply_pending_announcements(&self, enriched: &mut String) {diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests.rsindex 2df4160b38..d589fefcce 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests.rs@@ -280,8 +280,9 @@ fn make_parent(session_parent_prefix: None,on_progress: None,run_queue: None,+ },+ host_env: Default::default(),}-}// ── Runtime spawn-hierarchy (tier) gate (issue #4098) ───────────────────────// `tier_gate_decision` is the pure decision the runtime gate in `run_subagent`diff --git a/crates/openhuman-core/src/agent/tinyagents/host/run_context_tests.rs b/crates/openhuman-core/src/agent/tinyagents/host/run_context_tests.rsindex df9895798d..9890efcefd 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/run_context_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/run_context_tests.rs@@ -266,8 +266,9 @@ fn stale_parent_snapshot() -> ParentExecutionContext {session_parent_prefix: None,on_progress: None,run_queue: None,+ },+ host_env: Default::default(),}-}/// Round-trips one real `SubagentSpawned` through `sink` and asserts it lands/// on `rx`, the receiver belonging to the run whose sink the bind was supposeddiff --git a/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs b/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rsindex 1f48c73bb3..5cba1f00d0 100644--- a/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs@@ -116,8 +116,9 @@ fn parent_execution_context(workspace_dir: &Path) -> ParentExecutionContext {session_parent_prefix: None,on_progress: None,run_queue: None,+ },+ host_env: Default::default(),}-}/// Builds the `use_skill` registration exactly as/// `register_turn_tools_and_agents` does: a durable registry containing thediff --git a/crates/openhuman-core/src/agent/tools/todo_tests.rs b/crates/openhuman-core/src/agent/tools/todo_tests.rsindex 7b3edba90c..367256f877 100644--- a/crates/openhuman-core/src/agent/tools/todo_tests.rs+++ b/crates/openhuman-core/src/agent/tools/todo_tests.rs@@ -153,6 +153,7 @@ fn every_agent_binds_to_its_own_thread() {session_parent_prefix: None,on_progress: None,run_queue: None,+ host_env: Default::default(),};assert_eq!(@@ -211,6 +212,7 @@ async fn a_legacy_session_keyed_list_is_migrated_forward_once() {session_parent_prefix: None,on_progress: None,run_queue: None,+ host_env: Default::default(),};// Seed the legacy session-keyed list directly through the store, as if a