Skip to content

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

test(memory): assert citations on the pack directly

Steven Enamakelfb7906356fb0
diff --git a/crates/openhuman-core/src/memory/lifecycle/hooks_tests.rs b/crates/openhuman-core/src/memory/lifecycle/hooks_tests.rs
index 3ff2b2884d..a65d9dab58 100644
--- a/crates/openhuman-core/src/memory/lifecycle/hooks_tests.rs
+++ b/crates/openhuman-core/src/memory/lifecycle/hooks_tests.rs
@@ -129,13 +129,11 @@ async fn pre_turn_logs_the_user_turn_and_injects_what_memory_holds() {
.expect("a pack");
assert!(pack.markdown.contains("teal"), "{}", pack.markdown);
assert!(!pack.refs.is_empty());
- let chips = crate::memory::tools::take_turn_citations(
- &crate::core::runtime::DispatchCtx::ambient(),
- "t1",
- );
assert!(
- chips.iter().any(|chip| chip.snippet.contains("teal")),
- "the pack's citations reach the chat: {chips:?}"
+ pack.citations
+ .iter()
+ .any(|citation| citation.snippet.contains("teal")),
+ "the pack carries its citations"
);
assert!(pack.injection().starts_with(OPEN_TAG));
assert!(pack.injection().ends_with(CLOSE_TAG));