mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7381] [MERGED] fix(roleplay): deliver whisper-only messages with Advanced Memory on #7709
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#7709
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/7381
Author: @SpicyMarinara
Created: 10/10/2026
Status: ✅ Merged
Merged: 10/10/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/whisper-only-user-message📝 Commits (8)
f74861cfix(roleplay): deliver whisper-only messages with Advanced Memory on2d74fd0fix(roleplay): place whisper-only whispers inside their wrapper and windowbd0b88afix(roleplay): keep whisper placeholders whole and the empty window narrowa7db608fix(roleplay): let memory's own rules pick which whisper-only messages counte7bc0e2fix(roleplay): add whisper-only messages inside Advanced Memory's own window176fd2dfix(roleplay): rebuild stale memory snapshots for whisper-only messages363595cdocs(changelog): note that regenerating a reply picks up a missed whisper3a6736fMerge remote-tracking branch 'origin/staging' into fix/whisper-only-user-message📊 Changes
6 files changed (+365 additions, -17 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/server/src/routes/generate.routes.ts(+10 -1)📝
packages/server/src/routes/generate/dry-run-route.ts(+18 -5)📝
packages/server/src/services/advanced-memory.ts(+43 -4)📝
packages/server/src/services/generation/roleplay-commands.ts(+38 -5)📝
scripts/regressions/roleplay-whisper-hidden-recipient.regression.ts(+255 -2)📄 Description
Linked issue
Closes #7380
Why this change
[whisper: character="Powers That Be" text="..."]with nothing else) never reached its recipient or the narrator. Whispers the model wrote, and whispers inside a message with other text, did arrive.appendRoleplayWhispershad no message to attach the whisper to. Without Advanced Memory, the same message shows as[Private whisper]and the whisper arrives.What changed
prepareImpl): after building its live window, it also lists the whisper-only messages its own reader rules allow (allowed()with a newkeepEmptyIdsoption) that come after the window's start: the context boundary, or the end of a trimmed open-scene prefix. So conversation starts, personal starts, saved context starts, knowledge starts, regeneration prefixes, hiding and merged readers all apply as they do to text. These messages are never part of a record, so recall, archives and summaries are unchanged.selectAdvancedMemoryWhisperOnlyIds. Peek then runs the same preparation as the live route. Under impersonation, Peek now reads memory as its owner, without one character's knowledge range, as the live route already did.appendRoleplayWhispers): when a message's body is the[Private whisper]placeholder, every whisper goes right after it. Before, a whisper-only last message got its whisper after the closing</last_message>(and a second closing tag after Advanced Memory re-wrapped it), and a blank body such as[whisper …] [whisper …]could split the placeholder. The #7191 stand-ins use the same rule.filterPromptHistoryByMessageIdsand the Advanced Memory context are unchanged from staging.roleplay-whisper-hidden-recipient), all through the real routes with Advanced Memory on: a whisper-only user message to the narrator, and a narrator reply that is only a whisper; a single closing tag; a conversation reset; a chat that opens with a whisper; a blank body between two whispers; a personal conversation start on a whisper; a system notice between a whisper and later text; a knowledge start on a whisper; regenerating before a knowledge start; a one-character chat; impersonation in Peek Prompt. Each case was checked to fail without its part of the fix.Review
[Private whisper]trace for characters that automatic visibility never decides on (same as without Advanced Memory), and no regression for thesharedPromptForAgentswiring (a coverage gap, not a defect).Validation
pnpm checkpasses locallyCONTRIBUTING.mdCommands run by the agent:
pnpm check;node ./scripts/run-regressions.mjs --filterfor all 16advanced-memory-*regressions plus roleplay-whisper-hidden-recipient, roleplay-whisper-generation, roleplay-user-private-generation, roleplay-user-private-storage, roleplay-user-private-memory, roleplay-commands, roleplay-regeneration-context and prompt (all 24 pass).Manual verification notes
[whisper: character="<narrator name>" text="..."], generate the narrator's reply, and check in Peek Prompt that the whisper appears right after[Private whisper]under your message.[Private whisper]for that message, not the text.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)CHANGELOG
[Unreleased]has an entry. No user docs change.Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.