mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7285] [MERGED] fix(memory): keep combined summaries' ranges and private sentences with their readers #7664
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#7664
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/7285
Author: @SpicyMarinara
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/8/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/combine-privacy-code-followup📝 Commits (10+)
4ed53f8fix(memory): keep combined summaries' ranges and private sentences with their readers0557f44Merge origin/staging into fix/combine-privacy-code-followup77c5ac8Merge origin/staging into fix/combine-privacy-code-followup40a4da3fix(memory): check private sentences whole across decimals and abbreviationsf9d6cc1Merge origin/staging into fix/combine-privacy-code-followup7e885f5Merge origin/staging into fix/combine-privacy-code-followupd48504bfix(memory): catch copied private lines and keep the copy check fast66f801eMerge origin/fix/combine-privacy-code-followup into fix/combine-privacy-code-followup37bc43cMerge origin/staging into fix/combine-privacy-code-followup0b719f9test(memory): pin matching normalization in the combine leak check📊 Changes
3 files changed (+236 additions, -16 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/server/src/services/advanced-memory.ts(+51 -16)📝
scripts/regressions/advanced-memory-post-generation.regression.ts(+184 -0)📄 Description
Linked issue
Follow-up to #7275. Refs #7270 (#7275 already closed it).
Why this change
#7275 lets the Helper combine summaries that have private
{{#if char == "Name"}}sections, as long as each section keeps its condition. A privacy review of the merged code found three ways private content could still reach the wrong character:Messages #1–#2; … timeframe: NIGHT_OF_THE_HEIST → MORNING_AFTER). This also contradicted #7275's own design note: "Summaries read by different characters are still not merged into one entry.".!?and counted words by spaces, so a private sentence like毛奇把钥匙藏在了钟楼里。counted as one word. A Helper reply that copied it word for word into text everyone reads was saved.{{foo}}, a private sentence placed beside that macro in the result was skipped by the check. Pantalone could then read it.What changed
packages/server/src/services/advanced-memory.ts:\p{Sentence_Terminal}). It counts words withIntl.Segmenter, the same wayroleplay-interrupt.tsalready does.scripts/regressions/advanced-memory-post-generation.regression.ts: three new blocks, one per problem. Each one fails without its fix and passes with it. No existing assertion was changed.CHANGELOG.md: a new entry at the top of[Unreleased].No docs change:
docs/agents/memory.mdalready says private summaries are combined "with the other summaries the same characters read", and that is now true in merged chats too. No UI copy and no model prompt changed. Debug prompt logging is untouched.Overlap: #7284 (
fix/combine-behaviour-followup) edits the sameleakslines and the top ofCHANGELOG.md. Whichever PR merges second will need a small manual merge. The two changes are compatible: #7284 ignores sentences the wider section already had, and this PR changes how sentences are split and words counted, and which sections count as wider.Still open, not changed here (same as #7275): the check only catches private sentences copied word for word, not reworded ones. That is the open CodeRabbit thread on #7275, and it is Mari's decision.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-run checks (please re-run; do not take this as proof):
{{foo}}was saved, and Pantalone's prompt containedNIGHT_OF_THE_HEIST.advanced-memory-*,memory-recall-*and*summary*regression,roleplay-regeneration-context,roleplay-interrupt-generation,pnpm regression:promptandpnpm check.Manual verification notes
Date: …line.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
Not applicable: server-only change.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.