Skip to content

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

Rust

docs(consolidate): narrow path sanitizer contract

AkitaOnRails3e08f05a617e
diff --git a/crates/ai-memory-consolidate/src/path_sanitize.rs b/crates/ai-memory-consolidate/src/path_sanitize.rs
index ce2a19b7..74d1626c 100644
--- a/crates/ai-memory-consolidate/src/path_sanitize.rs
+++ b/crates/ai-memory-consolidate/src/path_sanitize.rs
@@ -102,10 +102,11 @@ mod tests {
use ai_memory_core::ids::PagePath;
#[test]
- fn slugify_page_path_output_passes_ensure_portable() {
- // Each of these is a shape `ensure_portable` refuses; the helper's
- // contract is that its output survives it, so one bad model path
- // cannot abort a whole `apply_batch`.
+ fn slugify_page_path_repairs_trailing_and_dos_device_components() {
+ // Each of these is one of the component shapes repaired here. Other
+ // portability checks (for example the 255-byte component limit) stay
+ // fail-closed in `ensure_portable` instead of silently rewriting a
+ // model path beyond recognition.
for (raw, expected) in [
("notes/v2./roadmap.md", "notes/v2/roadmap.md"),
("notes/q3 plan /roadmap.md", "notes/q3 plan/roadmap.md"),