Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
test(hooks): fix PowerShell spool CI checks
AkitaOnRailsb14885146fdd
diff --git a/.gitleaksignore b/.gitleaksignoreindex 8294d1a7..81116783 100644--- a/.gitleaksignore+++ b/.gitleaksignore@@ -12,3 +12,5 @@ d8361d3c3a86f870f74841b53c568c64fe42ab1f:crates/ai-memory-core/src/sanitize.rs:g# Fixed relay queue error label; contains no credential material.d7ba81976c35b0462f35a4efc53b44347c42295a:companions/ai-memory-relay/src/relay.rs:generic-api-key:3314927e9f3c9243db213b7b77c000b4622038cc34f:crates/ai-memory-core/src/sanitize.rs:generic-api-key:526+# Synthetic idempotency key in a PowerShell outage test; contains no credential material.+adc65423be5e8379b0f40de1d7fb38b094e0940d:tests/hooks/test_spool_ps.ps1:generic-api-key:21diff --git a/crates/ai-memory-hooks/tests/suite/powershell_spool.rs b/crates/ai-memory-hooks/tests/suite/powershell_spool.rsindex 526f863e..f365460d 100644--- a/crates/ai-memory-hooks/tests/suite/powershell_spool.rs+++ b/crates/ai-memory-hooks/tests/suite/powershell_spool.rs@@ -171,13 +171,16 @@ fn powershell_hook_spools_when_server_unreachable() {let files = spool_files(&data_dir);assert_eq!(files.len(), 1, "one spool entry after a refused POST");let name = files[0].file_name().unwrap().to_string_lossy().to_string();+ let stem = name.strip_suffix(".json").unwrap_or_default();+ let segments = stem.split('-').collect::<Vec<_>>();assert!(- name.len() == "0000000000000-0-0000000000000000.json".len()- && name- .split('-')- .next()- .is_some_and(|stamp| stamp.len() == 13 && stamp.bytes().all(|b| b.is_ascii_digit()))- && name.ends_with(".json"),+ segments.len() == 3+ && segments[0].len() == 13+ && segments[0].bytes().all(|byte| byte.is_ascii_digit())+ && !segments[1].is_empty()+ && segments[1].bytes().all(|byte| byte.is_ascii_digit())+ && segments[2].len() == 16+ && segments[2].bytes().all(|byte| byte.is_ascii_hexdigit()),"entry name follows <ms:013>-<pid>-<seq:x016>: {name}");diff --git a/tests/hooks/test_spool_ps.ps1 b/tests/hooks/test_spool_ps.ps1index e12f2775..5db5daeb 100644--- a/tests/hooks/test_spool_ps.ps1+++ b/tests/hooks/test_spool_ps.ps1@@ -18,7 +18,7 @@ $root = Join-Path ([IO.Path]::GetTempPath()) ("am-spool-" + [Guid]::NewGuid().ToNew-Item -ItemType Directory -Force -Path $root | Out-Null$env:AI_MEMORY_DATA_DIR = (Join-Path $root "data")# Port 1 is reserved and never listens: connection refused, immediately.-$RefusedUrl = "http://127.0.0.1:1/hook?event=stop&agent=codex&ingest_key=ps0123456789abcdef"+$RefusedUrl = "http://127.0.0.1:1/hook?event=stop&agent=codex&ingest_key=ps0000000000000000"# 1. The lib captured its own path so the detached drain child can be# pointed back at this exact file.