Skip to content

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

Rust

docs: align startup-heal comments with the broadened catch-all rule

Thiago Silva1918ae0dfe89
diff --git a/crates/ai-memory-cli/src/commands/serve.rs b/crates/ai-memory-cli/src/commands/serve.rs
index 7e3fd64b..b28db18d 100644
--- a/crates/ai-memory-cli/src/commands/serve.rs
+++ b/crates/ai-memory-cli/src/commands/serve.rs
@@ -79,10 +79,11 @@ pub async fn run(config: &Config, args: ServeArgs) -> Result<()> {
.with_context(|| format!("opening store at {}", config.data_dir.display()))?;
// One-shot legacy heal (issue #103): NULL out any project repo_path that
- // is a known prefix-match catch-all ($HOME or filesystem root) so existing
- // broken installs self-correct on upgrade. Uses the same $HOME source as
- // the router's match-time guard (captured once in `Config`) so heal and
- // guard agree on its meaning.
+ // is a prefix-match catch-all. That means the $HOME and filesystem-root
+ // sentinels, plus any path that exists locally but is not a git work-tree
+ // root, so existing broken installs self-correct on upgrade. Uses the same
+ // $HOME source as the router's match-time guard (captured once in `Config`)
+ // so heal and guard agree on its meaning.
let healed = store
.writer
.heal_catch_all_repo_paths(config.home_dir.clone())
@@ -90,7 +91,7 @@ pub async fn run(config: &Config, args: ServeArgs) -> Result<()> {
if healed > 0 {
tracing::info!(
healed,
- "healed catch-all project repo_path rows ($HOME / filesystem root)"
+ "healed catch-all project repo_path rows ($HOME, filesystem root, or non-git-root path)"
);
}
diff --git a/crates/ai-memory-store/src/writer.rs b/crates/ai-memory-store/src/writer.rs
index 24276138..62c5eeba 100644
--- a/crates/ai-memory-store/src/writer.rs
+++ b/crates/ai-memory-store/src/writer.rs
@@ -563,9 +563,10 @@ impl WriterHandle {
rx.await.map_err(|_| StoreError::WriterClosed)?
}
- /// NULL out catch-all project `repo_path` rows ($HOME and filesystem
- /// root) so existing installs self-heal on upgrade. Idempotent;
- /// returns the number of rows healed.
+ /// NULL out catch-all project `repo_path` rows so existing installs
+ /// self-heal on upgrade: the broad sentinels (`$HOME` and the filesystem
+ /// root) plus any path that exists locally but is not a git work-tree
+ /// root. Idempotent; returns the number of rows healed.
///
/// # Errors
/// Returns [`StoreError::WriterClosed`] or propagates SQL errors.