[GH-ISSUE #1026] [Issue]: Canonicalize LTM character subject name variants #525

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

Originally created by @Promansis on GitHub (Sep 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1026

Originally assigned to: @Promansis on GitHub.

Summary

Long-Term Memory extraction does not consistently resolve abbreviated, first-name-only, full-name, and minor spelling variants to one character subject. Some variants normalize successfully, while others become separate provisional identities or are rejected as ambiguous.

Affected package

long-term-memory (server-side subject identity resolution during extraction)

Expected behavior

Equivalent references to one character should resolve to one canonical subject and one canonical memory target. This includes configured aliases, first-name/full-name forms, and supported minor spelling variations. Genuinely ambiguous names must fail closed and identify the competing trusted identities.

Subject identity normalization should happen before downstream deduplication and should not change the behavior of genuinely distinct characters.

Actual behavior

The resolver handles exact names, unique aliases, and limited fuzzy matches, but source-visible unknown names can create provisional local-character keys from the surface form. As a result, abbreviated and full-name references can produce different subject keys/target note IDs. Ambiguous first names are rejected, and the current diagnostics do not consistently make the competing identities actionable.

The supplied LTM debug trace contains repeated subject_identity_normalized warnings and ambiguous_subject_identity diagnostics during extraction.

Steps to reproduce

  1. Create a synthetic trusted character catalog containing one character with a full name and supported short-name alias.
  2. Extract equivalent facts using the short name, first name, and full name in separate candidates or repeated source extractions.
  3. Inspect resolved subjectKeys, canonical target note IDs, and diagnostics.
  4. Repeat with two characters sharing the same first name and verify that the input is rejected with actionable ambiguity details.

Environment

  • Marinara Engine version: current staging compatibility range
  • Package version: current long-term-memory staging build
  • Install type: source/test fixture
  • OS + version: Linux
  • Browser or app shell: Engine package host

Logs, screenshots, or video

The investigation used scratch/ltm-debug-log.jsonl; it contains private extraction identifiers and is not attached. Regression fixtures should be synthetic and contain no private chat data.

Additional context

Related historical identity work: #899. This issue is limited to canonical subject resolution and diagnostics. It should not change memory deduplication thresholds or availability/retrieval semantics; those are separate issues. The focused regression owner is tests/long-term-memory-local-characters.regression.ts plus the identity cases in tests/long-term-memory-extraction-graph.regression.ts.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Sep 21, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1026 Originally assigned to: @Promansis on GitHub. ## Summary Long-Term Memory extraction does not consistently resolve abbreviated, first-name-only, full-name, and minor spelling variants to one character subject. Some variants normalize successfully, while others become separate provisional identities or are rejected as ambiguous. ## Affected package `long-term-memory` (server-side subject identity resolution during extraction) ## Expected behavior Equivalent references to one character should resolve to one canonical subject and one canonical memory target. This includes configured aliases, first-name/full-name forms, and supported minor spelling variations. Genuinely ambiguous names must fail closed and identify the competing trusted identities. Subject identity normalization should happen before downstream deduplication and should not change the behavior of genuinely distinct characters. ## Actual behavior The resolver handles exact names, unique aliases, and limited fuzzy matches, but source-visible unknown names can create provisional local-character keys from the surface form. As a result, abbreviated and full-name references can produce different subject keys/target note IDs. Ambiguous first names are rejected, and the current diagnostics do not consistently make the competing identities actionable. The supplied LTM debug trace contains repeated `subject_identity_normalized` warnings and `ambiguous_subject_identity` diagnostics during extraction. ## Steps to reproduce 1. Create a synthetic trusted character catalog containing one character with a full name and supported short-name alias. 2. Extract equivalent facts using the short name, first name, and full name in separate candidates or repeated source extractions. 3. Inspect resolved `subjectKeys`, canonical target note IDs, and diagnostics. 4. Repeat with two characters sharing the same first name and verify that the input is rejected with actionable ambiguity details. ## Environment - Marinara Engine version: current `staging` compatibility range - Package version: current `long-term-memory` staging build - Install type: source/test fixture - OS + version: Linux - Browser or app shell: Engine package host ## Logs, screenshots, or video The investigation used `scratch/ltm-debug-log.jsonl`; it contains private extraction identifiers and is not attached. Regression fixtures should be synthetic and contain no private chat data. ## Additional context Related historical identity work: #899. This issue is limited to canonical subject resolution and diagnostics. It should not change memory deduplication thresholds or availability/retrieval semantics; those are separate issues. The focused regression owner is `tests/long-term-memory-local-characters.regression.ts` plus the identity cases in `tests/long-term-memory-extraction-graph.regression.ts`. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:28:18 +07:00
  • closed this issue
  • added the
    bug
    label
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#525
No description provided.