[PR #613] [MERGED] fix(long-term-memory): block deleted draft targets #1047

Closed
opened 2026-10-20 17:33:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/613
Author: @Promansis
Created: 8/26/2026
Status: ✅ Merged
Merged: 8/26/2026
Merged by: @Promansis

Base: staging ← Head: fix(long-term-memory)/permanent-delete-draft-invalidation


📝 Commits (4)

  • 7bf9b83 fix(long-term-memory): block deleted draft targets
  • f88d7c8 fix(long-term-memory): refresh deletion caches
  • 335070a build(long-term-memory): rebuild deleted-target fix
  • 3e3836b fix(long-term-memory): key review context sources

📊 Changes

13 files changed (+214 additions, -95 deletions)

View changed files

📝 artifacts/long-term-memory-1.2.14.zip (+0 -0)
📝 catalog/catalog.json (+6 -6)
📝 catalog/v2/catalog.json (+6 -6)
📝 catalog/v3/catalog.json (+6 -6)
📝 packages/long-term-memory/client.js (+20 -20)
📝 packages/long-term-memory/manifest.json (+4 -4)
📝 packages/long-term-memory/server.mjs (+40 -40)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/MemoryVault.tsx (+10 -1)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/ReviewQueue.tsx (+21 -7)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/api.ts (+7 -2)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/storage.ts (+32 -0)
📝 tests/long-term-memory-feedback-clarity-ui.regression.mjs (+10 -2)
📝 tests/long-term-memory-storage.regression.ts (+52 -1)

📄 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 #612

Why this change

  • Review Queue failed closed when a pending draft referenced a note permanently deleted from Long-Term Memory.

What changed

  • Invalidates pending drafts targeting permanently deleted notes in the same storage transaction and preserves them as explicitly blocked review evidence.
  • Allows missing mutation-target and recovery context to render as blocked/unavailable while keeping source-note context fail-closed.
  • Refreshes review, draft, rejected-suggestion, integrity, and last-injection caches after permanent deletion.
  • Rebuilt Long-Term Memory client/server payloads, artifact, manifest hashes, and v2/v3 catalog entries.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: None; existing >=2.4.1 <4.0.0 range retained.
  • New or changed permissions/entrypoints: None.
  • Restart, storage, update, or uninstall impact: Permanent deletion now atomically invalidates affected pending draft files; package artifact rebuilt at version 1.2.14.

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

  • Passed source storage, extraction graph, extraction reliability, runtime, conversation-summary import, debug-log, and route regressions through the Engine server toolchain.
  • Passed Long-Term Memory UI regression, npm run check, catalog lanes, package locales, catalog validation, artifact payload checks, and git diff --check.
  • The lifecycle browser regression remains a proof gap: its existing Retry interaction repeatedly hit a Playwright DOM-detach timeout at tests/long-term-memory-lifecycle.regression.ts:1990.

Documentation impact

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

UI evidence (if applicable)

No screenshots captured; the browser fixture hit the documented DOM-detach timeout before visual verification completed.

Summary by CodeRabbit

  • Bug Fixes

    • Improved Review Queue context loading for source notes and optional related notes.
    • Updated note deletion handling to invalidate affected pending drafts and show a clear review blocker.
    • Expanded refresh behavior to update all relevant memory and review information.
    • Missing optional notes can now be handled without unnecessary errors.
  • Tests

    • Added regression coverage for review context transitions, missing notes, and draft invalidation.

🔄 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/613 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 8/26/2026 **Status:** ✅ Merged **Merged:** 8/26/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/permanent-delete-draft-invalidation` --- ### 📝 Commits (4) - [`7bf9b83`](https://github.com/Pasta-Devs/Marinara-Agents/commit/7bf9b834b0d757d7e93b42f212bfbc0b5479352c) fix(long-term-memory): block deleted draft targets - [`f88d7c8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/f88d7c8d7d6d23e5d082338c5446e6de401d715e) fix(long-term-memory): refresh deletion caches - [`335070a`](https://github.com/Pasta-Devs/Marinara-Agents/commit/335070a3522937c5cac023f47932462953e702b2) build(long-term-memory): rebuild deleted-target fix - [`3e3836b`](https://github.com/Pasta-Devs/Marinara-Agents/commit/3e3836b961e943da62754d10e664d3d3a3a1dbd3) fix(long-term-memory): key review context sources ### 📊 Changes **13 files changed** (+214 additions, -95 deletions) <details> <summary>View changed files</summary> 📝 `artifacts/long-term-memory-1.2.14.zip` (+0 -0) 📝 `catalog/catalog.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+6 -6) 📝 `packages/long-term-memory/client.js` (+20 -20) 📝 `packages/long-term-memory/manifest.json` (+4 -4) 📝 `packages/long-term-memory/server.mjs` (+40 -40) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/MemoryVault.tsx` (+10 -1) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/ReviewQueue.tsx` (+21 -7) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/api.ts` (+7 -2) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/storage.ts` (+32 -0) 📝 `tests/long-term-memory-feedback-clarity-ui.regression.mjs` (+10 -2) 📝 `tests/long-term-memory-storage.regression.ts` (+52 -1) </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 #612 ## Why this change - Review Queue failed closed when a pending draft referenced a note permanently deleted from Long-Term Memory. ## What changed - Invalidates pending drafts targeting permanently deleted notes in the same storage transaction and preserves them as explicitly blocked review evidence. - Allows missing mutation-target and recovery context to render as blocked/unavailable while keeping source-note context fail-closed. - Refreshes review, draft, rejected-suggestion, integrity, and last-injection caches after permanent deletion. - Rebuilt Long-Term Memory client/server payloads, artifact, manifest hashes, and v2/v3 catalog entries. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: None; existing `>=2.4.1 <4.0.0` range retained. - New or changed permissions/entrypoints: None. - Restart, storage, update, or uninstall impact: Permanent deletion now atomically invalidates affected pending draft files; package artifact rebuilt at version `1.2.14`. ## Validation - [x] `node scripts/validate-catalog.mjs` passes locally - [x] `git diff --check` passes locally - [x] Rebuilt every affected manifest, payload, artifact, and catalog entry - [x] Installed or updated the affected package through Marinara Engine - [x] Checked supported modes, restart behavior, and uninstall cleanup - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Passed source storage, extraction graph, extraction reliability, runtime, conversation-summary import, debug-log, and route regressions through the Engine server toolchain. - Passed Long-Term Memory UI regression, `npm run check`, catalog lanes, package locales, catalog validation, artifact payload checks, and `git diff --check`. - The lifecycle browser regression remains a proof gap: its existing Retry interaction repeatedly hit a Playwright DOM-detach timeout at `tests/long-term-memory-lifecycle.regression.ts:1990`. ## Documentation impact - [x] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) No screenshots captured; the browser fixture hit the documented DOM-detach timeout before visual verification completed. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved Review Queue context loading for source notes and optional related notes. * Updated note deletion handling to invalidate affected pending drafts and show a clear review blocker. * Expanded refresh behavior to update all relevant memory and review information. * Missing optional notes can now be handled without unnecessary errors. * **Tests** * Added regression coverage for review context transitions, missing notes, and draft invalidation. <!-- 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-20 17:33:33 +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#1047
No description provided.