Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions src/openhuman/agent/tinyagents/topology.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,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
Expand Down Expand Up @@ -103,7 +103,7 @@ mod tests {
#[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)
Expand All @@ -121,6 +121,22 @@ mod tests {
}
}

#[test]
fn all_topologies_names_do_not_collide_with_default_tools() {
let security = std::sync::Arc::new(crate::openhuman::security::SecurityPolicy::default());
let tools = crate::openhuman::tools::default_tools(security);
let tool_names: std::collections::HashSet<_> = tools.iter().map(|t| t.name()).collect();

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
);
}
}

Comment thread
coderabbitai[bot] marked this conversation as resolved.
#[test]
fn delegation_topology_names_the_revision_loop_nodes() {
let t = super::super::delegation::delegation_graph_topology().expect("builds");
Expand Down
Loading