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
fix(test): correct test assertions for collapsed memory tools
Steven Enamakel42132e7c2516
diff --git a/crates/openhuman-core/src/memory/tools/collapsed_tests.rs b/crates/openhuman-core/src/memory/tools/collapsed_tests.rsindex 25c5b6dcdc..6d70a1e4e6 100644--- a/crates/openhuman-core/src/memory/tools/collapsed_tests.rs+++ b/crates/openhuman-core/src/memory/tools/collapsed_tests.rs@@ -151,18 +151,14 @@ fn forget_takes_the_key_as_text_and_defaults_the_namespace() {}#[test]-fn advertised_actions_reads_the_schema_enum_and_ignores_other_tools() {+fn advertised_actions_match_the_actions_the_tool_serves() {let memory = tool();- let listed = advertised_actions(&memory);- assert!(- listed.iter().any(|a| a == ACTION_LEARN)- == memory.actions().iter().any(|e| e.action == ACTION_LEARN)- );- assert!(- listed.len() <= 4 && !listed.is_empty() || memory.actions().is_empty(),- "{listed:?}"- );- // Any tool that is not the collapsed `memory` tool advertises no actions,- // so a name check elsewhere cannot mistake it for one.+ let served: Vec<String> = memory.actions().iter().map(|e| e.action.to_string()).collect();+ assert_eq!(advertised_actions(&memory), served);+}++#[test]+fn a_tool_that_is_not_the_collapsed_memory_tool_advertises_no_actions() {+ // So a name check elsewhere cannot mistake another tool for the collapsed one.assert!(advertised_actions(&MemoryRecallTool::new()).is_empty());}