mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7759] [MERGED] fix(chat): preserve Advanced Memory when branching roleplay history #7914
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#7914
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7759
Author: @SpicyMarinara
Created: 10/17/2026
Status: ✅ Merged
Merged: 10/17/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/advanced-memory-branch-continuity📝 Commits (2)
09cbf4afix: preserve Advanced Memory across chat branchesa718226fix: retain explicit memory pauses in branched chats📊 Changes
5 files changed (+731 additions, -44 deletions)
View changed files
📝
packages/server/src/routes/chats.routes.ts(+57 -27)📝
packages/server/src/services/advanced-memory-transfer.ts(+28 -4)📝
packages/server/src/services/advanced-memory.ts(+119 -0)📝
packages/server/src/services/storage/chats.storage.ts(+14 -4)📝
scripts/regressions/chat-branch-lineage.regression.ts(+513 -9)📄 Description
Linked issue
Closes #7758
Why this change
Branching a prepared roleplay chat discards its memory processing state, making users prepare the entire retained history again even though the earlier scene archive survives. A missing saved entry for the selected swipe can additionally substitute an old reply and invalidate an earlier scene.
What changed
Validation
pnpm checkpasses locallyCONTRIBUTING.mdTested code revision:
a718226e5ca61e08a02bfd86a294b7600a9db1b5(the committed tree is identical to the final locally reviewed and checked patch).Completed on the final revision:
pnpm check: passed.node scripts/run-regressions.mjs --filter chat-branch-lineage: passed 1/1. The pause regression failed before the correction and passes afterward, covering missing knowledge, empty archives, and actual recall from a prepared paused archive.Earlier evidence on
09cbf4a88a3bd1099c911576aa74ad8c1ad7e253: Advanced Memory Node lane 20/20; prompt, prompt-attachments and context-fit regressions; final server lint and formatting. Desktop shell smoke passed 7/7 before the handled-summary/timeframe follow-ups, whose affected branch and upkeep paths were rerun in the final branch regression. Those broader lanes were not rerun after the pause-only correction.The branch regression also failed on unchanged staging with idle rather than ready. The actual branch endpoint passed against an isolated live-data snapshot: 1455 messages, 80 retained scene summaries, zero unprepared scenes, and an open fork scene.
Local CodeRabbit and independent review are complete. Verified findings about empty archives, sparse swipe numbering, checkpoint identity and explicit pauses were fixed. Prepared paused branches retain their archive and expose Resume. The proposed blanket reset on any copied source change was not adopted: saved scene boundaries remain reusable across edits, while exact checkpoint hashes still require verification. Regressions also cover deleted automatic Chat Summaries and clipped timeframes.
Manual verification notes
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue openedUI evidence (if applicable)
No UI layout or copy changes. The behavioral proof exercises the real branch endpoint and recall service against isolated data.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.