mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #1194] [Issue]: Long-Term Memory: targeted group recall must return only the responder's memories #612
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#612
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Promansis on GitHub (Oct 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1194
Originally assigned to: @Promansis on GitHub.
Summary
In a multi-character group chat, the Engine targets one responder and passes that responder's id in
promptCharacterIds, but the package ignores it: generation recall uses the chat's fullcharacterIdsand includes global notes unconditionally. A targeted responder can therefore receive every other character's memories.Affected package
long-term-memory(Long-Term Memory), generation recall scope. Finding A2. This is a package-only change; the Engine already supplies the target ids.Expected behavior
When the Engine targets a single responder in a multi-character chat, generation recall must return only that character's memories:
scope.characterIdsand no other character is).matchesLtmScope/ltmScopesOverlapdefaults used by vault listing (GET /notes), note transfer, extraction, reconciliation,subject-identity, or the public/searchroute.The Engine's current handoff makes the target detectable:
resolvePromptCharacterIdsForTargetreturns a one-element list whenforCharacterIdmatches, otherwise the full set. The package should treat a supplied character set that is a strict, non-empty subset of a multi-character chat's characters as the target scope, and pass an explicit "exclude global/foreign" signal into retrieval rather than relying on the current unconditionalincludeGlobal: true. If the implementer finds this heuristic ambiguous, prefer an explicit Engine target flag before widening the package contract.Actual behavior
prepareGenerationLongTermMemoryignores itsinput.characterIdsand callsretrieveLongTermMemorywithcharacterIds: chat.characterIdsandscope = resolveChatLtmScope(chat), which already carries every chat character.retrieveLongTermMemoryunionsscope.characterIdswithinput.characterIdsand passesincludeGlobal: true, so global, chat-only, mixed-character, and foreign-character/shared-chat notes all match.world_a(target A) andworld_b(target B) for each target direction. Scope-helper controls accepted global, chat-only, mixed-character, and foreign-character/shared-chat notes.Steps to reproduce
world_ascoped to character A andworld_bscoped to character B in a chat withcharacterIds: ["A", "B"]; build the index.runtime.recall({ chatId, chatMode, characterIds: ["A"], ... })and inspectreceipt.artifact.chunks. It returns bothworld_aandworld_b.characterIds: ["B"]; it again returns both.["A","B"]), and foreign/shared-chat notes and confirm each currently matches, then confirm the strict contract excludes them.Environment
2.4.6(227e3e12c87a55c40074413f1f32e57d732217da); itsresolvePromptCharacterIdsForTargethandoff was read directly.1.3.34at the time of the fixture; package1.3.36is current upstream and does not change this behavior.v24.15.0, installedtsx4.23.13.Logs, screenshots, or video
Relevant output from the disposable readiness fixture (
/tmp/opencode/ltm-readiness-proof.mts):The desired-invariant run exited 1 with:
No private chat data or real provider/model calls were used.
Additional context
Scope and ownership
staging. No Engine source change is strictly required because the Engine already passespromptCharacterIds; if the subset heuristic is rejected, coordinate an explicit target flag as a separate Engine issue rather than shipping an ambiguous contract.packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/{generation-injection,retrieval,chat-scope}.tsand the sharedscope.tsmatcher, with the strict behavior passed as an explicit option.matchesLtmScope/ltmScopesOverlapsemantics for other callers.Open product detail to confirm in review
Excluding chat-only and global notes from a targeted group responder is the maintainer's stated strict contract. If shared context for a chat is wanted instead, that is a different decision and must be stated explicitly before implementation.
Validation plan
world_aand target B returns onlyworld_b, then reverse the target.matchesLtmScopeconsumers (vault listing, transfer, extraction, reconciliation,subject-identity,/search) are unchanged.Proof above is characterization and a red baseline, not repaired behavior or release validation. Installed dependencies differ from the repository's pins; install locked dependencies in the implementation workspace before claiming repository gates. Live group-chat/browser validation remains a manual PR item.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: