mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6767] [MERGED] fix(memory): respect shared history cutoffs when swiping #7320
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#7320
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/6767
Author: @SpicyMarinara
Created: 9/27/2026
Status: ✅ Merged
Merged: 9/27/2026
Merged by: @SpicyMarinara
Base:
staging← Head:codex/hidden-memory-start📝 Commits (3)
664b787docs: track Advanced Memory swipe cutoff fix (#6766)318b082fix(memory): keep shared history cutoffs during swipes (#6766)e046776Merge remote-tracking branch 'origin/staging' into codex/hidden-memory-start📊 Changes
3 files changed (+101 additions, -12 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/server/src/services/advanced-memory.ts(+16 -12)📝
scripts/regressions/advanced-memory-generation.regression.ts(+84 -0)📄 Description
Linked issue
Closes #6766
Why this change
The first Roleplay reply honors Advanced Memory's shared "All" history cutoff, but its swipes can restore raw messages from before that cutoff. The reported marker is hidden from the responding character. An applicable cutoff must remain effective independently of that message's visibility.
What changed
Apply the shared cutoff to the source prefix used for regenerated replies. Previously, every historical request skipped the automatic cutoff, including a swipe of the newest reply. Reject cached swipe selections when their boundary precedes the current applicable shared cutoff. Boundaries after the regenerated reply remain outside its source prefix and do not rewrite its past.
Extend the existing generation regression to inspect the actual main-model request for fresh replies, saved swipes, rebuilt swipes, and moved cutoffs with character-hidden, globally hidden, and visible boundary messages.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdLocal validation on
318b08203:pnpm checkpassed, including lint, types, localization, formatting and production build.node scripts/run-regressions.mjs --filter scripts/regressions/advanced-memorypassed all 11 suites.pnpm regression:promptpassed.node scripts/run-regressions.mjs --filter roleplay-regeneration-contextpassed.Manually verify a fresh reply and multiple swipes in the affected chat, including the hidden shared-cutoff message. The regression uses isolated synthetic chats and a loopback provider; it does not exercise the maintainer's real chat or external model.
Docs and release impact
Changelog updated. This restores the existing history-boundary behavior without changing UI labels, settings, documentation, versions, or storage format.
UI evidence
Prompt-selection behavior only; the regression checks the actual provider request, including preservation of hidden-message filtering and regeneration before a future cutoff. No UI changes.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.