Skip to content

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

Rust

test(consolidate): expect the title-keyed fallback for a CJK rule title

Vinícius DS Andrade94060eaf1723
diff --git a/crates/ai-memory-consolidate/src/consolidator.rs b/crates/ai-memory-consolidate/src/consolidator.rs
index 573daac9..813709de 100644
--- a/crates/ai-memory-consolidate/src/consolidator.rs
+++ b/crates/ai-memory-consolidate/src/consolidator.rs
@@ -3303,11 +3303,11 @@ mod tests {
);
}
- /// #886: a CJK-only title still folds to nothing and falls back to the
- /// static slug — diacritic folding must not resurrect it.
+ /// #886: a CJK-only title still folds to no ASCII slug — diacritic
+ /// folding must not resurrect it — and takes the title-keyed fallback.
#[test]
fn slugify_cjk_still_falls_back() {
- assert_eq!(slugify_for_rule("中文标题"), "rule");
+ assert!(slugify_for_rule("中文标题").starts_with("rule-"));
}
/// A slug whose first 60 chars already end on a whole word keeps that