[PR #1046] [MERGED] fix(long-term-memory): preserve trusted subject identity choices (#1041) #1264

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

📋 Pull Request Information

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

Base: staging ← Head: fix(long-term-memory)/1041-subject-resolution


📝 Commits (6)

  • 3399cb4 fix(long-term-memory): preserve trusted subject identity choices (#1041)
  • 1f3ae29 fix(ltm): close duplicate alias candidates (#1041)
  • 05a85a1 fix(ltm): account for rejected alias candidates (#1041)
  • 5da358b fix(ltm): preserve alias graph support and partial outcomes (#1041)
  • 1cebb4b Merge remote-tracking branch 'upstream/staging' into fix(long-term-memory)/1041-subject-resolution
  • 5a82e6b Merge branch 'staging' into fix(long-term-memory)/1041-subject-resolution

📊 Changes

22 files changed (+943 additions, -376 deletions)

View changed files

➕ artifacts/long-term-memory-1.3.16.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 (+16 -16)
📝 packages/long-term-memory/manifest.json (+5 -5)
📝 packages/long-term-memory/server.mjs (+61 -61)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/ReviewQueue.tsx (+2 -0)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json (+1 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/draft-projector.ts (+10 -1)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-compiler.ts (+25 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-extraction.ts (+71 -16)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-extraction.ts (+1 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/subject-identity.ts (+163 -199)
📝 packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts (+8 -1)
📝 scripts/build-feature-packages.mjs (+1 -1)

...and 2 more files

📄 Description

Pull request

Linked issue

Closes #1041

Why this change

Explicitly selected subjects must not resolve to a different character, and a reviewed alias choice must persist even when its fact was already stored.

What changed

  • Resolve LTM subjects using trusted identities; fail closed on ambiguous, fuzzy, or conflicting names while preserving chat-family isolation.
  • Save reviewed alias titles for existing canonical notes, including deduplicated evidence; retain source facts without duplicate writes.
  • Add focused identity and extraction regressions and rebuild Long-Term Memory 1.3.16 bundles, archive, manifests, catalogs, and release notes.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: existing declared range retained.
  • New or changed permissions/entrypoints: none.
  • Restart, storage, update, or uninstall impact: existing note title may change only for an explicitly chosen, validated alias; installation/restart/uninstall regressions passed.
  • Security-sensitive identity and executable bundle changes validated by LTM and catalog suites.

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

  • Post-commit local Push proof: test-ltm.sh all, node scripts/typecheck-packages.mjs long-term-memory, catalog lane/locale/locale-key/catalog/release-note validators, npm run check, and git diff --check upstream/staging...HEAD passed at 3399cb4e. Lint reported 901 warnings and zero errors.
  • Rebuilt long-term-memory before proof and verified a clean worktree; installation regression covers install, restart, backup, uninstall, and reinstall.
  • Maintainer attests that four reviews have been performed; their records are not available in this workspace.

Documentation impact

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

UI evidence (if applicable)

  • No screenshots; review queue label and locale covered by automated LTM UI regression.

Summary by CodeRabbit

  • New Features
    • Long-Term Memory 1.3.16 can propose renaming a character note to a selected alias after its identity is reviewed. Proposed title changes appear in the review queue for approval.
  • Improvements
    • Short names and spelling variations are no longer automatically assigned to characters; uncertain matches remain available for review.
    • Identity matching uses explicit keys, exact names, and declared aliases, and recovery of character and relationship identities from valid subject names is more reliable.

🔄 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/1046 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 9/23/2026 **Status:** ✅ Merged **Merged:** 9/23/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/1041-subject-resolution` --- ### 📝 Commits (6) - [`3399cb4`](https://github.com/Pasta-Devs/Marinara-Agents/commit/3399cb4e664311089ea9ee88a0ad9dda65a94c16) fix(long-term-memory): preserve trusted subject identity choices (#1041) - [`1f3ae29`](https://github.com/Pasta-Devs/Marinara-Agents/commit/1f3ae2959027458bc2cfb30fc7f38b62f912577c) fix(ltm): close duplicate alias candidates (#1041) - [`05a85a1`](https://github.com/Pasta-Devs/Marinara-Agents/commit/05a85a1cdc2713adc5d21ccda049ee9d9419dedc) fix(ltm): account for rejected alias candidates (#1041) - [`5da358b`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5da358b0b2efd699fa1e824a8888f246b817d740) fix(ltm): preserve alias graph support and partial outcomes (#1041) - [`1cebb4b`](https://github.com/Pasta-Devs/Marinara-Agents/commit/1cebb4baf1400f366a1642f5bd4ca0a50543a071) Merge remote-tracking branch 'upstream/staging' into fix(long-term-memory)/1041-subject-resolution - [`5a82e6b`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5a82e6b1af0ebf7f7e9c579d8ea38a633344e086) Merge branch 'staging' into fix(long-term-memory)/1041-subject-resolution ### 📊 Changes **22 files changed** (+943 additions, -376 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.3.16.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` (+16 -16) 📝 `packages/long-term-memory/manifest.json` (+5 -5) 📝 `packages/long-term-memory/server.mjs` (+61 -61) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/ReviewQueue.tsx` (+2 -0) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json` (+1 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/draft-projector.ts` (+10 -1) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-compiler.ts` (+25 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-extraction.ts` (+71 -16) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-extraction.ts` (+1 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/subject-identity.ts` (+163 -199) 📝 `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts` (+8 -1) 📝 `scripts/build-feature-packages.mjs` (+1 -1) _...and 2 more files_ </details> ### 📄 Description # Pull request ## Linked issue Closes #1041 ## Why this change Explicitly selected subjects must not resolve to a different character, and a reviewed alias choice must persist even when its fact was already stored. ## What changed - Resolve LTM subjects using trusted identities; fail closed on ambiguous, fuzzy, or conflicting names while preserving chat-family isolation. - Save reviewed alias titles for existing canonical notes, including deduplicated evidence; retain source facts without duplicate writes. - Add focused identity and extraction regressions and rebuild Long-Term Memory 1.3.16 bundles, archive, manifests, catalogs, and release notes. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: existing declared range retained. - New or changed permissions/entrypoints: none. - Restart, storage, update, or uninstall impact: existing note title may change only for an explicitly chosen, validated alias; installation/restart/uninstall regressions passed. - Security-sensitive identity and executable bundle changes validated by LTM and catalog suites. ## 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 - Post-commit local Push proof: `test-ltm.sh all`, `node scripts/typecheck-packages.mjs long-term-memory`, catalog lane/locale/locale-key/catalog/release-note validators, `npm run check`, and `git diff --check upstream/staging...HEAD` passed at `3399cb4e`. Lint reported 901 warnings and zero errors. - Rebuilt `long-term-memory` before proof and verified a clean worktree; installation regression covers install, restart, backup, uninstall, and reinstall. - Maintainer attests that four reviews have been performed; their records are not available in this workspace. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) - No screenshots; review queue label and locale covered by automated LTM UI regression. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Long-Term Memory 1.3.16 can propose renaming a character note to a selected alias after its identity is reviewed. Proposed title changes appear in the review queue for approval. * **Improvements** * Short names and spelling variations are no longer automatically assigned to characters; uncertain matches remain available for review. * Identity matching uses explicit keys, exact names, and declared aliases, and recovery of character and relationship identities from valid subject names is more reliable. <!-- 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:21 +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#1264
No description provided.