[PR #479] [MERGED] fix(long-term-memory): bound review queue context #990

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

📋 Pull Request Information

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

Base: staging ← Head: feature(long-term-memory)/review-queue-context


📝 Commits (4)

  • 9ef4363 fix(long-term-memory): bound review queue context
  • d39abea fix(long-term-memory): fail closed on missing review context
  • f1d25c9 test(long-term-memory): avoid eval in lifecycle spy
  • 9c96302 Merge branch 'staging' into feature(long-term-memory)/review-queue-context

📊 Changes

15 files changed (+726 additions, -193 deletions)

View changed files

➕ artifacts/long-term-memory-1.2.10.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v3/catalog.json (+8 -8)
📝 packages/long-term-memory/client.js (+24 -24)
📝 packages/long-term-memory/manifest.json (+5 -5)
📝 packages/long-term-memory/server.mjs (+9 -9)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/ReviewQueue.tsx (+235 -94)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/api.ts (+23 -0)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json (+3 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts (+76 -34)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-feedback-clarity-ui.regression.mjs (+27 -0)
📝 tests/long-term-memory-lifecycle.regression.ts (+226 -2)
📝 tests/long-term-memory-routes.regression.ts (+73 -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 #467

Why this change

Long-Term Memory's Review Queue loaded all notes to render bounded review context, and context failures or incomplete responses could leave review actions without the context they require. Review state also needed reliable persistence across blur, save, pagehide, and unmount lifecycle events.

What changed

  • Added bounded GET /notes?ids=... retrieval with validation, stable ordering, deduplication, and a 100-ID limit.
  • Added chunked client retrieval and fail-closed handling for omitted context IDs.
  • Updated Review Queue context hydration, accessible controls, retry states, and persistence flushes.
  • Included persisted merge/rewrite targets even when their mutation kind is create_note.
  • Added route, UI contract, and Engine-backed lifecycle regressions.
  • Rebuilt Long-Term Memory 1.2.10, its payloads, artifact, manifest, and v2/v3/legacy catalog entries.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: None; existing 2.4.1 <= Engine < 4.0.0 range retained.
  • New or changed permissions/entrypoints: None.
  • Restart, storage, update, or uninstall impact: Existing package restart requirement retained; review selections and edits persist in local storage only.

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

Automated validation performed locally:

  • Long-Term Memory route regression with the Engine server toolchain.
  • Engine-backed lifecycle regression covering install, offline restart, backup inclusion, uninstall, reinstall, and durable-byte preservation.
  • UI feedback clarity regression.
  • npm run check, catalog lane validation, package locale validation, catalog validation, and git diff --check.

Documentation impact

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

UI evidence (if applicable)

No screenshots attached; the lifecycle regression covers the Review Queue mobile and desktop UI contracts.

Summary by CodeRabbit

  • New Features

    • Review queues now load relevant memory notes with loading, error, and unavailable states.
    • Added targeted note retrieval by ID with batching, ordering, and missing-note detection.
    • Review changes save reliably through debounced updates and page-exit flushing.
    • Editing and acceptance controls remain disabled until note context is ready.
  • Bug Fixes

    • Improved handling of missing context and failed note requests.
    • Added validation for incompatible note filters and oversized requests.
    • Updated the Long-Term Memory package to version 1.2.10.

🔄 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/479 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 8/21/2026 **Status:** ✅ Merged **Merged:** 8/22/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `feature(long-term-memory)/review-queue-context` --- ### 📝 Commits (4) - [`9ef4363`](https://github.com/Pasta-Devs/Marinara-Agents/commit/9ef43639669293f0c645bb50afd23057ae525ee9) fix(long-term-memory): bound review queue context - [`d39abea`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d39abea0c5913b176cc9a28fba4e2d667a750128) fix(long-term-memory): fail closed on missing review context - [`f1d25c9`](https://github.com/Pasta-Devs/Marinara-Agents/commit/f1d25c9fa2c0f344eba0556e664f9ee9e0e79654) test(long-term-memory): avoid eval in lifecycle spy - [`9c96302`](https://github.com/Pasta-Devs/Marinara-Agents/commit/9c963021e3abc967e1718007ba523eb673b373eb) Merge branch 'staging' into feature(long-term-memory)/review-queue-context ### 📊 Changes **15 files changed** (+726 additions, -193 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.2.10.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `packages/long-term-memory/client.js` (+24 -24) 📝 `packages/long-term-memory/manifest.json` (+5 -5) 📝 `packages/long-term-memory/server.mjs` (+9 -9) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/ReviewQueue.tsx` (+235 -94) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/api.ts` (+23 -0) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json` (+3 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts` (+76 -34) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-feedback-clarity-ui.regression.mjs` (+27 -0) 📝 `tests/long-term-memory-lifecycle.regression.ts` (+226 -2) 📝 `tests/long-term-memory-routes.regression.ts` (+73 -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`. <!-- Open as a draft while implementation is in progress. Mark Ready for review only after validation and self-review. --> ## Linked issue Closes #467 ## Why this change Long-Term Memory's Review Queue loaded all notes to render bounded review context, and context failures or incomplete responses could leave review actions without the context they require. Review state also needed reliable persistence across blur, save, pagehide, and unmount lifecycle events. ## What changed - Added bounded `GET /notes?ids=...` retrieval with validation, stable ordering, deduplication, and a 100-ID limit. - Added chunked client retrieval and fail-closed handling for omitted context IDs. - Updated Review Queue context hydration, accessible controls, retry states, and persistence flushes. - Included persisted merge/rewrite targets even when their mutation kind is `create_note`. - Added route, UI contract, and Engine-backed lifecycle regressions. - Rebuilt Long-Term Memory `1.2.10`, its payloads, artifact, manifest, and v2/v3/legacy catalog entries. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: None; existing `2.4.1 <= Engine < 4.0.0` range retained. - New or changed permissions/entrypoints: None. - Restart, storage, update, or uninstall impact: Existing package restart requirement retained; review selections and edits persist in local storage only. ## 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 Automated validation performed locally: - Long-Term Memory route regression with the Engine server toolchain. - Engine-backed lifecycle regression covering install, offline restart, backup inclusion, uninstall, reinstall, and durable-byte preservation. - UI feedback clarity regression. - `npm run check`, catalog lane validation, package locale validation, catalog validation, and `git diff --check`. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) No screenshots attached; the lifecycle regression covers the Review Queue mobile and desktop UI contracts. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Review queues now load relevant memory notes with loading, error, and unavailable states. * Added targeted note retrieval by ID with batching, ordering, and missing-note detection. * Review changes save reliably through debounced updates and page-exit flushing. * Editing and acceptance controls remain disabled until note context is ready. * **Bug Fixes** * Improved handling of missing context and failed note requests. * Added validation for incompatible note filters and oversized requests. * Updated the Long-Term Memory package to version 1.2.10. <!-- 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:01 +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#990
No description provided.