mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7281] [MERGED] fix(memory): drop excerpt reasons when recall is left out to fit #7661
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#7661
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/7281
Author: @SpicyMarinara
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/excerpts-privacy-code-followup📝 Commits (3)
53fc9c1fix(memory): drop excerpt reasons when recall is left out to fit5e4d29eMerge remote-tracking branch 'origin/staging' into fix/excerpts-privacy-code-followup12957aeMerge origin/staging into fix/excerpts-privacy-code-followup📊 Changes
3 files changed (+28 additions, -2 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/server/src/services/generation/advanced-memory-context.ts(+7 -1)📝
scripts/regressions/advanced-memory-context.regression.ts(+20 -1)📄 Description
Linked issue
Follow-up to #7277 (already merged) for #7269. Refs #7269
Why this change
#7277 added reasons that say why a recalled scene has no message excerpt (
excerpt-no-room,excerpt-private-scene,excerpt-no-source), shown in the memory receipt and saved asnotesin Peek Prompt → Decision diagnostics.A privacy and correctness review of #7277 found one case where those reasons go stale. When the whole formatted request does not fit with optional recall,
prepareAdvancedMemoryContextdrops every recalled scene ("Optional recall omitted to fit the complete formatted request."). It already cleared the recalled ids and marked every diagnostics row Not selected, but it kept the excerpt reasons and the newnotes. The receipt then:excerpt-no-room, told the user to raise Summary and recall budget, which would make the request even less likely to fit;decision-excerpt-fallback("Some original excerpts were chosen by text matching…") although no excerpt was sent.What changed
packages/server/src/services/generation/advanced-memory-context.ts: when optional recall is omitted to fit, also drop theexcerpt-*anddecision-excerpt-fallbackreasons and the Decision diagnosticsnotes. Other reasons (for exampledecision-recall) stay. The saved swipe snapshot therefore holds only reasons about memory that was actually sent.scripts/regressions/advanced-memory-context.regression.ts: the fake memory service now returns those reasons and anoteslist when it recalls something. A new check confirms that the "limited" case (recall dropped to fit a 12k cap) keeps onlydecision-recallplus the omission note, and has nonotes. It fails without the fix. No existing check changed.CHANGELOG.md: one entry at the top of[Unreleased].Review of #7277 (privacy and correctness), no change needed
canRecallExcerpt(narrator-only raw excerpts from scenes whose summary has{{#if char …}}parts) still gates both the Decision message pass and the excerpt size.notesare fixed codes, at most 4 of them, so the.max(8)schema cannot reject a saved report or a swipe snapshot.advanced-memory-decisions.regression.tsfail ("neither scene loses its excerpt").121b46c45) and pass after it.Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-run commands (for the reviewer to confirm, not ticked):
pnpm checkpnpm regression:promptnode ./scripts/run-regressions.mjs --filterforadvanced-memory(15/15),memory-recall(5/5),summary(5/5),roleplay-user-private-memory,native-export-memoryandroleplay-whisper(2/2)advanced-memory-context.regression.tsfails with the server change reverted and passes with it.Manual verification notes
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)No
docs/guide changed, so no[docs-i18n]follow-up is needed.UI evidence (if applicable)
No UI component changed. The fix only stops the server from saving stale reason codes.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.