Skip to content

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

fix(agent): resolve file-split conflict and test collision against production tools

Dr Shivakumara B.V.66764c856c9b
diff --git a/src/openhuman/agent/tinyagents/topology.rs b/src/openhuman/agent/tinyagents/topology.rs
index de5d94963b..474204548c 100644
--- a/src/openhuman/agent/tinyagents/topology.rs
+++ b/src/openhuman/agent/tinyagents/topology.rs
@@ -66,7 +66,7 @@ pub(crate) fn all_graph_topologies() -> Vec<GraphTopologyReport> {
crate::openhuman::agent::orchestration::spawn_parallel_graph::spawn_parallel_graph_topology(
)
{
- out.push(describe("spawn_parallel_agents", &t));
+ out.push(describe("spawn_parallel_graph", &t));
}
// Not exported: generic item-count-driven `map_reduce` fan-outs whose node
diff --git a/src/openhuman/agent/tinyagents/topology_tests.rs b/src/openhuman/agent/tinyagents/topology_tests.rs
index dd328a7f79..404fd0a1f1 100644
--- a/src/openhuman/agent/tinyagents/topology_tests.rs
+++ b/src/openhuman/agent/tinyagents/topology_tests.rs
@@ -20,7 +20,11 @@ fn all_topologies_includes_the_member_graph() {
#[test]
fn all_topologies_includes_delegation_and_workflow_scheduler() {
let reports = all_graph_topologies();
- for name in ["delegation", "workflow_runs:scheduler"] {
+ for name in [
+ "delegation",
+ "workflow_runs:scheduler",
+ "spawn_parallel_graph",
+ ] {
let report = reports
.iter()
.find(|r| r.name == name)
@@ -38,6 +42,54 @@ fn all_topologies_includes_delegation_and_workflow_scheduler() {
}
}
+#[test]
+fn all_topologies_names_do_not_collide_with_production_tools() {
+ let tmp = tempfile::tempdir().expect("create tempdir");
+ let config = std::sync::Arc::new(crate::openhuman::config::Config::default());
+ let security = std::sync::Arc::new(crate::openhuman::security::SecurityPolicy::default());
+ let audit = std::sync::Arc::new(
+ crate::openhuman::security::AuditLogger::new(
+ crate::openhuman::config::AuditConfig {
+ enabled: false,
+ log_path: "audit.log".into(),
+ max_size_mb: 10,
+ },
+ tmp.path().to_path_buf(),
+ )
+ .expect("create audit logger"),
+ );
+ let browser = crate::openhuman::config::BrowserConfig::default();
+ let http = crate::openhuman::config::HttpRequestConfig::default();
+ let agents = std::collections::HashMap::new();
+
+ let tools = crate::openhuman::tools::all_tools(
+ config.clone(),
+ &security,
+ audit,
+ &browser,
+ &http,
+ tmp.path(),
+ &agents,
+ &config,
+ );
+ let tool_names: std::collections::HashSet<_> = tools.iter().map(|t| t.name()).collect();
+
+ // Verify runtime tool `spawn_parallel_agents` is present in the checked tool set
+ assert!(
+ tool_names.contains("spawn_parallel_agents"),
+ "expected spawn_parallel_agents in production all_tools registration"
+ );
+
+ let reports = all_graph_topologies();
+ for report in &reports {
+ assert!(
+ !tool_names.contains(report.name),
+ "graph name '{}' collides with registered tool of the same name",
+ report.name
+ );
+ }
+}
+
#[test]
fn delegation_topology_names_the_revision_loop_nodes() {
let t = super::super::delegation::delegation_graph_topology().expect("builds");