Skip to content

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

chore: files changed tests/json_rpc_e2e.rs

Steven Enamakelc859ca42648c
diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rs
index 29a8c3d059..8df02b6312 100644
--- a/tests/json_rpc_e2e.rs
+++ b/tests/json_rpc_e2e.rs
@@ -1402,7 +1402,10 @@ async fn json_rpc_modules_browser_forget_sites_removes_learned_sites() {
Some(1),
"{one}"
);
- assert!(!sites.join("shop.test.json").exists());
+ // Site memory lives in the storage KV since schema v2: the legacy files
+ // above are imported once and left in place, so what was forgotten is
+ // read from the counts, not from the directory.
+ assert!(sites.join("shop.test.json").exists());
assert!(sites.join("books.test.json").exists());
let blank = post_json_rpc(
@@ -1428,7 +1431,21 @@ async fn json_rpc_modules_browser_forget_sites_removes_learned_sites() {
Some(1),
"{every}"
);
- assert!(!sites.join("books.test.json").exists());
+ assert!(sites.join("books.test.json").exists());
+
+ let none_left = post_json_rpc(
+ &rpc_base,
+ 41_255,
+ "openhuman.modules_browser_forget_sites",
+ json!({}),
+ )
+ .await;
+ let none_left = peel_logs_envelope(assert_no_jsonrpc_error(&none_left, "forget again"));
+ assert_eq!(
+ none_left.get("forgotten").and_then(Value::as_u64),
+ Some(0),
+ "nothing may remain after forgetting every site: {none_left}"
+ );
rpc_join.abort();
}