Skip to content

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

test(agent): read the namespace the autosave actually writes to\n\n`main` moved the conversation autosave into a dedicated\n`CONVERSATION_RAW_NAMESPACE`, so the helper's `list(None, …)` came back\nempty. That failed the two positive cases outright — and, worse, would\nhave passed the two negative ones without ever reading storage, which is\nthe exact false green the helper's own doc comment warns about.\n\nList the namespace explicitly so both directions read the same rows.\n

yh928b3d1efbed72d
diff --git a/src/openhuman/agent/agent_tests_part_03_tests.rs b/src/openhuman/agent/agent_tests_part_03_tests.rs
index 56dacb4898..27c304219a 100644
--- a/src/openhuman/agent/agent_tests_part_03_tests.rs
+++ b/src/openhuman/agent/agent_tests_part_03_tests.rs
@@ -12,16 +12,24 @@ use super::*;
/// the positive autosave test uses, and report whether one ever landed.
///
/// The user message is stored fire-and-forget (`tokio::spawn` in
-/// `turn/core.rs`, #3610), so both directions need the *same* window or the
+/// `turn/core_turn.rs`, #3610), so both directions need the *same* window or the
/// negative tests are the weaker assertion: a broken guard whose spawned store
/// lands after a short fixed sleep would pass them while failing in production.
/// Returns as soon as one appears, so a genuinely broken guard fails fast
/// instead of costing the full second.
+///
+/// Lists `CONVERSATION_RAW_NAMESPACE` explicitly rather than passing `None`.
+/// The autosave writes there (it no longer shares the default namespace), and a
+/// `None` listing comes back empty — which would make the two negative tests
+/// below pass without ever reading the store, exactly the false green this
+/// helper exists to avoid.
async fn poll_for_stored_user_message(mem: &Arc<dyn Memory>) -> Vec<String> {
+ use crate::openhuman::agent::learning::transcript_ingest::CONVERSATION_RAW_NAMESPACE;
+
let mut keys: Vec<String> = Vec::new();
for _ in 0..50 {
keys = mem
- .list(None, None, None)
+ .list(Some(CONVERSATION_RAW_NAMESPACE), None, None)
.await
.expect(
"memory list must succeed; an empty list here would let the \
@@ -93,7 +101,6 @@ async fn a_direct_chat_turn_stores_the_user_message() {
);
}
-
/// An internal agent runs on the same config as the chat, so it inherits
/// `auto_save` — but its "user message" is the prompt the host wrote for it.
/// Storing that as a conversation memory puts prompt boilerplate where the