Skip to content

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

test(memory): adapt reach tests to namespaced subtree constructor

Steven Enamakelba8d74136b6b
diff --git a/crates/openhuman-core/src/memory/guard_tests.rs b/crates/openhuman-core/src/memory/guard_tests.rs
index 8f68f43bf3..6b1483b1fe 100644
--- a/crates/openhuman-core/src/memory/guard_tests.rs
+++ b/crates/openhuman-core/src/memory/guard_tests.rs
@@ -218,7 +218,7 @@ impl MemoryEngine for Recording {
async fn forget_within_reaches_the_wrapped_engine_with_its_reach() {
let recording = Arc::new(Recording::default());
let guarded = ScrubbingEngine::wrap(recording.clone());
- let reach = Reach::subtree("agent:ann");
+ let reach = Reach::subtree("agent:ann".parse::<tinymemory_api::Namespace>().unwrap());
guarded
.forget_within(vec![ItemId::new("a")], reach.clone())
.await
diff --git a/crates/openhuman-core/src/memory/ops_tests.rs b/crates/openhuman-core/src/memory/ops_tests.rs
index a3192b6382..8dcf7a94f8 100644
--- a/crates/openhuman-core/src/memory/ops_tests.rs
+++ b/crates/openhuman-core/src/memory/ops_tests.rs
@@ -470,6 +470,8 @@ async fn erase_all_reports_memory_off_without_an_engine() {
/// sweeps the tree for the ids; without one it stays a plain forget by id.
#[tokio::test]
async fn forget_with_a_reach_forgets_within_it() {
+ use tinymemory_api::MemoryEngine as _;
+
let tmp = tempfile::tempdir().unwrap();
let config = config_in(&tmp);
let engine = std::sync::Arc::new(crate::memory::test_fixtures::RecordingEngine::new());