[PR #1305] [MERGED] fix(long-term-memory): 1.4.24 — refresh the recall index on an embedding-config save #1394

Closed
opened 2026-10-21 05:10:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1305
Author: @Promansis
Created: 10/11/2026
Status: ✅ Merged
Merged: 10/11/2026
Merged by: @Promansis

Base: staging ← Head: fix(long-term-memory)/refresh-hook


📝 Commits (1)

  • 538d622 fix(long-term-memory): 1.4.24 — refresh the recall index on an embedding-config save

📊 Changes

14 files changed (+213 additions, -79 deletions)

View changed files

➕ artifacts/long-term-memory-1.4.24.zip (+0 -0)
📝 catalog/catalog.json (+6 -6)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+6 -6)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+6 -6)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/long-term-memory/CHANGELOG.md (+4 -0)
📝 packages/long-term-memory/manifest.json (+3 -3)
📝 packages/long-term-memory/server.mjs (+39 -39)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/rebuild.ts (+19 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/server-entry.ts (+5 -0)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-runtime.regression.ts (+106 -0)

📄 Description

Closes #1303

Why this change

Long-Term Memory never registered the runtime refresh hook the Engine calls after a connection or agent save changes LTM's embedding source. Every such save therefore left the vault's recall index on the previous embedding space, so the next chat recall had to re-embed the whole vault inline (a slow first reply), and the Engine could only report X-Marinara-LTM-Refresh: unavailable.

What changed

  • Affected package: long-term-memory (1.4.23 → 1.4.24, patch).
  • Registers refresh on the long-term-memory:runtime service. It resolves the current embedding adapter, rebuilds the index for the new space, and rejects when the new source still cannot embed the vault, so the Engine reports failed instead of a false success.
  • Clears the process-local auto-upgrade guard while holding the vault lock, so an upgrade that fails while refresh waits cannot restore the guard and make the save's retry skip its rebuild.
  • Generated outputs rebuilt: packages/long-term-memory/server.mjs, artifacts/long-term-memory-1.4.24.zip, catalog/{,v2/,v3/}catalog.json and notes.json, and the manifest file hashes. client.js is unchanged.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none. engine.min stays 2.4.1 and the capability API stays 1.6. The hook is optional and host-side; an Engine that predates it never calls refresh and keeps today's behaviour.
  • New or changed permissions/entrypoints: none.
  • Restart, storage, update, or uninstall impact: none beyond the rebuilt payload. No storage-schema change; the vault lock, cancellation and quarantine behaviour are preserved.

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

Local validation only; hosted CI and a manual Engine UI install were not performed, so the checkboxes above are left for a human.

  • test-ltm.sh runtime — pass, including a new interleaving case that fails before this fix (an in-flight upgrade failing while a save's refresh waits must not suppress the retry).
  • test-ltm.sh installation — 1.4.24 install, offline restart, backup inclusion, uninstall, reinstall and durable-byte preservation: pass.
  • npm run check, node scripts/test-catalog-lanes.mjs, node scripts/validate-package-locales.mjs, node scripts/validate-catalog.mjs, node scripts/tests/catalog-release-notes.regression.mjs, npm run typecheck:packages, git diff --check — all pass.
  • ZIP members match the package files and the catalog artifact hash.

Documentation impact

No documentation changes: catalog membership, Engine compatibility, permissions and user-visible package guidance are unchanged. The release note lives in packages/long-term-memory/CHANGELOG.md (1.4.24) and is published through notes.json.

UI evidence (if applicable)

Not applicable; no UI change.

Summary by CodeRabbit

  • New Features
    • The Long-Term Memory package now refreshes its recall index when a connection or agent save changes the embedding source.
  • Bug Fixes
    • Saves now report a failure if the updated embedding source cannot process the existing vault, rather than indicating success without refreshing the index.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/1305 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/11/2026 **Status:** ✅ Merged **Merged:** 10/11/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/refresh-hook` --- ### 📝 Commits (1) - [`538d622`](https://github.com/Pasta-Devs/Marinara-Agents/commit/538d622bda7214862d96b7473fd966f5483d8fd6) fix(long-term-memory): 1.4.24 — refresh the recall index on an embedding-config save ### 📊 Changes **14 files changed** (+213 additions, -79 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.4.24.zip` (+0 -0) 📝 `catalog/catalog.json` (+6 -6) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+6 -6) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+6 -6) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/long-term-memory/CHANGELOG.md` (+4 -0) 📝 `packages/long-term-memory/manifest.json` (+3 -3) 📝 `packages/long-term-memory/server.mjs` (+39 -39) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/rebuild.ts` (+19 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/server-entry.ts` (+5 -0) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-runtime.regression.ts` (+106 -0) </details> ### 📄 Description Closes #1303 ## Why this change Long-Term Memory never registered the runtime `refresh` hook the Engine calls after a connection or agent save changes LTM's embedding source. Every such save therefore left the vault's recall index on the previous embedding space, so the next chat recall had to re-embed the whole vault inline (a slow first reply), and the Engine could only report `X-Marinara-LTM-Refresh: unavailable`. ## What changed - Affected package: `long-term-memory` (`1.4.23` → `1.4.24`, patch). - Registers `refresh` on the `long-term-memory:runtime` service. It resolves the current embedding adapter, rebuilds the index for the new space, and rejects when the new source still cannot embed the vault, so the Engine reports `failed` instead of a false success. - Clears the process-local auto-upgrade guard while holding the vault lock, so an upgrade that fails while refresh waits cannot restore the guard and make the save's retry skip its rebuild. - Generated outputs rebuilt: `packages/long-term-memory/server.mjs`, `artifacts/long-term-memory-1.4.24.zip`, `catalog/{,v2/,v3/}catalog.json` and `notes.json`, and the manifest file hashes. `client.js` is unchanged. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none. `engine.min` stays `2.4.1` and the capability API stays `1.6`. The hook is optional and host-side; an Engine that predates it never calls `refresh` and keeps today's behaviour. - New or changed permissions/entrypoints: none. - Restart, storage, update, or uninstall impact: none beyond the rebuilt payload. No storage-schema change; the vault lock, cancellation and quarantine behaviour are preserved. ## Validation - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Local validation only; hosted CI and a manual Engine UI install were not performed, so the checkboxes above are left for a human. - `test-ltm.sh runtime` — pass, including a new interleaving case that fails before this fix (an in-flight upgrade failing while a save's refresh waits must not suppress the retry). - `test-ltm.sh installation` — `1.4.24` install, offline restart, backup inclusion, uninstall, reinstall and durable-byte preservation: pass. - `npm run check`, `node scripts/test-catalog-lanes.mjs`, `node scripts/validate-package-locales.mjs`, `node scripts/validate-catalog.mjs`, `node scripts/tests/catalog-release-notes.regression.mjs`, `npm run typecheck:packages`, `git diff --check` — all pass. - ZIP members match the package files and the catalog artifact hash. ## Documentation impact No documentation changes: catalog membership, Engine compatibility, permissions and user-visible package guidance are unchanged. The release note lives in `packages/long-term-memory/CHANGELOG.md` (`1.4.24`) and is published through `notes.json`. ## UI evidence (if applicable) Not applicable; no UI change. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * The Long-Term Memory package now refreshes its recall index when a connection or agent save changes the embedding source. * **Bug Fixes** * Saves now report a failure if the updated embedding source cannot process the existing vault, rather than indicating success without refreshing the index. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:10:22 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1394
No description provided.