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(tinyagents): add orchestration and topology test files
Steven Enamakelfeec1d0b2c2c
diff --git a/crates/openhuman-core/src/agent/tinyagents/orchestration_tests.rs b/crates/openhuman-core/src/agent/tinyagents/orchestration_tests.rsindex c3f524e22e..240762a7d4 100644--- a/crates/openhuman-core/src/agent/tinyagents/orchestration_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/orchestration_tests.rs@@ -1,30 +1,5 @@use super::*;-#[tokio::test]-async fn task_store_tracks_lifecycle() {- // Smoke the re-exported orchestration primitives: a task moves- // Pending → Running → Completed and is readable back by id.- let store = InMemoryTaskStore::new();- let spec = OrchestrationTaskSpec::new(- "task-1",- OrchestrationTaskKind::SubAgent {- agent: "researcher".to_string(),- },- );- let rec = store.insert(spec).expect("insert");- assert_eq!(rec.status, OrchestrationTaskStatus::Pending);-- store.mark_running(rec.task_id()).expect("running");- let done = store- .complete(rec.task_id(), OrchestrationTaskResult::text("done"))- .expect("complete");- assert_eq!(done.status, OrchestrationTaskStatus::Completed);- assert_eq!(- store.get(rec.task_id()).map(|r| r.status),- Some(OrchestrationTaskStatus::Completed)- );-}-#[test]fn steering_registry_reexport_registers_task_handles() {let registry = shared_steering_registry();diff --git a/crates/openhuman-core/src/agent/tinyagents/topology_tests.rs b/crates/openhuman-core/src/agent/tinyagents/topology_tests.rsindex ee303363d8..9fc67c8082 100644--- a/crates/openhuman-core/src/agent/tinyagents/topology_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/topology_tests.rs@@ -1,26 +1,13 @@use super::*;#[test]-fn all_topologies_includes_the_member_graph() {+fn all_topologies_includes_member_delegation_and_workflow_scheduler() {let reports = all_graph_topologies();- let member = reports- .iter()- .find(|r| r.name == "agent_teams:member")- .expect("the agent_teams member graph should be exported");-- // The member graph is a fixed, well-formed structure.- assert!(- member.ok,- "member graph should validate structurally: {:?}",- member.errors- );- assert!(member.errors.is_empty());-}--#[test]-fn all_topologies_includes_delegation_and_workflow_scheduler() {- let reports = all_graph_topologies();- for name in ["delegation", "workflow_runs:scheduler_preview"] {+ for name in [+ "agent_teams:member",+ "delegation",+ "workflow_runs:scheduler_preview",+ ] {let report = reports.iter().find(|r| r.name == name)@@ -85,39 +72,3 @@ fn all_topologies_names_do_not_collide_with_production_tools() {);}}--#[test]-fn delegation_topology_names_the_revision_loop_nodes() {- let t = tinyagents_graph::delegation::delegation_graph_topology().expect("builds");- let names: Vec<&str> = t.nodes.iter().map(|n| n.id.as_str()).collect();- for expected in ["plan", "execute", "review", "finalize"] {- assert!(- names.contains(&expected),- "missing node {expected}: {names:?}"- );- }-}--#[test]-fn member_report_renders_mermaid_and_valid_json() {- let t =- tinyagents_orchestration::teams::member_graph_topology().expect("member topology builds");- let report = describe("agent_teams:member", &t);-- // Mermaid is a flowchart with at least the entry node rendered.- assert!(- report.mermaid.contains("flowchart"),- "mermaid should be a flowchart: {}",- report.mermaid- );- assert!(!t.nodes.is_empty(), "the graph should declare nodes");-- // JSON round-trips to a value carrying the same node set.- let parsed: serde_json::Value =- serde_json::from_str(&report.json).expect("topology JSON parses");- assert!(- parsed.get("nodes").is_some(),- "serialized topology should carry its nodes: {}",- report.json- );-}