[PR #722] [MERGED] feat(long-term-memory): clear rejected suggestions and explain diagnostics #1108

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

📋 Pull Request Information

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

Base: staging ← Head: feature(long-term-memory)/rejected-suggestions-clear-diagnostics


📝 Commits (5)

  • 846e636 feat(long-term-memory): clear rejected suggestions and explain diagnostics
  • f392f2b fix(long-term-memory): redact rejection diagnostics
  • 60783f3 fix(long-term-memory): redact closure diagnostics
  • 5211c8e test(long-term-memory): tighten review feedback coverage
  • f8fe689 Merge branch 'staging' into feature(long-term-memory)/rejected-suggestions-clear-diagnostics

📊 Changes

19 files changed (+656 additions, -140 deletions)

View changed files

📝 artifacts/long-term-memory-1.2.20.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 (+18 -18)
📝 packages/long-term-memory/manifest.json (+4 -4)
📝 packages/long-term-memory/server.mjs (+44 -44)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/ReviewQueue.tsx (+122 -10)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json (+24 -1)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-extraction.ts (+8 -1)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-validation.ts (+30 -7)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/rejected-suggestions.ts (+8 -4)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts (+13 -1)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/subject-identity.ts (+1 -0)
📝 packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts (+9 -0)
📝 tests/long-term-memory-extraction-graph.regression.ts (+85 -2)
📝 tests/long-term-memory-lifecycle.regression.ts (+144 -25)
📝 tests/long-term-memory-routes.regression.ts (+65 -0)
📝 tests/long-term-memory-storage.regression.ts (+63 -5)

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

Why this change

Long-Term Memory users could delete rejected suggestions only one at a time, and the Review Queue often showed broad rejection labels instead of the exact validation failure. This made source cleanup risky and made rejected suggestions difficult to correct.

What changed

  • Added an atomic, source-scoped DELETE /rejected-suggestions?sourceNoteId=... operation with confirmation, idempotent deletion, and an actual deleted count.
  • Added bounded optional validatorCode data to rejected candidates, preserving legacy records and keeping fingerprints stable.
  • Preserved precise server diagnostics while preventing internal target and generated-note IDs from entering persisted user-facing messages.
  • Updated the Review Queue with source-scoped clear actions, success/failure announcements, exact rejection messages, suggested destinations, validator-specific corrections, and expandable parser details.
  • Added extraction, storage, route, backup compatibility, and lifecycle regressions, including cancel, API failure, cross-source preservation, and closure-redaction paths.
  • Rebuilt Long-Term Memory client.js, server.mjs, manifest hashes, artifact, and catalog/catalog.json, catalog/v2/catalog.json, and catalog/v3/catalog.json.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: None; manifest compatibility range is unchanged.
  • New or changed permissions/entrypoints: None.
  • Restart, storage, update, or uninstall impact: Rejected-suggestion clearing uses the existing vault lock and atomic JSON writer; backup export/import preserves the new optional field. Lifecycle coverage passed restart, backup, uninstall, and reinstall checks.

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 affected proofs passed: extraction graph, extraction reliability, storage, routes, and lifecycle.
  • test-ci.sh passed formatting/lint, security, catalog, locale, artifact, and workflow gates; lint reported 69 pre-existing warnings and no errors.
  • The complete test-ltm.sh all run passed the affected lifecycle path, then stopped at the unrelated existing scope-fallback-labels assertion in tests/long-term-memory-scope-fallback-labels.regression.ts:69; the affected lifecycle test was rerun independently and passed.
  • No manual Engine install/update or human visual review was performed.

Documentation impact

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

UI evidence (if applicable)

The lifecycle fixture exercised the updated Review Queue flow and produced automated visual output under /tmp/marinara-visuals-ltm-rejected-suggestions-final.

Summary by CodeRabbit

  • New Features

    • Clear all rejected suggestions for a specific source note from the review queue, with confirmation, progress, and success or error feedback.
    • Rejected suggestions now provide more targeted recommended fixes and parser details.
  • Bug Fixes

    • Improved recovery titles and rejection messages with clearer suggested-destination wording.
    • Validation diagnostics now preserve specific error categories and provide more helpful, concise messages.
    • Rejected suggestions are cleared only for the selected source, preventing unrelated suggestions from being removed.

🔄 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/722 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 9/5/2026 **Status:** ✅ Merged **Merged:** 9/5/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `feature(long-term-memory)/rejected-suggestions-clear-diagnostics` --- ### 📝 Commits (5) - [`846e636`](https://github.com/Pasta-Devs/Marinara-Agents/commit/846e6360bc96099840147573f6fff71894e7250d) feat(long-term-memory): clear rejected suggestions and explain diagnostics - [`f392f2b`](https://github.com/Pasta-Devs/Marinara-Agents/commit/f392f2b6ea854f0cd877df31e3b9ad0d091d56ad) fix(long-term-memory): redact rejection diagnostics - [`60783f3`](https://github.com/Pasta-Devs/Marinara-Agents/commit/60783f3f2955e3b7c13cfcb060ddce54dd314a72) fix(long-term-memory): redact closure diagnostics - [`5211c8e`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5211c8ea0eeaef4ca2372d8ff0fc5aa65b51f63b) test(long-term-memory): tighten review feedback coverage - [`f8fe689`](https://github.com/Pasta-Devs/Marinara-Agents/commit/f8fe6899daef3053c48685a9c38b23ff8ac6440c) Merge branch 'staging' into feature(long-term-memory)/rejected-suggestions-clear-diagnostics ### 📊 Changes **19 files changed** (+656 additions, -140 deletions) <details> <summary>View changed files</summary> 📝 `artifacts/long-term-memory-1.2.20.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` (+18 -18) 📝 `packages/long-term-memory/manifest.json` (+4 -4) 📝 `packages/long-term-memory/server.mjs` (+44 -44) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/ReviewQueue.tsx` (+122 -10) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json` (+24 -1) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-extraction.ts` (+8 -1) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-validation.ts` (+30 -7) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/rejected-suggestions.ts` (+8 -4) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts` (+13 -1) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/subject-identity.ts` (+1 -0) 📝 `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts` (+9 -0) 📝 `tests/long-term-memory-extraction-graph.regression.ts` (+85 -2) 📝 `tests/long-term-memory-lifecycle.regression.ts` (+144 -25) 📝 `tests/long-term-memory-routes.regression.ts` (+65 -0) 📝 `tests/long-term-memory-storage.regression.ts` (+63 -5) </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 #719 ## Why this change Long-Term Memory users could delete rejected suggestions only one at a time, and the Review Queue often showed broad rejection labels instead of the exact validation failure. This made source cleanup risky and made rejected suggestions difficult to correct. ## What changed - Added an atomic, source-scoped `DELETE /rejected-suggestions?sourceNoteId=...` operation with confirmation, idempotent deletion, and an actual deleted count. - Added bounded optional `validatorCode` data to rejected candidates, preserving legacy records and keeping fingerprints stable. - Preserved precise server diagnostics while preventing internal target and generated-note IDs from entering persisted user-facing messages. - Updated the Review Queue with source-scoped clear actions, success/failure announcements, exact rejection messages, suggested destinations, validator-specific corrections, and expandable parser details. - Added extraction, storage, route, backup compatibility, and lifecycle regressions, including cancel, API failure, cross-source preservation, and closure-redaction paths. - Rebuilt Long-Term Memory `client.js`, `server.mjs`, manifest hashes, artifact, and `catalog/catalog.json`, `catalog/v2/catalog.json`, and `catalog/v3/catalog.json`. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: None; manifest compatibility range is unchanged. - New or changed permissions/entrypoints: None. - Restart, storage, update, or uninstall impact: Rejected-suggestion clearing uses the existing vault lock and atomic JSON writer; backup export/import preserves the new optional field. Lifecycle coverage passed restart, backup, uninstall, and reinstall checks. ## 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 affected proofs passed: extraction graph, extraction reliability, storage, routes, and lifecycle. - `test-ci.sh` passed formatting/lint, security, catalog, locale, artifact, and workflow gates; lint reported 69 pre-existing warnings and no errors. - The complete `test-ltm.sh all` run passed the affected lifecycle path, then stopped at the unrelated existing `scope-fallback-labels` assertion in `tests/long-term-memory-scope-fallback-labels.regression.ts:69`; the affected lifecycle test was rerun independently and passed. - No manual Engine install/update or human visual review was performed. ## Documentation impact - [x] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) The lifecycle fixture exercised the updated Review Queue flow and produced automated visual output under `/tmp/marinara-visuals-ltm-rejected-suggestions-final`. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Clear all rejected suggestions for a specific source note from the review queue, with confirmation, progress, and success or error feedback. * Rejected suggestions now provide more targeted recommended fixes and parser details. * **Bug Fixes** * Improved recovery titles and rejection messages with clearer suggested-destination wording. * Validation diagnostics now preserve specific error categories and provide more helpful, concise messages. * Rejected suggestions are cleared only for the selected source, preventing unrelated suggestions from being removed. <!-- 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:02:51 +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#1108
No description provided.