Skip to content

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

test(toolpacks): remove packed delegate reachability test

Steven Enamakel1953d5486825
diff --git a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests.rs b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests.rs
index e3e35c7bb9..66c5c498ca 100644
--- a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests.rs
+++ b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests.rs
@@ -87,65 +87,6 @@ fn find<'a>(tools: &'a [Box<dyn Tool>], name: &str) -> &'a dyn Tool {
.unwrap_or_else(|| panic!("{name} missing"))
}
-/// A shared, immutable tool registry.
-type ToolRegistry = Arc<Vec<Box<dyn Tool>>>;
-
-/// A registry split the way a real agent's is: the pack tool in the durable
-/// vector, the packed tool in the separate synthesised one.
-///
-/// This is not a contrived shape. Every `delegate_*` tool is synthesised into
-/// `OpenHumanSessionHost::synthesized_tools`, a different `Arc` from the durable registry
-/// (#6145), and seven delegates were already packed.
-fn split_registries(name: &'static str, level: PermissionLevel) -> (ToolRegistry, ToolRegistry) {
- let mut durable: Vec<Box<dyn Tool>> = Vec::new();
- append_pack_tools(&mut durable);
- let durable = Arc::new(durable);
- let synthesized: Arc<Vec<Box<dyn Tool>>> = Arc::new(vec![Box::new(FakeTool {
- name,
- level,
- external: false,
- timeout: ToolTimeout::Inherit,
- })]);
- bind_pack_registry(&durable);
- bind_synthesized_pack_registry(&durable, &synthesized);
- (durable, synthesized)
-}
-
-/// A packed **delegate** must be reachable, not merely withheld.
-///
-/// It was not. `use_skill` was bound only to the durable registry, and no
-/// `delegate_*` tool is in it — so `manage_tasks`, `setup_skills`,
-/// `build_workflow`, `discover_workflows` and `make_presentation` were all
-/// dropped from the wire and then unreachable
-/// through the route that was supposed to replace them. Withholding a tool the
-/// model then cannot call is strictly worse than never packing it.
-#[tokio::test]
-async fn a_packed_delegate_in_the_synthesised_set_is_reachable() {
- let (durable, _synthesized) = split_registries("manage_tasks", PermissionLevel::ReadOnly);
- let use_skill = find(&durable, USE_SKILL);
-
- // Disclosure half: the schema must render even though the tool is in the
- // other registry.
- let rendered = use_skill.execute(json!({"skill": "tasks"})).await.unwrap();
- assert!(!rendered.is_error, "{}", rendered.text());
- assert!(
- format!("{:?}", rendered.content).contains("manage_tasks"),
- "the pack listing omitted the synthesised delegate"
- );
-
- // Dispatch half.
- let ran = use_skill
- .execute(json!({"skill": "tasks", "tool": "manage_tasks", "args": {"marker": "x"}}))
- .await
- .unwrap();
- assert!(
- !ran.is_error,
- "packed delegate was not dispatchable: {}",
- ran.text()
- );
- assert!(format!("{:?}", ran.content).contains("marker"));
-}
-
/// Closing a goal must stay directly callable.
///
/// `goal_complete` is the one goal operation an agent reaches for reactively —