Skip to content

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

test(builder): remove memory v1 tool references from wildcard tests

Steven Enamakeld63501ba14c8
diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_exposure_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_exposure_tests.rs
index c91783ef14..a7ccdb5d01 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_exposure_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_exposure_tests.rs
@@ -35,10 +35,8 @@ fn resetting_wildcard_visibility_keeps_collapsed_exposure() {
agent.set_visible_tool_names(std::collections::HashSet::new());
let visible = agent.visible_tool_specs_arc();
- assert!(visible
- .iter()
- .any(|spec| spec.name == crate::memory::tools::MEMORY_TOOL_NAME));
- assert!(!visible.iter().any(|spec| spec.name == "memory_store"));
+ assert!(visible.iter().any(|spec| spec.name == "todo"));
+ assert!(!visible.iter().any(|spec| spec.name.starts_with("todo_")));
}
#[test]
@@ -51,43 +49,37 @@ fn hiding_and_reseeding_wildcard_visibility_keeps_collapsed_exposure() {
.expect("build wildcard agent");
agent.set_visible_tool_names(std::collections::HashSet::new());
- agent.hide_tools(&[crate::memory::tools::MEMORY_TOOL_NAME]);
+ agent.hide_tools(&["todo"]);
let visible = agent.visible_tool_specs_arc();
- assert!(!visible
- .iter()
- .any(|spec| spec.name == crate::memory::tools::MEMORY_TOOL_NAME));
- assert!(!visible.iter().any(|spec| spec.name == "memory_store"));
+ assert!(!visible.iter().any(|spec| spec.name == "todo"));
+ assert!(!visible.iter().any(|spec| spec.name.starts_with("todo_")));
}
/// A wildcard belt advertises the collapsed tool, never its `Hidden` members.
///
/// Both halves are asserted: the members gone AND the replacement present. A
-/// belt that lost the memory surface entirely would pass a members-only check.
-/// Regressed silently once already — `4efbea728` unregistered `memory` and
-/// dropped the only production call to `strip_deferred_from_visible`, so every
-/// wildcard agent shipped all eleven `memory_*` schemas plus `todo` beside the
-/// eight `todo_*` tools it replaces.
+/// belt that lost the surface entirely would pass a members-only check.
+/// Regressed silently once already — `4efbea728` dropped the only production
+/// call to `strip_deferred_from_visible`, so every wildcard agent shipped
+/// `todo` beside the eight `todo_*` tools it replaces. The v1 `memory_*` tool
+/// family is gone for good (memory v2 has one `memory` tool, registered only
+/// while an engine is usable); none of it may come back.
#[test]
fn wildcard_belt_advertises_collapsed_tools_not_their_hidden_members() {
let visible = visible_names_for(&super::wildcard_probe_def());
- for collapsed in [crate::memory::tools::MEMORY_TOOL_NAME, "todo"] {
- assert!(
- visible.contains(collapsed),
- "wildcard belt must advertise `{collapsed}`; got {visible:?}"
- );
- }
+ assert!(
+ visible.contains("todo"),
+ "wildcard belt must advertise `todo`; got {visible:?}"
+ );
let leaked: Vec<&String> = visible
.iter()
- .filter(|name| {
- (name.starts_with("memory_") && name.as_str() != "memory_tree")
- || name.starts_with("todo_")
- })
+ .filter(|name| name.starts_with("memory_") || name.starts_with("todo_"))
.collect();
assert!(
leaked.is_empty(),
- "Hidden members of `memory`/`todo` must not ship beside them: {leaked:?}"
+ "`todo_*` members and v1 `memory_*` tools must not ship: {leaked:?}"
);
}