mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #1998] feat(long-term-memory): recall can leave out what a caller added itself (SN-5) #1864
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#1864
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 31, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1998
Originally assigned to: @Promansis on GitHub.
What problem does this solve?
Once Slurp hands its Creator records to Long-Term Memory (SN-4), those records come straight back. Slurp's next post plan or DM reply calls
long-term-memory:recallfor the same Creator and gets the same fact again under "From your memory", as if Long-Term Memory had learned it from a chat. Slurp already has the original in its continuity ledger, which renders in the same "What you already know" block. The prompt then states the fact twice, and the copy looks like independent confirmation.Tracker: SN-5.
Proposed package or change
long-term-memory:recalltakes a new optional input,excludeFrom: string[], a list of callers. Recall skips any note section whose content came only from records those callers added throughlong-term-memory:intake, and skips a note entirely when nothing else is left. Slurp passesexcludeFrom: ["slurp2"], so it still gets what chats taught Long-Term Memory about its Creators, but not its own facts back.Recall service version 1 is unchanged. An older Long-Term Memory strips the unknown key (
recallInputSchemais a non-strictz.object), so Slurp can pass it without a version check. Long-Term Memory patch.Decided by the user on 2026-10-30: the filter goes on LTM's side.
Minimal fix
L =
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory.from_slurp2keeps that section.sectionKeyhas no stored section (the syntheticprofilechunk,recall/chunking.ts:78, 102) is kept.docs/ARCHITECTURE.md§ Services for Other Packages:excludeFrom?in the signature (:214-226) and one rule: "Sections that only hold records the named callers added throughlong-term-memory:intakeare left out."## Unreleased): an Agent can ask recall to leave out what it added itself, so its own facts don't come back as new.Non-goals: excluding by provenance kind for chat sources; Slurp-side link rows.
Regression proof
In
tests/long-term-memory-runtime.regression.ts, recall block (:327-533; whole-recall tests :416-438), add to the fixture a character note for the posting account with two sections:from_slurp2with one contribution fromltmPackageSourceNoteId("slurp2", "fact:f1"), andhistorywith a manual contribution. Three cases:excludeFrom, both sections return (current behaviour unchanged).excludeFrom: ["slurp2"], thefrom_slurp2text is gone andhistorystays, in both whole and ranked mode.Why should this be optional?
It is an optional input on an existing service. Callers that don't pass it get exactly what they get today.
Alternatives considered
noteIdusingslurp2_continuity_linksrows. Needs the link rows SN-3 deferred, and can only drop whole notes, so a character note mixing chat memories with a "From Slurp" section would lose the chat part too.excludeProvenanceon note provenance (the tracker's first wording). Recall never returns source notes, and only source notes carry provenance (notes.ts:314). The link from a memory to its Slurp record is the section contribution'ssourceNoteId, so the filter keys on that.from_slurp2. Simpler, but a chat extraction could write into that section and its chat part would be dropped too.Additional context
Depends on SN-4 part 1 for
ltmPackageSourceNotePrefix. Before that ships, no section has such contributions and the filter is a no-op.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
Local trace
Anchors (upstream/staging
655b7666d):recall.ts:24-32(schema, non-strictz.object),:58-64(null rules),:80-104(whole mode),:105-133(ranked mode),:138(recordLtmPackageRead).recall/chunking.ts:63(chunkNoteSections); chunks carrysectionKey(:78 and :102 syntheticprofile, :111-117, :141).storage-read.ts:6-11(ltmPackageCallerSchema),:14-20(isLtmNoteShareable; both modes already drop source notes with it).notes.ts:221-236(contributions).docs/ARCHITECTURE.md:214-226(recall signature incl.whole?).Verified 2026-10-31: ranked
retrieval.chunks[].chunkcarriessectionKey(retrieval/budget.ts:35, 61, 89,generation-injection.ts:265, 312, 324,usage.ts:137read it).For the worker to check: whether the ranked path's
notelookup for a chunk already has the full note with sections in scope, or needs the section read forfromExcluded.