[GH-ISSUE #641] [Issue]: Resolved memories bypass disabled recall setting #333

Closed
opened 2026-10-20 17:26:35 +07:00 by bsakaguchi · 1 comment
Owner

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

Originally assigned to: @Promansis on GitHub.

Summary

Long-Term Memory continues to retrieve resolved memories when the Include resolved memories setting is off. The latest staging package still uses a retrieval predicate that excludes resolved thread memories only, allowing resolved memories of other types through.

Affected package

Long-Term Memory (long-term-memory)

Expected behavior

With Include resolved memories disabled, no resolved memory should participate in retrieval or generation injection. Archived memories should remain excluded regardless of the setting.

Actual behavior

retrieveLongTermMemory() filters eligible chunks with chunk.status !== "resolved" || chunk.noteType !== "thread" when the flag is off. A resolved world, character, relationship, timeline, or tone memory therefore remains eligible. The same predicate is present in the latest source and generated artifact.

Steps to reproduce

  1. Install Long-Term Memory 1.2.16 from the staging catalog.
  2. Create or edit a non-thread memory, such as a world memory, and set its status to resolved.
  3. Ensure Include resolved memories is off, then trigger a recall query matching that memory.
  4. Observe that the resolved memory can still be included in retrieval or injected context.

Environment

  • Marinara Engine version: 2.4.x staging-compatible source checkout
  • Package version: 1.2.16
  • Install type: source/artifact inspection; runtime reproduction not executed locally
  • OS + version: Linux
  • Browser or app shell: not run

Logs, screenshots, or video

Latest staging source commit: 97d962f1.

Confirmed in packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/retrieval.ts:73 and artifacts/long-term-memory-1.2.16.zip:

input.includeResolved || chunk.status !== "resolved" || chunk.noteType !== "thread"

Additional context

The setting is saved by MemorySettings.tsx, resolved by runtime-settings.ts, and passed through generation-injection.ts to retrieveLongTermMemory(). Existing runtime coverage proves that resolved thread memories are excluded by default and included when explicitly enabled, but it does not cover resolved non-thread memories.

No matching open issue was found. The minimal fix is to make the shared retrieval eligibility filter exclude every resolved chunk when includeResolved is false, then add a runtime regression for a resolved non-thread memory and rebuild the generated package outputs.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Aug 28, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/641 Originally assigned to: @Promansis on GitHub. ## Summary Long-Term Memory continues to retrieve resolved memories when the Include resolved memories setting is off. The latest staging package still uses a retrieval predicate that excludes resolved thread memories only, allowing resolved memories of other types through. ## Affected package Long-Term Memory (`long-term-memory`) ## Expected behavior With Include resolved memories disabled, no resolved memory should participate in retrieval or generation injection. Archived memories should remain excluded regardless of the setting. ## Actual behavior `retrieveLongTermMemory()` filters eligible chunks with `chunk.status !== "resolved" || chunk.noteType !== "thread"` when the flag is off. A resolved world, character, relationship, timeline, or tone memory therefore remains eligible. The same predicate is present in the latest source and generated artifact. ## Steps to reproduce 1. Install Long-Term Memory 1.2.16 from the staging catalog. 2. Create or edit a non-thread memory, such as a world memory, and set its status to resolved. 3. Ensure Include resolved memories is off, then trigger a recall query matching that memory. 4. Observe that the resolved memory can still be included in retrieval or injected context. ## Environment - Marinara Engine version: 2.4.x staging-compatible source checkout - Package version: 1.2.16 - Install type: source/artifact inspection; runtime reproduction not executed locally - OS + version: Linux - Browser or app shell: not run ## Logs, screenshots, or video Latest staging source commit: `97d962f1`. Confirmed in `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/retrieval.ts:73` and `artifacts/long-term-memory-1.2.16.zip`: `input.includeResolved || chunk.status !== "resolved" || chunk.noteType !== "thread"` ## Additional context The setting is saved by `MemorySettings.tsx`, resolved by `runtime-settings.ts`, and passed through `generation-injection.ts` to `retrieveLongTermMemory()`. Existing runtime coverage proves that resolved thread memories are excluded by default and included when explicitly enabled, but it does not cover resolved non-thread memories. No matching open issue was found. The minimal fix is to make the shared retrieval eligibility filter exclude every resolved chunk when `includeResolved` is false, then add a runtime regression for a resolved non-thread memory and rebuild the generated package outputs. ## Template check - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@Promansis commented on GitHub (Aug 28, 2026):

Work started from fresh upstream staging at 220ea90b on branch fix(long-term-memory)/resolved-memory-retrieval.

Implemented the shared retrieval fix so all resolved memory types are excluded when includeResolved is false, added runtime coverage for resolved non-thread memories and archived-memory exclusion, and rebuilt Long-Term Memory 1.2.17 outputs.

Passing: runtime regression, storage, extraction graph, extraction reliability, routes, conversation-summary import, debug log, scope targets, index keys, lifecycle, formatting/lint, catalog, manifest-integrity, locales, catalog lanes, and git diff --check.

Known unrelated baseline failure: long-term-memory-scope-fallback-labels.regression.ts expects a pre-#642 MemoryVault.tsx source shape.

<!-- gh-comment-id:5454091867 --> @Promansis commented on GitHub (Aug 28, 2026): Work started from fresh upstream staging at `220ea90b` on branch `fix(long-term-memory)/resolved-memory-retrieval`. Implemented the shared retrieval fix so all resolved memory types are excluded when `includeResolved` is false, added runtime coverage for resolved non-thread memories and archived-memory exclusion, and rebuilt Long-Term Memory `1.2.17` outputs. Passing: runtime regression, storage, extraction graph, extraction reliability, routes, conversation-summary import, debug log, scope targets, index keys, lifecycle, formatting/lint, catalog, manifest-integrity, locales, catalog lanes, and `git diff --check`. Known unrelated baseline failure: `long-term-memory-scope-fallback-labels.regression.ts` expects a pre-`#642` `MemoryVault.tsx` source shape.
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#333
No description provided.