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(memory): add namespace parameter to store functions in tests
Steven Enamakel9155728bcedc
diff --git a/crates/openhuman-core/src/memory/sources/composio_tests.rs b/crates/openhuman-core/src/memory/sources/composio_tests.rsindex 8507adf6ce..cd2a94a3f0 100644--- a/crates/openhuman-core/src/memory/sources/composio_tests.rs+++ b/crates/openhuman-core/src/memory/sources/composio_tests.rs@@ -1,4 +1,5 @@use super::*;+use tinymemory::Namespace;use crate::config::schema::MemorySourceKind;use crate::memory::test_fixtures::{bind_reference, config_in, stored};use tinymemory::{ItemKind, MetaFilter};@@ -78,7 +79,7 @@ async fn store_records_stores_the_non_empty_ones() {record("2", "Empty", " "),record("3", "Three", "third record"),];- let stored_count = store_records(&bound, "notion", "conn-1", "src-n", &records)+ let stored_count = store_records(&bound, "notion", "conn-1", "src-n", &Namespace::ROOT, &records).await.unwrap();assert_eq!(stored_count, 2);@@ -103,7 +104,7 @@ async fn store_records_with_nothing_to_store_is_zero() {bind_reference(&config);let bound = crate::memory::engine::resolve(&config).engine().unwrap();assert_eq!(- store_records(&bound, "notion", "c", "s", &[])+ store_records(&bound, "notion", "c", "s", &Namespace::ROOT, &[]).await.unwrap(),0@@ -152,6 +153,7 @@ async fn forget_connection_removes_only_that_connections_items() {"gmail","conn-a","src",+ &Namespace::ROOT,&[record("1", "A", "from a")],).await@@ -161,6 +163,7 @@ async fn forget_connection_removes_only_that_connections_items() {"gmail","conn-b","src",+ &Namespace::ROOT,&[record("2", "B", "from b")],).awaitdiff --git a/crates/openhuman-core/src/memory/sources/sync_tests.rs b/crates/openhuman-core/src/memory/sources/sync_tests.rsindex 346935330a..07ba991def 100644--- a/crates/openhuman-core/src/memory/sources/sync_tests.rs+++ b/crates/openhuman-core/src/memory/sources/sync_tests.rs@@ -257,13 +257,13 @@ async fn store_all_skips_a_bad_item_but_fails_when_nothing_stored() {tinymemory::MemoryMeta::default(),);assert_eq!(- store_all(&bound, vec![bad.clone(), good], "src")+ store_all(&bound, vec![bad.clone(), good], "src", &tinymemory::Namespace::ROOT).await.unwrap(),1);- assert!(store_all(&bound, vec![bad], "src").await.is_err());- assert_eq!(store_all(&bound, Vec::new(), "src").await.unwrap(), 0);+ assert!(store_all(&bound, vec![bad], "src", &tinymemory::Namespace::ROOT).await.is_err());+ assert_eq!(store_all(&bound, Vec::new(), "src", &tinymemory::Namespace::ROOT).await.unwrap(), 0);}#[test]