Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
test(setup): keep foreign-listener failures diagnosable
AkitaOnRails8ba4939ae812
diff --git a/crates/ai-memory-cli/src/commands/setup.rs b/crates/ai-memory-cli/src/commands/setup.rsindex 4f3a4c27..26fd6b50 100644--- a/crates/ai-memory-cli/src/commands/setup.rs+++ b/crates/ai-memory-cli/src/commands/setup.rs@@ -1142,7 +1142,7 @@ async fn validate_healthz(mut response: reqwest::Response) -> Result<(), String>// body and never echo it into the terminal.let mut body = Vec::new();while let Some(chunk) = response.chunk().await.map_err(|error| error.to_string())? {- if body.len() + chunk.len() > 1024 {+ if body.len().saturating_add(chunk.len()) > 1024 {return Err("health response exceeds 1024 bytes".to_owned());}body.extend_from_slice(&chunk);diff --git a/crates/ai-memory-cli/tests/suite/setup_e2e.rs b/crates/ai-memory-cli/tests/suite/setup_e2e.rsindex b4989038..8ceaace2 100644--- a/crates/ai-memory-cli/tests/suite/setup_e2e.rs+++ b/crates/ai-memory-cli/tests/suite/setup_e2e.rs@@ -220,10 +220,10 @@ async fn setup_identifies_a_foreign_listener_in_the_plan_and_self_check() {"{}",text(&applied));+ let requested_paths = paths.lock().unwrap().clone();assert!(- paths.lock().unwrap().iter().all(|path| path == "/healthz"),- "setup sent unrelated probes to the foreign listener: {:?}",- paths.lock().unwrap()+ requested_paths.iter().all(|path| path == "/healthz"),+ "setup sent unrelated probes to the foreign listener: {requested_paths:?}");assert!(!sandbox