Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust

fix(ci): build the uninstall tests on Windows; loosen a spool timing bound

AkitaOnRailsbc60827357a7
diff --git a/crates/ai-memory-cli/src/commands/hook_spool.rs b/crates/ai-memory-cli/src/commands/hook_spool.rs
index 5fd3d928..d4a97c2c 100644
--- a/crates/ai-memory-cli/src/commands/hook_spool.rs
+++ b/crates/ai-memory-cli/src/commands/hook_spool.rs
@@ -2619,7 +2619,9 @@ mod tests {
);
let started = Instant::now();
enqueue(&spool, &entry).unwrap();
- assert!(started.elapsed() < Duration::from_millis(100));
+ // The guard is against blocking on the held lock, which would hang;
+ // the bound leaves room for fsync on a loaded CI disk.
+ assert!(started.elapsed() < Duration::from_secs(1));
assert_eq!(spool_len(&spool), 1, "content is retained for recovery");
}
diff --git a/crates/ai-memory-cli/src/commands/uninstall.rs b/crates/ai-memory-cli/src/commands/uninstall.rs
index fe7c8d13..005b22fb 100644
--- a/crates/ai-memory-cli/src/commands/uninstall.rs
+++ b/crates/ai-memory-cli/src/commands/uninstall.rs
@@ -1735,6 +1735,7 @@ fn strip_mcp_toml(content: &str, name: Option<&str>, url: &str) -> Result<(Strin
#[cfg(test)]
mod tests {
use super::*;
+ #[cfg(unix)]
use std::time::Duration;
/// Answers `systemctl`/`launchctl` from a script and records each call.
@@ -1766,6 +1767,7 @@ mod tests {
}
/// A unit `setup` rendered, written where `uninstall` finds it.
+ #[cfg(unix)]
fn setup_unit(root: &Path) -> (ServiceManager, user_service::Removal) {
let manager = ServiceManager::SystemdUser;
let unit = user_service::render(