Skip to content

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

Rust

test: gate POSIX-shaped hook/transcript fixtures to unix (windows matrix)

AkitaOnRails10e55d0a46f8
diff --git a/crates/ai-memory-cli/src/commands/backfill.rs b/crates/ai-memory-cli/src/commands/backfill.rs
index 75898dae..2529c094 100644
--- a/crates/ai-memory-cli/src/commands/backfill.rs
+++ b/crates/ai-memory-cli/src/commands/backfill.rs
@@ -712,6 +712,11 @@ mod tests {
/// workstream path encoder: a Claude transcript planted under the actual
/// `~/.claude/projects/<enc-cwd>/` layout for this cwd is discovered, and a
/// transcript for a different cwd is ignored.
+ ///
+ /// Unix-gated: the fixture uses a POSIX-encoded projects path; cross-platform
+ /// native-store discovery is owned and tested by `ai-memory-workstream`. The
+ /// pure selection/cap tests above run on every platform.
+ #[cfg(unix)]
#[tokio::test]
async fn collect_local_sessions_finds_a_planted_claude_session_for_this_cwd() {
let home = tempfile::tempdir().unwrap();
diff --git a/crates/ai-memory-cli/src/commands/doctor.rs b/crates/ai-memory-cli/src/commands/doctor.rs
index 5bfbddbb..97c5d81b 100644
--- a/crates/ai-memory-cli/src/commands/doctor.rs
+++ b/crates/ai-memory-cli/src/commands/doctor.rs
@@ -449,6 +449,11 @@ mod tests {
/// a foreign-cwd transcript must be ignored. This is the detector guard the
/// pure verdict tests cannot give, since the encoding lives in the
/// workstream crate.
+ ///
+ /// Unix-gated: the fixture plants a POSIX-encoded `~/.claude/projects/<cwd>`
+ /// path, and cross-platform native-store path handling is owned and tested by
+ /// `ai-memory-workstream`. The pure aggregation tests above run everywhere.
+ #[cfg(unix)]
#[tokio::test]
async fn scan_local_detects_a_planted_claude_session_for_this_cwd() {
let home = tempfile::tempdir().unwrap();
diff --git a/crates/ai-memory-cli/src/commands/install_hooks.rs b/crates/ai-memory-cli/src/commands/install_hooks.rs
index 7193d6c4..8ac7b60d 100644
--- a/crates/ai-memory-cli/src/commands/install_hooks.rs
+++ b/crates/ai-memory-cli/src/commands/install_hooks.rs
@@ -8047,6 +8047,13 @@ model = "gpt-5"
/// `--apply` without `--capture-assistant` — exactly what `ai-memory run`
/// auto-wire issues — must PRESERVE a user's existing assistant-capture
/// opt-in, not silently strip it.
+ ///
+ /// Unix-gated: `--capture-assistant` is baked onto the native Stop command on
+ /// POSIX-native platforms; the Windows Claude command form does not carry the
+ /// flag in its rendered JSON, so there is nothing to drop or preserve there.
+ /// The preserve logic itself (`baked_capture_assistant`) has no platform
+ /// branch.
+ #[cfg(unix)]
#[test]
fn a_bare_reapply_preserves_an_existing_capture_assistant_opt_in() {
let home = TempDir::new().unwrap();