Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
docs(store): finish strict V62 migration guidance
AkitaOnRails6d20b73e9384
diff --git a/crates/ai-memory-store/src/migrations.rs b/crates/ai-memory-store/src/migrations.rsindex 8985b925..e56e62c2 100644--- a/crates/ai-memory-store/src/migrations.rs+++ b/crates/ai-memory-store/src/migrations.rs@@ -1631,6 +1631,16 @@ mod tests {.checksum();assert_eq!(checksum, ORIGINAL_V62_CHECKSUM);+ let embedded = migrations::runner()+ .get_migrations()+ .iter()+ .find(|migration| migration.version() == V62_VERSION)+ .expect("V62 must remain embedded")+ .checksum();+ assert_ne!(+ embedded, checksum,+ "the V62 repair is unnecessary if the embedded SQL matches v2.2.1"+ );}/// The one known V62 checksum is repaired before the strict runner seesdiff --git a/docs/design-memory-aging.md b/docs/design-memory-aging.mdindex 3d5a6ee5..b164ee5d 100644--- a/docs/design-memory-aging.md+++ b/docs/design-memory-aging.md@@ -428,7 +428,8 @@ divergence check. V62 is the historical exception. Its exact v2.2.1 checksum isrepaired to the embedded checksum before the runner starts (#1443), after which`set_abort_divergent(true)` keeps every unknown edit fatal. `set_abort_missing(true)`also keeps a store *ahead* of the binary fail-closed. Future changes must never-edit a shipped migration in place or broaden the narrow V62 repair.+edit a shipped migration in place or broaden the narrow V62 repair;+`scripts/check-migrations-immutable.sh` enforces that rule in CI.**Any data backfill runs on the boot path, not inside the migrationtransaction**: chunked, resumable, and WAL-checkpointed, mirroring the #776@@ -495,9 +496,9 @@ content.### 4. Downgrade note-Additive columns plus `set_abort_missing(true)` (`migrations.rs:34`) mean an older+Additive columns plus `set_abort_missing(true)` in `migrations::run` mean an olderbinary opening a newer store **fails closed** with the actionable-`StoreError::DataSchemaAhead` (`error.rs:36`, raised at `migrations.rs:55`). It+`StoreError::DataSchemaAhead` raised by `classify_run_error`. Itnames the applied-vs-supported versions and refuses to open, rather than silentlycorrupting a store it doesn't understand. That guarantee must be preserved byevery new migration.diff --git a/docs/design-page-ingestion-windows.md b/docs/design-page-ingestion-windows.mdindex 95fd2a40..486768ec 100644--- a/docs/design-page-ingestion-windows.md+++ b/docs/design-page-ingestion-windows.md@@ -22,10 +22,10 @@ invoked from `Store::open` next to the entity-index backfill) thatreproduces the identical end state in bounded batches, checkpoints theWAL (`TRUNCATE`) between each, logs progress, resumes rather thanrestarts if interrupted, and no-ops on a store already backfilled. The-in-place reshape changed V62's checksum. The migration runner repairs only-the exact checksum recorded for the SQL shipped in v2.2.1 before running-strict validation; correctly-migrated stores still open, while every unknown-checksum divergence remains fatal (#1443).*+in-place reshape changed V62's checksum. `migrations::run` repairs only the+exact checksum recorded for the SQL shipped in v2.2.1 before running strict+validation; correctly-migrated stores still open, while every unknown checksum+divergence and every store ahead of the binary remains fatal (#1443).*## 1. The problem, and why entity-link windows are not enough