Skip to content

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

test(tests): update tool related tests for consistency

Steven Enamakelc861842f89e9
diff --git a/crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs b/crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs
index 09a8a7fca0..9011799c7f 100644
--- a/crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs
@@ -10,10 +10,7 @@ fn the_single_openhuman_spawn_tool_is_protected_from_nested_runs() {
#[test]
fn child_tool_surface_never_contains_any_spawn_or_continuation_tool() {
- let spawn_names = tinyagents_definition::SPAWN_TOOL_NAMES
- .iter()
- .copied()
- .collect::<Vec<_>>();
+ let spawn_names = tinyagents_definition::SPAWN_TOOL_NAMES.to_vec();
for name in &spawn_names {
assert!(
crate::agent::tinyagents::is_subagent_spawn_tool(name),
diff --git a/crates/openhuman-core/src/agent_registry/agents/loader_tests_builtin_registration_tests.rs b/crates/openhuman-core/src/agent_registry/agents/loader_tests_builtin_registration_tests.rs
index d33cf33ba4..709ec71f45 100644
--- a/crates/openhuman-core/src/agent_registry/agents/loader_tests_builtin_registration_tests.rs
+++ b/crates/openhuman-core/src/agent_registry/agents/loader_tests_builtin_registration_tests.rs
@@ -246,12 +246,10 @@ fn master_agent_has_coding_hint_and_named_tools() {
match def.tools {
ToolScope::Named(tools) => {
// Specialist routing uses the single asynchronous spawn tool.
- for required in ["spawn_subagent"] {
- assert!(
- tools.iter().any(|t| t == required),
- "orchestrator must have sub-agent tool `{required}`"
- );
- }
+ assert!(
+ tools.iter().any(|t| t == "spawn_subagent"),
+ "orchestrator must have the asynchronous sub-agent tool"
+ );
// The collection/fan-out/fleet surface these replaced. Each was
// either a second way to say "spawn again" or a way to stall
// the turn waiting for a result that arrives on its own.
diff --git a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs
index 43721948d3..8f6344c204 100644
--- a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs
+++ b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs
@@ -277,7 +277,7 @@ fn a_listing_with_nothing_callable_names_the_route_out() {
"workflows",
&handle,
&|_| false,
- &route,
+ route,
)
.expect_err("nothing callable must not render a menu");