[PR #1036] [MERGED] fix(long-term-memory): stop imported sources forking character identities (#1035) #1259

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

📋 Pull Request Information

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

Base: staging ← Head: fix(long-term-memory)/1035-source-identity-collisions


📝 Commits (7)

  • 2c537f4 fix(long-term-memory): stop imported sources forking character identities (#1035)
  • 634a4f8 Merge remote-tracking branch 'upstream/staging' into fix(long-term-memory)/1035-source-identity-collisions
  • a374b01 Merge branch 'staging' into fix(long-term-memory)/1035-source-identity-collisions
  • ed861f6 fix(long-term-memory): make source identity canonicalization order-independent (#1035)
  • 5a5c8fe fix(long-term-memory): resolve source aliases to trusted identities (#1035)
  • 2cd3f87 Merge remote-tracking branch 'upstream/staging' into fix(long-term-memory)/1035-source-identity-collisions
  • 29d1299 Merge branch 'fix(long-term-memory)/1035-source-identity-collisions' of https://github.com/Promansis/Marinara-Agents into fix(long-term-memory)/1035-source-identity-collisions

📊 Changes

13 files changed (+323 additions, -94 deletions)

View changed files

➕ artifacts/long-term-memory-1.3.13.zip (+0 -0)
📝 catalog/catalog.json (+6 -6)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+6 -6)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+6 -6)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/long-term-memory/CHANGELOG.md (+5 -0)
📝 packages/long-term-memory/manifest.json (+3 -3)
📝 packages/long-term-memory/server.mjs (+45 -45)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/subject-identity.ts (+71 -6)
📝 scripts/build-feature-packages.mjs (+1 -1)
📝 tests/long-term-memory-local-characters.regression.ts (+162 -3)

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

Why this change

  • Imported roleplay sources that mentioned a character by more than one surface form (short name, first name, full name) created a competing local character identity for each form. Those identities then collided, and extraction dropped every candidate with Dropped a candidate whose subject matches more than one trusted roster identity.
  • A roster character's full name could also be dropped as ambiguous when its variants appeared in the imported source.

What changed

  • long-term-memory subject-identity.ts: source-backed names are now collapsed into one canonical identity per character before catalog insertion (canonicalSourceBackedNames), and a source name already covered by a trusted roster, note, or earlier source identity no longer creates a duplicate (mutableHasRelatedIdentity). Genuinely ambiguous names still fail closed.
  • tests/long-term-memory-local-characters.regression.ts: added roster-backed and unrostered variant coverage using the production notes/localSourceNotes catalog inputs.
  • Version bump 1.3.12 → 1.3.13 with CHANGELOG.md entry; regenerated manifest.json, server.mjs, artifacts/long-term-memory-1.3.13.zip, and the catalog/, catalog/v2/, catalog/v3/ entries and notes.

Package and security impact

  • Affected package IDs: long-term-memory (1.3.13)
  • Engine compatibility impact: none; engine.min remains 2.4.1
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: none; identity resolution 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

  • Local validation run on 634a4f87: test-ltm.sh all and test-ci.sh both exited 0; catalog lanes, package locales, catalog validation, and catalog release-notes regressions passed. test-ltm.sh all includes the added roster-backed and unrostered variant regressions. Human verification checkboxes above were intentionally left unchecked.

Documentation impact

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

UI evidence (if applicable)

  • N/A — no UI change.

Summary by CodeRabbit

  • Bug Fixes
    • Imported source notes now keep short, first, and full-name variants of the same character linked to one memory instead of splitting them into separate memories.
    • Character matching is now consistent regardless of note order.
    • When a roster match exists, the character’s full name is retained and linked to that identity.
    • Names that genuinely conflict between trusted identities remain unresolved to prevent incorrect associations.
  • Updates
    • Long-Term Memory updated to version 1.3.13.

🔄 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/1036 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 9/22/2026 **Status:** ✅ Merged **Merged:** 9/23/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix(long-term-memory)/1035-source-identity-collisions` --- ### 📝 Commits (7) - [`2c537f4`](https://github.com/Pasta-Devs/Marinara-Agents/commit/2c537f42d7572555108030295bf766e86cf6aeb8) fix(long-term-memory): stop imported sources forking character identities (#1035) - [`634a4f8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/634a4f8741eae75d46b1ff7adf32484c5d9072ff) Merge remote-tracking branch 'upstream/staging' into fix(long-term-memory)/1035-source-identity-collisions - [`a374b01`](https://github.com/Pasta-Devs/Marinara-Agents/commit/a374b01879d9be3d750619de2f12068123729230) Merge branch 'staging' into fix(long-term-memory)/1035-source-identity-collisions - [`ed861f6`](https://github.com/Pasta-Devs/Marinara-Agents/commit/ed861f64e85925f83fbafe9b9579769d6c71fe5e) fix(long-term-memory): make source identity canonicalization order-independent (#1035) - [`5a5c8fe`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5a5c8fe815ff07c337015a43e34996aa581e48fb) fix(long-term-memory): resolve source aliases to trusted identities (#1035) - [`2cd3f87`](https://github.com/Pasta-Devs/Marinara-Agents/commit/2cd3f87ac9fe09c5287add31b1743166bacbe6dd) Merge remote-tracking branch 'upstream/staging' into fix(long-term-memory)/1035-source-identity-collisions - [`29d1299`](https://github.com/Pasta-Devs/Marinara-Agents/commit/29d12999dcdb4de6d7c57ba3ece9b40d06f12e7b) Merge branch 'fix(long-term-memory)/1035-source-identity-collisions' of https://github.com/Promansis/Marinara-Agents into fix(long-term-memory)/1035-source-identity-collisions ### 📊 Changes **13 files changed** (+323 additions, -94 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.3.13.zip` (+0 -0) 📝 `catalog/catalog.json` (+6 -6) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+6 -6) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+6 -6) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/long-term-memory/CHANGELOG.md` (+5 -0) 📝 `packages/long-term-memory/manifest.json` (+3 -3) 📝 `packages/long-term-memory/server.mjs` (+45 -45) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/subject-identity.ts` (+71 -6) 📝 `scripts/build-feature-packages.mjs` (+1 -1) 📝 `tests/long-term-memory-local-characters.regression.ts` (+162 -3) </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 #1035 ## Why this change - Imported roleplay sources that mentioned a character by more than one surface form (short name, first name, full name) created a competing local character identity for each form. Those identities then collided, and extraction dropped every candidate with `Dropped a candidate whose subject matches more than one trusted roster identity.` - A roster character's full name could also be dropped as ambiguous when its variants appeared in the imported source. ## What changed - `long-term-memory` `subject-identity.ts`: source-backed names are now collapsed into one canonical identity per character before catalog insertion (`canonicalSourceBackedNames`), and a source name already covered by a trusted roster, note, or earlier source identity no longer creates a duplicate (`mutableHasRelatedIdentity`). Genuinely ambiguous names still fail closed. - `tests/long-term-memory-local-characters.regression.ts`: added roster-backed and unrostered variant coverage using the production `notes`/`localSourceNotes` catalog inputs. - Version bump `1.3.12` → `1.3.13` with `CHANGELOG.md` entry; regenerated `manifest.json`, `server.mjs`, `artifacts/long-term-memory-1.3.13.zip`, and the `catalog/`, `catalog/v2/`, `catalog/v3/` entries and notes. ## Package and security impact - Affected package IDs: `long-term-memory` (1.3.13) - Engine compatibility impact: none; `engine.min` remains `2.4.1` - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: none; identity resolution 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 - Local validation run on `634a4f87`: `test-ltm.sh all` and `test-ci.sh` both exited 0; catalog lanes, package locales, catalog validation, and catalog release-notes regressions passed. `test-ltm.sh all` includes the added roster-backed and unrostered variant regressions. Human verification checkboxes above were intentionally left unchecked. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) - N/A — no UI change. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Imported source notes now keep short, first, and full-name variants of the same character linked to one memory instead of splitting them into separate memories. * Character matching is now consistent regardless of note order. * When a roster match exists, the character’s full name is retained and linked to that identity. * Names that genuinely conflict between trusted identities remain unresolved to prevent incorrect associations. * **Updates** * Long-Term Memory updated to version 1.3.13. <!-- 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:07 +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#1259
No description provided.