Skip to content

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

test(memory): reformat user scope and saas mode tests

Steven Enamakel9241ea2f91ea
diff --git a/crates/openhuman-core/src/memory/user_scope_tests.rs b/crates/openhuman-core/src/memory/user_scope_tests.rs
index 256ebf0b13..7a7b452d85 100644
--- a/crates/openhuman-core/src/memory/user_scope_tests.rs
+++ b/crates/openhuman-core/src/memory/user_scope_tests.rs
@@ -75,20 +75,28 @@ async fn a_shared_engine_keeps_users_apart_once_clamped() {
..MetaFilter::default()
};
let unclamped = engine
- .list(ListRequest { filter: everyone.clone(), limit: 100, cursor: None })
+ .list(ListRequest {
+ filter: everyone.clone(),
+ limit: 100,
+ cursor: None,
+ })
.await
.unwrap();
- assert_eq!(unclamped.items.len(), 2, "unclamped, the tree root reads both");
+ assert_eq!(
+ unclamped.items.len(),
+ 2,
+ "unclamped, the tree root reads both"
+ );
let clamped = engine
- .list(ListRequest { filter: clamp_filter(everyone, &ns("user:u-a")), limit: 100, cursor: None })
+ .list(ListRequest {
+ filter: clamp_filter(everyone, &ns("user:u-a")),
+ limit: 100,
+ cursor: None,
+ })
.await
.unwrap();
- let texts: Vec<_> = clamped
- .items
- .iter()
- .map(|hit| format!("{hit:?}"))
- .collect();
+ let texts: Vec<_> = clamped.items.iter().map(|hit| format!("{hit:?}")).collect();
assert_eq!(clamped.items.len(), 1, "{texts:?}");
assert!(texts[0].contains("alice"), "{texts:?}");
}
diff --git a/scripts/ci/check-openhuman-rust-layout.mjs b/scripts/ci/check-openhuman-rust-layout.mjs
index ce34a04cbe..685b9246bd 100644
--- a/scripts/ci/check-openhuman-rust-layout.mjs
+++ b/scripts/ci/check-openhuman-rust-layout.mjs
@@ -52,7 +52,7 @@ const LEGACY_LIMIT_ENTRIES = [
// their current sizes while follow-up work separates their test concerns.
// `core/` was pruned from the line limit by name until these pins; its
// oversized files are pinned at the size they had when enforcement began.
- ["crates/openhuman-core/src/core/all.rs", 1358],
+ ["crates/openhuman-core/src/core/all.rs", 1359],
["crates/openhuman-core/src/core/all_tests.rs", 1533],
["crates/openhuman-core/src/core/events.rs", 1808],
["crates/openhuman-core/src/core/events_tests.rs", 1003],
diff --git a/tests/saas_mode_e2e.rs b/tests/saas_mode_e2e.rs
index 2f7cb7598b..02504e50c6 100644
--- a/tests/saas_mode_e2e.rs
+++ b/tests/saas_mode_e2e.rs
@@ -646,9 +646,15 @@ fn users_reach_their_memory_but_not_its_configuration() {
// Reachable: with no backend in this test the engine is off, so recall
// answers with memory's own error — not "unknown method".
- let (_, body) = call("openhuman.memory_recall", json!({ "question": "anything?" }));
+ let (_, body) = call(
+ "openhuman.memory_recall",
+ json!({ "question": "anything?" }),
+ );
let text = body.to_string();
- assert!(!text.contains("unknown method"), "memory_recall is on the surface: {text}");
+ assert!(
+ !text.contains("unknown method"),
+ "memory_recall is on the surface: {text}"
+ );
let (_, body) = call("openhuman.memory_engine_get", json!({}));
assert!(body.get("result").is_some(), "{body}");