[PR #1065] [MERGED] fix(ltm): surface legacy identity conflicts and link choices #1277

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

📋 Pull Request Information

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

Base: staging ← Head: fix/long-term-memory/legacy-identity-repair


📝 Commits (10+)

  • e35e416 fix(ltm): surface legacy identity conflicts and link choices (#1043)
  • ba61c87 Merge remote-tracking branch 'upstream/staging' into fix/long-term-memory/legacy-identity-repair
  • a9846ae fix(ltm): repair legacy identity review choices (#1043)
  • edea37c fix(ltm): preserve explicit identity link choices
  • 6135e4b Merge remote-tracking branch 'upstream/staging' into fix/long-term-memory/legacy-identity-repair
  • bbaef97 fix(ltm): address ambiguous identity link review findings (#1043)
  • 824636a Merge remote-tracking branch 'upstream/staging' into fix/long-term-memory/legacy-identity-repair
  • 296fb0f fix(ltm): keep edited link choices pending during auto-apply (#1043)
  • 6441919 fix(ltm): keep ambiguous dependencies pending and align scope (#1043)
  • 0a1f8ed Merge remote-tracking branch 'upstream/staging' into fix/long-term-memory/legacy-identity-repair

📊 Changes

24 files changed (+1621 additions, -208 deletions)

View changed files

📝 README.md (+1 -1)
➕ artifacts/long-term-memory-1.3.18.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/long-term-memory/CHANGELOG.md (+4 -0)
📝 packages/long-term-memory/client.js (+24 -24)
📝 packages/long-term-memory/manifest.json (+5 -5)
📝 packages/long-term-memory/server.mjs (+51 -51)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/ReviewQueue.tsx (+185 -10)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json (+4 -0)
➕ packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/review-queue-ambiguous-link.ts (+81 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/reconciliation.ts (+173 -4)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts (+4 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/subject-identity.ts (+207 -52)
📝 packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts (+28 -14)
📝 scripts/build-feature-packages.mjs (+1 -1)

...and 4 more files

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

Why this change

Legacy ID/title disagreements and duplicate subject identities could silently select the wrong Long-Term Memory note. Ambiguous relationship links also needed a recoverable, scoped choice rather than a warning without a usable path forward.

What changed

  • long-term-memory 1.3.18 surfaces identity conflicts without selecting or merging notes automatically; the existing explicit preview/confirmation flow remains responsible for identity merges.
  • Draft review exposes scoped ambiguous-link choices and requires an explicit edit. Preflight and apply reject invalid, stale, archived, or out-of-scope choices.
  • Added identity, storage, route, and link-choice regressions; rebuilt client.js, server.mjs, manifest, artifact ZIP, catalog entries, and release-note sidecars from source.

Package and security impact

  • Affected package IDs: long-term-memory.
  • Engine compatibility impact: existing engine.min 2.4.1 and catalog lanes unchanged.
  • New or changed permissions/entrypoints: no new permissions or entrypoints; existing executable client/server payloads changed and were rebuilt with manifest hashes.
  • Restart, storage, update, or uninstall impact: no automatic identity merge or storage migration. Stale scoped targets fail closed. Automated installation proof covers offline restart, backup inclusion, uninstall, reinstall, and durable-byte preservation. A direct 1.3.17 → 1.3.18 update was not exercised.

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 local Push checks on ba61c87ef77d1e9287e3ffe7918b9f9549b02551: test-fast.sh, npm run typecheck:packages, npm run test:security, and test-ltm.sh scenarios local-characters, storage, routes-drafts, review-queue-ambiguous-link, browser, and installation passed with explicit Agents and Engine roots.
  • Locale sync/validation, bundled locale-key validation, catalog lane/build-provenance validation, catalog/archive/hash validation, release-note regression, and git diff --check upstream/staging...HEAD passed. unzip -t artifacts/long-term-memory-1.3.18.zip found no errors.
  • No human-driven UI or update-path walkthrough was performed. The browser lifecycle test covers general review and activation, but does not include a mounted ambiguous-link rerender fixture; the focused regression covers selected-target state logic.

Documentation impact

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

Updated packages/long-term-memory/CHANGELOG.md and tests/README.md; the existing official catalog listing needs no new entry.

UI evidence (if applicable)

No screenshot or recording captured; the browser lifecycle regression passed. A dedicated mounted ambiguous-link selection recording remains unverified.

Summary by CodeRabbit

  • New Features
    • Long-Term Memory extraction now flags conflicting legacy IDs or titles and duplicate subject notes instead of automatically choosing a match. Identity merges continue to require preview and confirmation.
    • When a link target is ambiguous, choose a scoped candidate in the review queue before applying the change. Your selection is retained while reviewing the draft.
  • Bug Fixes
    • Link changes are blocked if the selected target is no longer available or falls outside the draft’s scope.
  • Updates
    • Long-Term Memory is now version 1.3.18.
    • Long-Term Memory now supports Marinara Engine v2.4.1 and later.

🔄 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/1065 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 9/24/2026 **Status:** ✅ Merged **Merged:** 9/25/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix/long-term-memory/legacy-identity-repair` --- ### 📝 Commits (10+) - [`e35e416`](https://github.com/Pasta-Devs/Marinara-Agents/commit/e35e4168b75304475fee21aab3eb4b51181104f5) fix(ltm): surface legacy identity conflicts and link choices (#1043) - [`ba61c87`](https://github.com/Pasta-Devs/Marinara-Agents/commit/ba61c87ef77d1e9287e3ffe7918b9f9549b02551) Merge remote-tracking branch 'upstream/staging' into fix/long-term-memory/legacy-identity-repair - [`a9846ae`](https://github.com/Pasta-Devs/Marinara-Agents/commit/a9846aef5dd4fdab3341b0edc3695c2728c7a676) fix(ltm): repair legacy identity review choices (#1043) - [`edea37c`](https://github.com/Pasta-Devs/Marinara-Agents/commit/edea37cbea45847850c3ddcf62a6172007cac28d) fix(ltm): preserve explicit identity link choices - [`6135e4b`](https://github.com/Pasta-Devs/Marinara-Agents/commit/6135e4b51cdc5080d815215ffaec1af4c2d7f864) Merge remote-tracking branch 'upstream/staging' into fix/long-term-memory/legacy-identity-repair - [`bbaef97`](https://github.com/Pasta-Devs/Marinara-Agents/commit/bbaef97a55c0f6718b53b57d340e8061d08ece8d) fix(ltm): address ambiguous identity link review findings (#1043) - [`824636a`](https://github.com/Pasta-Devs/Marinara-Agents/commit/824636af60fac734c94b6626a987dfc2e3e74751) Merge remote-tracking branch 'upstream/staging' into fix/long-term-memory/legacy-identity-repair - [`296fb0f`](https://github.com/Pasta-Devs/Marinara-Agents/commit/296fb0f0a6aa3d42de21ec7d1a022d5967fb4748) fix(ltm): keep edited link choices pending during auto-apply (#1043) - [`6441919`](https://github.com/Pasta-Devs/Marinara-Agents/commit/644191977dcd6333e85501a78d4bff4e5d7e9015) fix(ltm): keep ambiguous dependencies pending and align scope (#1043) - [`0a1f8ed`](https://github.com/Pasta-Devs/Marinara-Agents/commit/0a1f8ed726aac3dbe2cf9a168f7e586c9aa4175e) Merge remote-tracking branch 'upstream/staging' into fix/long-term-memory/legacy-identity-repair ### 📊 Changes **24 files changed** (+1621 additions, -208 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -1) ➕ `artifacts/long-term-memory-1.3.18.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/long-term-memory/CHANGELOG.md` (+4 -0) 📝 `packages/long-term-memory/client.js` (+24 -24) 📝 `packages/long-term-memory/manifest.json` (+5 -5) 📝 `packages/long-term-memory/server.mjs` (+51 -51) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/ReviewQueue.tsx` (+185 -10) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json` (+4 -0) ➕ `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/review-queue-ambiguous-link.ts` (+81 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/reconciliation.ts` (+173 -4) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts` (+4 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/subject-identity.ts` (+207 -52) 📝 `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts` (+28 -14) 📝 `scripts/build-feature-packages.mjs` (+1 -1) _...and 4 more files_ </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 #1043 ## Why this change Legacy ID/title disagreements and duplicate subject identities could silently select the wrong Long-Term Memory note. Ambiguous relationship links also needed a recoverable, scoped choice rather than a warning without a usable path forward. ## What changed - `long-term-memory` 1.3.18 surfaces identity conflicts without selecting or merging notes automatically; the existing explicit preview/confirmation flow remains responsible for identity merges. - Draft review exposes scoped ambiguous-link choices and requires an explicit edit. Preflight and apply reject invalid, stale, archived, or out-of-scope choices. - Added identity, storage, route, and link-choice regressions; rebuilt `client.js`, `server.mjs`, manifest, artifact ZIP, catalog entries, and release-note sidecars from source. ## Package and security impact - Affected package IDs: `long-term-memory`. - Engine compatibility impact: existing `engine.min` 2.4.1 and catalog lanes unchanged. - New or changed permissions/entrypoints: no new permissions or entrypoints; existing executable client/server payloads changed and were rebuilt with manifest hashes. - Restart, storage, update, or uninstall impact: no automatic identity merge or storage migration. Stale scoped targets fail closed. Automated installation proof covers offline restart, backup inclusion, uninstall, reinstall, and durable-byte preservation. A direct 1.3.17 → 1.3.18 update was not exercised. ## 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 local Push checks on `ba61c87ef77d1e9287e3ffe7918b9f9549b02551`: `test-fast.sh`, `npm run typecheck:packages`, `npm run test:security`, and `test-ltm.sh` scenarios `local-characters`, `storage`, `routes-drafts`, `review-queue-ambiguous-link`, `browser`, and `installation` passed with explicit Agents and Engine roots. - Locale sync/validation, bundled locale-key validation, catalog lane/build-provenance validation, catalog/archive/hash validation, release-note regression, and `git diff --check upstream/staging...HEAD` passed. `unzip -t artifacts/long-term-memory-1.3.18.zip` found no errors. - No human-driven UI or update-path walkthrough was performed. The browser lifecycle test covers general review and activation, but does not include a mounted ambiguous-link rerender fixture; the focused regression covers selected-target state logic. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation Updated `packages/long-term-memory/CHANGELOG.md` and `tests/README.md`; the existing official catalog listing needs no new entry. ## UI evidence (if applicable) No screenshot or recording captured; the browser lifecycle regression passed. A dedicated mounted ambiguous-link selection recording remains unverified. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Long-Term Memory extraction now flags conflicting legacy IDs or titles and duplicate subject notes instead of automatically choosing a match. Identity merges continue to require preview and confirmation. * When a link target is ambiguous, choose a scoped candidate in the review queue before applying the change. Your selection is retained while reviewing the draft. * **Bug Fixes** * Link changes are blocked if the selected target is no longer available or falls outside the draft’s scope. * **Updates** * Long-Term Memory is now version 1.3.18. * Long-Term Memory now supports Marinara Engine v2.4.1 and later. <!-- 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:07:32 +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#1277
No description provided.