mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2305] [Issue]: 09-CHAT-RUNTIME-memory-recall-chunks stale after edits/swipes and partial rebuilds #1141
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1141
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 (Jun 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2305
Originally assigned to: @Promansis on GitHub.
Summary
`09-CHAT-RUNTIME-memory-recall-chunks`: refactor Memory Recall stores chunks in the chat `memories` array and exposes the list/rebuild/delete/clear UI, but it does not preserve legacy invalidation/rebuild semantics after message edits or swipe-visible-content changes. Refactor rebuild also writes a partial newest chunk, while legacy only created complete 5-message chunks.
Linked parity tracker: #2268.
Expected behavior
Legacy behavior should be preserved for `09-CHAT-RUNTIME-memory-recall-chunks`:
Actual behavior
Refactor has visible controls and command wrappers for Memory Recall list/delete/clear/rebuild, and generation refresh calls `refreshChatMemories` after successful saved generation. However, mutation paths that change already-chunked visible message content do not prune `chat.memories`.
The prompt assembler reads stored memories through `storage.listChatMemories` or `chat.memories`, ranks them, and injects matching content into a `` block. That means stale edited/swiped-away text can remain prompt-visible until a later full rebuild, and manual rebuild can include a partial newest group that legacy would have left pending.
Steps to reproduce
Expected: affected local chunks are gone or rebuilt, and newest incomplete groups are not stored.
Actual: existing `chat.memories` entries are not invalidated by those mutation paths, and rebuild chunks all visible groups including partial newest chunks.
Impact area
Environment
Logs, screenshots, or video
Static parity proof only; no runtime logs.
Files inspected:
Regression notes
This worked on legacy `main`: Memory Recall local chunks were sidecar rows and mutation paths called `invalidateMemoryChunksFrom` when visible message content changed. Refactor moved Memory Recall to chat-array records and did not mirror those invalidation hooks for edit/swipe mutation paths. Delete/bulk-delete stale memory cleanup is already tracked separately by #2293.
Additional context
Surface ID: `09-CHAT-RUNTIME-memory-recall-chunks`.
Batch 14 parityscan result for #2268: gap. Import/export proof stays with Target 20 and was not chased. Provider/embedding transport was not chased beyond confirming refactor exposes lexical/provider embedding status fields and prompt recall consumes stored vectors/content.
Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: