[GH-ISSUE #1028] [Issue]: Keep chat-only LTM availability separate from persona and character visibility #527

Closed
opened 2026-10-20 17:28:19 +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/1028

Originally assigned to: @Promansis on GitHub.

Summary

A Long-Term Memory destination selected as one chat can become available in other chats that share the source chat's character or persona. The current scope model expands chat context with related IDs and retrieval treats any chat, group, character, or persona overlap as visibility, which is broader than chat-only availability.

Affected package

long-term-memory (scope construction, extraction destinations, persistence, and runtime retrieval)

Expected behavior

When the user selects available in: X chat, the derived memory should be visible in chat X only, unless the user explicitly selects a group, character, or persona destination. Explicit persona- or character-scoped memories should continue to be available across the matching chats by design.

The source scope, destination scope, persisted note scope, and runtime retrieval matcher should preserve this distinction.

Actual behavior

The chat scope resolver includes the chat's persona and character IDs. Import/extraction and projection paths can persist or merge those related links, and runtime retrieval uses OR-overlap across chat, group, character, and persona IDs. Therefore a memory associated with chat X can match another chat through a shared persona or character. Scope merging is additive, so prior broad links can also remain when a narrower destination is selected later.

Steps to reproduce

  1. Create chat X with Persona P and Character A. Create another chat Y with Persona P and Character B.
  2. Extract a source from chat X with a chat-only destination of X.
  3. Inspect the persisted source/destination and derived memory scopes.
  4. Recall memory in chat Y and verify whether the memory is returned through the shared persona.
  5. Repeat with an explicitly persona-scoped destination and verify that both chats can see it.

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 scope work: #623 and #640. This issue is limited to the contract between explicit destination selection and visibility; it should not change subject identity resolution or evidence deduplication. Add focused coverage for chat-only, explicit persona, explicit character, group, and same-persona/different-character cases in tests/long-term-memory-runtime.regression.ts and the relevant route/storage scope suites.

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/1028 Originally assigned to: @Promansis on GitHub. ## Summary A Long-Term Memory destination selected as one chat can become available in other chats that share the source chat's character or persona. The current scope model expands chat context with related IDs and retrieval treats any chat, group, character, or persona overlap as visibility, which is broader than chat-only availability. ## Affected package `long-term-memory` (scope construction, extraction destinations, persistence, and runtime retrieval) ## Expected behavior When the user selects `available in: X chat`, the derived memory should be visible in chat X only, unless the user explicitly selects a group, character, or persona destination. Explicit persona- or character-scoped memories should continue to be available across the matching chats by design. The source scope, destination scope, persisted note scope, and runtime retrieval matcher should preserve this distinction. ## Actual behavior The chat scope resolver includes the chat's persona and character IDs. Import/extraction and projection paths can persist or merge those related links, and runtime retrieval uses OR-overlap across chat, group, character, and persona IDs. Therefore a memory associated with chat X can match another chat through a shared persona or character. Scope merging is additive, so prior broad links can also remain when a narrower destination is selected later. ## Steps to reproduce 1. Create chat X with Persona P and Character A. Create another chat Y with Persona P and Character B. 2. Extract a source from chat X with a chat-only destination of X. 3. Inspect the persisted source/destination and derived memory scopes. 4. Recall memory in chat Y and verify whether the memory is returned through the shared persona. 5. Repeat with an explicitly persona-scoped destination and verify that both chats can see it. ## 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 scope work: #623 and #640. This issue is limited to the contract between explicit destination selection and visibility; it should not change subject identity resolution or evidence deduplication. Add focused coverage for chat-only, explicit persona, explicit character, group, and same-persona/different-character cases in `tests/long-term-memory-runtime.regression.ts` and the relevant route/storage scope suites. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:28:19 +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#527
No description provided.