Skip to content

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

test: align orchestrator routing tests with shared spawn tool

Steven Enamakel8ea15639ad0f
diff --git a/tests/in_process/agent_prompt_comprehension_e2e.rs b/tests/in_process/agent_prompt_comprehension_e2e.rs
index ccaf916b17..aa492ce4f1 100644
--- a/tests/in_process/agent_prompt_comprehension_e2e.rs
+++ b/tests/in_process/agent_prompt_comprehension_e2e.rs
@@ -1040,29 +1040,9 @@ fn orchestrator_prompt_names_only_discoverable_delegates() {
.expect("no orchestrator request captured");
let prompt = system_text(orchestrator);
let belt = advertised_tool_names(orchestrator);
- let request_text = orchestrator.to_string();
- // Validate the built-in contract independently of the process-global
- // registry, which other integration tests may initialise first.
- let registry = AgentDefinitionRegistry::builtins_only();
-
- let undiscoverable: Vec<String> = registry
- .list()
- .into_iter()
- .filter_map(|def| def.delegate_name.clone())
- .filter(|name| prompt.contains(&format!("`{name}`")))
- .filter(|name| {
- let advertised = belt.iter().any(|b| b == name);
- let packed =
- openhuman_core::tools::toolpacks::pack_for_tool(name).is_some_and(|pack| {
- belt.iter().any(|b| b == "use_skill") && request_text.contains(pack.id)
- });
- !advertised && !packed
- })
- .collect();
assert!(
- undiscoverable.is_empty(),
- "the orchestrator prompt names delegates the model cannot find: {undiscoverable:?}; \
- advertised {belt:?}"
+ belt.iter().any(|name| name == "spawn_subagent"),
+ "specialist routing requires the shared spawn tool; advertised {belt:?}; prompt: {prompt}"
);
});
}
diff --git a/tests/in_process/orchestrator_presentation_wiring.rs b/tests/in_process/orchestrator_presentation_wiring.rs
index 9fb6cee710..dc8c45b05b 100644
--- a/tests/in_process/orchestrator_presentation_wiring.rs
+++ b/tests/in_process/orchestrator_presentation_wiring.rs
@@ -1,4 +1,4 @@
-//! Pins presentation delegation wiring.
+//! Pins presentation specialist routing.
//!
//! Two invariants:
//!
@@ -34,7 +34,7 @@ fn lists_named_tool(toml: &str, name: &str) -> bool {
}
#[test]
-fn orchestrator_delegates_presentation_generation() {
+fn orchestrator_allows_presentation_agent_for_shared_spawn() {
assert!(
lists_named_tool(ORCHESTRATOR_TOML, "presentation_agent"),
"orchestrator must expose presentation_agent through subagents"
@@ -68,8 +68,8 @@ fn presentation_agent_lists_generate_presentation_and_grounding_tools() {
"presentation_agent must not expose the legacy call_memory_agent tool"
);
assert!(
- PRESENTATION_AGENT_TOML.contains("delegate_name = \"make_presentation\""),
- "presentation_agent must expose the make_presentation delegate tool"
+ !PRESENTATION_AGENT_TOML.contains("delegate_name ="),
+ "specialist definitions must not declare legacy delegate aliases"
);
}
diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rs
index ddb327a840..bee7ee238c 100644
--- a/tests/json_rpc_e2e.rs
+++ b/tests/json_rpc_e2e.rs
@@ -3863,7 +3863,7 @@ async fn json_rpc_run_ledger_lifecycle() {
worker_thread_id: Some("worker-1".to_string()),
checkpoint_path: Some("/tmp/sub-run-1.json".to_string()),
checkpoint: Some(json!({
- "resumeTool": "continue_subagent",
+ "resumeTool": "spawn_subagent",
"taskId": "sub-run-1"
})),
summary: Some("Which repo should I inspect?".to_string()),