mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #913] fix(long-term-memory): defer source context persistence and preserve dedup freshness #478
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#478
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 (Sep 18, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/913
Originally assigned to: @Promansis on GitHub.
Summary
Long-Term Memory phase four has two source-processing reliability defects: extraction preparation persists source context before extraction finalization, and a clean LLM batch containing both newly accepted and deduplicated units is not marked current.
Affected package
long-term-memoryExpected behavior
destinationScopeormodes. Context changes should be committed atomically with successful draft finalization and the extraction fingerprint.Actual behavior
extractLongTermMemoryFromSourceNoteInnercallsbindSourceNoteToExtractionContext, which callsstorage.updateNotefordestinationScopeandmodesbefore source text validation, provider extraction, and draft finalization complete.finalizeLongTermMemoryExtractionDraftverifies the source context fingerprint but does not commit the pending context binding; it only creates the draft. The later source update persists the fingerprint separately.summarizeExtractionOutcomereports any accepted batch with deduplications aspartial_success.canMarkCurrentpermits this state only for deterministic extraction, so an otherwise clean LLM batch skips fingerprint persistence and is reprocessed on the next extraction.Steps to reproduce
Environment
>=2.4.1 <4.0.01.3.3Logs, screenshots, or video
No private logs or user data included. The behavior is code-confirmed from upstream
stagingat commit7b60087a.Additional context
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-extraction.tspackages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-extraction.tspackages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-processing.tstests/long-term-memory-storage.regression.ts,tests/long-term-memory-extraction-reliability.regression.ts, andtests/long-term-memory-extraction-graph.regression.ts. Add synthetic fixtures at the narrowest owning boundary and preserve review-before-apply behavior.staging; revalidate the final implementation baseline after it lands.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: