[PR #1192] [MERGED] fix(long-term-memory): 1.3.36 — drop cached vault scan on quarantine and add private vault-mutation boundary #1338

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

📋 Pull Request Information

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

Base: staging ← Head: fix(long-term-memory)/1179-quarantine-vault-hooks


📝 Commits (2)

  • cb586fc fix(long-term-memory): 1.3.36 — drop cached vault scan on quarantine and add private vault-mutation boundary (#1179)
  • 3fa6d22 test(long-term-memory): strengthen the #1179 vault-mutation regression assertions

📊 Changes

16 files changed (+280 additions, -82 deletions)

View changed files

➕ artifacts/long-term-memory-1.3.36.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 (+5 -0)
📝 packages/long-term-memory/manifest.json (+3 -3)
📝 packages/long-term-memory/server.mjs (+41 -41)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/maintenance.ts (+4 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/runtime.ts (+21 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/server-entry.ts (+3 -1)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-runtime.regression.ts (+127 -0)
📝 tests/long-term-memory-storage.regression.ts (+39 -0)

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #1179

Why this change

Official maintenance (quarantine_malformed_notes) moved a malformed vault note out of the vault but left the parsed vault snapshot cached, so the next full read and recall kept serving the removed note's id and text until a package restart. The package also had no private, lock-preserving boundary for the Engine to publish or roll back a vault change and reset the package caches first.

What changed

  • long-term-memory maintenance.ts: drop the cached vault snapshot after each successful quarantine rename, so the subsequent index rebuild and later reads stop serving the quarantined note.
  • long-term-memory runtime.ts: add private withLongTermMemoryVaultMutation(root, operation) that runs inside the reentrant vault lock and resets the package initialization/snapshot caches before and after, preserving the operation's return value or error.
  • long-term-memory server-entry.ts: register withVaultMutation on the long-term-memory:runtime service using the captured activation root. recall and recordPromptAccepted are unchanged, and the hook unregisters with the service on cleanup.
  • Version 1.3.36 with a CHANGELOG entry; rebuilt manifest.json, server.mjs, the catalog/, catalog/v2, and catalog/v3 lanes and notes, and artifacts/long-term-memory-1.3.36.zip.
  • Regressions: storage quarantine-invalidation scenario; runtime vault-mutation boundary and quarantined-recall scenario.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none. engine.min stays 2.4.1 and maxExclusive is unchanged.
  • New or changed permissions/entrypoints: none. The added method is a private runtime service callback, not an HTTP route, and adds no permission.
  • Restart, storage, update, or uninstall impact: none. The vault lock, cache-reset behavior, and activation teardown are preserved; install/update/uninstall paths are unchanged.

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 CodeRabbit are not claimed. On commit cb586fcdb: npm run check, scripts/test-catalog-lanes.mjs, scripts/validate-package-locales.mjs, scripts/validate-catalog.mjs, scripts/tests/catalog-release-notes.regression.mjs, npm run typecheck:packages, and test-fast.sh all passed.
  • Engine-backed test-ltm.sh storage, runtime, routes, routes-backup, and installation passed with MARINARA_ENGINE_ROOT pointed at a local Engine checkout. The 1.3.36 installation scenario exercised install, offline restart, backup inclusion, uninstall, reinstall, and durable-byte preservation.
  • The rebuilt archive matches the manifest and catalog hashes: fa02b624c623874dd909185f5850ec136405918a30e8e26101e5e31eea817c54, 1375776 bytes.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

UI evidence (if applicable)

Summary by CodeRabbit

  • Bug Fixes
    • Updated Long-Term Memory to version 1.3.36.
    • After maintenance quarantines a malformed note, full reads and recall no longer return its stale cached content.
    • Reads wait for vault changes to finish, then reflect the published or restored content. If a change fails, later reads remain available.

🔄 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/1192 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/2/2026 **Status:** ✅ Merged **Merged:** 10/2/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/1179-quarantine-vault-hooks` --- ### 📝 Commits (2) - [`cb586fc`](https://github.com/Pasta-Devs/Marinara-Agents/commit/cb586fcdbe62aa98d90c37fc72121fdfa4abcc47) fix(long-term-memory): 1.3.36 — drop cached vault scan on quarantine and add private vault-mutation boundary (#1179) - [`3fa6d22`](https://github.com/Pasta-Devs/Marinara-Agents/commit/3fa6d2288c93a1cdf72d6a843e500a57fdaf7497) test(long-term-memory): strengthen the #1179 vault-mutation regression assertions ### 📊 Changes **16 files changed** (+280 additions, -82 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.3.36.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` (+5 -0) 📝 `packages/long-term-memory/manifest.json` (+3 -3) 📝 `packages/long-term-memory/server.mjs` (+41 -41) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/maintenance.ts` (+4 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/runtime.ts` (+21 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/server-entry.ts` (+3 -1) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-runtime.regression.ts` (+127 -0) 📝 `tests/long-term-memory-storage.regression.ts` (+39 -0) </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #1179 ## Why this change Official maintenance (`quarantine_malformed_notes`) moved a malformed vault note out of the vault but left the parsed vault snapshot cached, so the next full read and recall kept serving the removed note's id and text until a package restart. The package also had no private, lock-preserving boundary for the Engine to publish or roll back a vault change and reset the package caches first. ## What changed - `long-term-memory` `maintenance.ts`: drop the cached vault snapshot after each successful quarantine rename, so the subsequent index rebuild and later reads stop serving the quarantined note. - `long-term-memory` `runtime.ts`: add private `withLongTermMemoryVaultMutation(root, operation)` that runs inside the reentrant vault lock and resets the package initialization/snapshot caches before and after, preserving the operation's return value or error. - `long-term-memory` `server-entry.ts`: register `withVaultMutation` on the `long-term-memory:runtime` service using the captured activation root. `recall` and `recordPromptAccepted` are unchanged, and the hook unregisters with the service on cleanup. - Version 1.3.36 with a CHANGELOG entry; rebuilt `manifest.json`, `server.mjs`, the `catalog/`, `catalog/v2`, and `catalog/v3` lanes and notes, and `artifacts/long-term-memory-1.3.36.zip`. - Regressions: storage quarantine-invalidation scenario; runtime vault-mutation boundary and quarantined-recall scenario. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none. `engine.min` stays 2.4.1 and `maxExclusive` is unchanged. - New or changed permissions/entrypoints: none. The added method is a private runtime service callback, not an HTTP route, and adds no permission. - Restart, storage, update, or uninstall impact: none. The vault lock, cache-reset behavior, and activation teardown are preserved; install/update/uninstall paths are unchanged. ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [ ] `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 CodeRabbit are not claimed. On commit `cb586fcdb`: `npm run check`, `scripts/test-catalog-lanes.mjs`, `scripts/validate-package-locales.mjs`, `scripts/validate-catalog.mjs`, `scripts/tests/catalog-release-notes.regression.mjs`, `npm run typecheck:packages`, and `test-fast.sh` all passed. - Engine-backed `test-ltm.sh storage`, `runtime`, `routes`, `routes-backup`, and `installation` passed with `MARINARA_ENGINE_ROOT` pointed at a local Engine checkout. The 1.3.36 installation scenario exercised install, offline restart, backup inclusion, uninstall, reinstall, and durable-byte preservation. - The rebuilt archive matches the manifest and catalog hashes: `fa02b624c623874dd909185f5850ec136405918a30e8e26101e5e31eea817c54`, 1375776 bytes. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Updated Long-Term Memory to version 1.3.36. * After maintenance quarantines a malformed note, full reads and recall no longer return its stale cached content. * Reads wait for vault changes to finish, then reflect the published or restored content. If a change fails, later reads remain available. <!-- 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:09:10 +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#1338
No description provided.