Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
test(swival): compare canonical project roots (#385)
AkitaOnRails1c5b9012986f
diff --git a/crates/ai-memory-cli/src/commands/install_mcp.rs b/crates/ai-memory-cli/src/commands/install_mcp.rsindex 5bbd7fe2..10320bd1 100644--- a/crates/ai-memory-cli/src/commands/install_mcp.rs+++ b/crates/ai-memory-cli/src/commands/install_mcp.rs@@ -2391,17 +2391,26 @@ mod tests {let git_nested = git_root.join("a").join("b");fs::create_dir_all(git_root.join(".git")).unwrap();fs::create_dir_all(&git_nested).unwrap();- assert_eq!(swival_project_root(&git_nested), git_root);+ assert_eq!(+ swival_project_root(&git_nested),+ fs::canonicalize(&git_root).unwrap()+ );let toml_root = tmp.path().join("toml-project");let toml_nested = toml_root.join("src");fs::create_dir_all(&toml_nested).unwrap();fs::write(toml_root.join("swival.toml"), "").unwrap();- assert_eq!(swival_project_root(&toml_nested), toml_root);+ assert_eq!(+ swival_project_root(&toml_nested),+ fs::canonicalize(&toml_root).unwrap()+ );let plain = tmp.path().join("plain");fs::create_dir_all(&plain).unwrap();- assert_eq!(swival_project_root(&plain), plain);+ assert_eq!(+ swival_project_root(&plain),+ fs::canonicalize(&plain).unwrap()+ );}#[test]