Skip to content

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

Rust

docs(admin): document move copy webhook skip

AkitaOnRails2003e520ab52
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5c94cac8..cb5891e3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixed
+- Copy-purge `/admin/move-project` now skips only the webhook named exactly
+ `contributors` while copying pages, avoiding redundant per-page contributor
+ enrichment on already-enriched frontmatter while preserving other
+ `write_page` webhooks and the terminal purge notification ([#167]).
- `memory_read_page` by-path not-found errors now name the resolved
workspace/project scope, making stale or mis-scoped page paths easier to
diagnose from MCP clients ([#166]).
diff --git a/crates/ai-memory-mcp/src/admin.rs b/crates/ai-memory-mcp/src/admin.rs
index 33de6325..3b7499be 100644
--- a/crates/ai-memory-mcp/src/admin.rs
+++ b/crates/ai-memory-mcp/src/admin.rs
@@ -67,6 +67,7 @@ use tokio_util::io::ReaderStream;
use tracing::{info, warn};
const EMBEDDING_WRITE_BATCH: usize = 100;
+const CONTRIBUTORS_WEBHOOK_NAME: &str = "contributors";
/// Shared state for the admin router.
#[derive(Clone)]
@@ -3761,14 +3762,14 @@ async fn copy_purge_merge(
// Preserve the stored title verbatim (PageSummary.title is
// the DB-derived title), rather than re-deriving it.
title: Some(p.title.clone()),
- // Skip the `contributors` enrich webhook on move copies: the
- // frontmatter (including the contributors list) is copied
+ // Skip the named contributors enrich webhook on move copies:
+ // the frontmatter (including the contributors list) is copied
// verbatim, so re-enriching each copy adds nothing but blocking
// per-page latency to a bulk move. write_page still resolves
// the destination NAMES and runs the other hooks (git-mirror),
// so the copy lands under the destination path.
admission_ctx: Some(AdmissionContext {
- skip_webhooks: vec!["contributors".to_string()],
+ skip_webhooks: vec![CONTRIBUTORS_WEBHOOK_NAME.to_string()],
..AdmissionContext::default()
}),
author_id: None,
diff --git a/docs/admission-webhooks.md b/docs/admission-webhooks.md
index d5508857..c523710f 100644
--- a/docs/admission-webhooks.md
+++ b/docs/admission-webhooks.md
@@ -71,6 +71,13 @@ when the source is torn down. The `purge_project` event carries
`partial_failure: true` if the SQL purge committed but the on-disk
dir removal failed afterwards.
+During the copy leg, the engine skips only the webhook named exactly
+`contributors`. Move copies preserve page frontmatter verbatim, including any
+existing `contributors` list, so re-running that enrichment hook for every page
+adds bulk-move latency without changing the copied page. Other `write_page`
+webhooks, such as a `git-mirror`, still run normally for each copied page; the
+terminal `purge_project` notification is unchanged.
+
### What does NOT fire the chain (by design)
- **`log.md` / `log-YYYY-MM.md` appends** — written on every hook event