[PR #1029] [MERGED] fix(long-term-memory): share one vault snapshot per storage state (#1021) #1254

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1029
Author: @Promansis
Created: 9/22/2026
Status: ✅ Merged
Merged: 9/22/2026
Merged by: @Promansis

Base: staging ← Head: fix/ltm-vault-single-scan


📝 Commits (2)

  • d173817 fix(long-term-memory): share one vault snapshot per storage state (#1021)
  • 5591038 fix(long-term-memory): repair review findings #1021

📊 Changes

19 files changed (+384 additions, -131 deletions)

View changed files

➕ artifacts/long-term-memory-1.3.10.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -0)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -0)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -0)
📝 packages/long-term-memory/CHANGELOG.md (+5 -0)
📝 packages/long-term-memory/client.js (+23 -23)
📝 packages/long-term-memory/manifest.json (+5 -5)
📝 packages/long-term-memory/server.mjs (+39 -39)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/MemoryVault.tsx (+16 -18)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/identity-repair.ts (+3 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/mutation-transaction.ts (+3 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/note-fork-repair.ts (+2 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/storage.ts (+47 -21)
➕ packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/vault-snapshot.ts (+41 -0)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-storage.regression.ts (+157 -0)

📄 Description

Linked issue

Closes #1021

Why this change

Opening the memory vault read and parsed the whole vault for scope targets, the note list, and every paged read, so a single open measured two or more full scans of the same storage state. This makes each fresh storage state parse its notes once and share that snapshot.

What changed

  • long-term-memory 1.3.10: cache one parsed vault snapshot per resolve(root), shared by listNotes, scope targets, paged reads, and helper callers; drop it on mutations, backups, restores, and repairs so updated memories stay immediately visible.
  • Typed reads keep folder-scoped error isolation: readAllNotesUnlocked now reports per-file folder provenance, and listNotes surfaces only failures from the folder a type filter owns (any failure for full reads). Error-bearing scans are not memoized, so a later quarantine is picked up by the next read instead of replaying a stale failure.
  • Snapshot rejection cleanup is identity-safe, so a stale rejection cannot evict a newer scan.
  • Client MemoryVault.tsx builds one notesById map instead of repeatedly scanning note links.
  • Rebuilt manifest, server.mjs, client.js, artifacts/long-term-memory-1.3.10.zip, and catalog lanes on top of upstream staging's 1.3.9 release.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none; manifest engine range unchanged (min 2.4.1)
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: no on-disk format change; vault files and APIs 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

Local implementation validation run (not a substitute for the human checks above): test-ltm.sh all and test-ci.sh passed; npm run check 0 errors; catalog/locale/lane/release-note validators passed.

Manual verification notes

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

  • New Features

    • Long-Term Memory updated to version 1.3.10.
    • Vault notes are parsed once per fresh storage state and reused across reads, improving efficiency.
    • Typed reads can ignore malformed notes in unrelated folders, while full reads continue reporting errors.
  • Bug Fixes

    • Changes, backups, restores, and repairs now refresh stored memory data so updates appear immediately.
    • Improved linked-note title lookups and vault snapshot refresh behavior after recovery operations.

🔄 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/1029 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 9/22/2026 **Status:** ✅ Merged **Merged:** 9/22/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix/ltm-vault-single-scan` --- ### 📝 Commits (2) - [`d173817`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d1738175b7478975b81a43e800920e703706dd97) fix(long-term-memory): share one vault snapshot per storage state (#1021) - [`5591038`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5591038045bcfebef8f3c5929cffebe1fb8cec77) fix(long-term-memory): repair review findings #1021 ### 📊 Changes **19 files changed** (+384 additions, -131 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.3.10.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -0) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -0) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -0) 📝 `packages/long-term-memory/CHANGELOG.md` (+5 -0) 📝 `packages/long-term-memory/client.js` (+23 -23) 📝 `packages/long-term-memory/manifest.json` (+5 -5) 📝 `packages/long-term-memory/server.mjs` (+39 -39) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/MemoryVault.tsx` (+16 -18) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/identity-repair.ts` (+3 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/mutation-transaction.ts` (+3 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/note-fork-repair.ts` (+2 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/storage.ts` (+47 -21) ➕ `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/vault-snapshot.ts` (+41 -0) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-storage.regression.ts` (+157 -0) </details> ### 📄 Description ## Linked issue Closes #1021 ## Why this change Opening the memory vault read and parsed the whole vault for scope targets, the note list, and every paged read, so a single open measured two or more full scans of the same storage state. This makes each fresh storage state parse its notes once and share that snapshot. ## What changed - `long-term-memory` 1.3.10: cache one parsed vault snapshot per `resolve(root)`, shared by `listNotes`, scope targets, paged reads, and helper callers; drop it on mutations, backups, restores, and repairs so updated memories stay immediately visible. - Typed reads keep folder-scoped error isolation: `readAllNotesUnlocked` now reports per-file folder provenance, and `listNotes` surfaces only failures from the folder a type filter owns (any failure for full reads). Error-bearing scans are not memoized, so a later quarantine is picked up by the next read instead of replaying a stale failure. - Snapshot rejection cleanup is identity-safe, so a stale rejection cannot evict a newer scan. - Client `MemoryVault.tsx` builds one `notesById` map instead of repeatedly scanning note links. - Rebuilt manifest, `server.mjs`, `client.js`, `artifacts/long-term-memory-1.3.10.zip`, and catalog lanes on top of upstream staging's 1.3.9 release. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none; manifest engine range unchanged (`min` 2.4.1) - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: no on-disk format change; vault files and APIs 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` Local implementation validation run (not a substitute for the human checks above): `test-ltm.sh all` and `test-ci.sh` passed; `npm run check` 0 errors; catalog/locale/lane/release-note validators passed. ### Manual verification notes - ## 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 * **New Features** * Long-Term Memory updated to version 1.3.10. * Vault notes are parsed once per fresh storage state and reused across reads, improving efficiency. * Typed reads can ignore malformed notes in unrelated folders, while full reads continue reporting errors. * **Bug Fixes** * Changes, backups, restores, and repairs now refresh stored memory data so updates appear immediately. * Improved linked-note title lookups and vault snapshot refresh behavior after recovery operations. <!-- 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:06:52 +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#1254
No description provided.