mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7391] [MERGED] fix(memory): show where absent characters were when deciding who sees a message #7713
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#7713
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/7391
Author: @SpicyMarinara
Created: 10/10/2026
Status: ✅ Merged
Merged: 10/10/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/visibility-last-seen📝 Commits (8)
8d122adfix(memory): show where absent characters were when deciding who sees a message2bbc47ffix(memory): keep where absent characters were through trimming, and prefer the latest sighting953aff9fix(memory): add a last sighting only for characters who were away4814442fix(memory): count a character as away only when the whole scene was hidden from them415c0a0fix(memory): judge "away" over the whole scene, and only after a few decisions6665a8dfix(memory): count a scene message nobody decided as visible to everyone1d64d44fix(memory): apply the away rule only inside a saved scene12bac83fix(memory): never bring back a message hidden from the AI as last seen📊 Changes
3 files changed (+145 additions, -13 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/server/src/services/advanced-memory.ts(+58 -13)📝
scripts/regressions/advanced-memory-visibility.regression.ts(+86 -0)📄 Description
Linked issue
Closes #7390
Why this change
***scene break, every message is one stair scene and three characters are far away. The automatic decisions hid all three for the first messages of the scene, then two, then one, then nobody.planVisibilityshows the decision the current scene plus at least 4 earlier messages. Before #7371, scenes never ended, so that window always reached back into earlier scenes. Now, once a scene runs past 4 messages, the window never places the absent characters anywhere. The presence question treats "unclear" as present, so nobody is hidden.What changed
Rule chosen by Mari (2026-10-10): a character counts as away only when every earlier message of the current scene was hidden from them, by the decision or by her own hides.
planVisibilitycollects the savedhiddenFromAICharacterIdsof every earlier message of the scene that isn't hidden from everyone. A message nobody decided (older than the decision window, or from before the setting was on) counts as visible to all. A candidate hidden from every one of them, across at least four messages, is away. This applies only inside a saved scene: without a saved scene start, the last 12 messages may not be the whole scene, so nothing is added there, and those chats keep staging's 12-message window, which #7390 did not shrink. Each away candidate's latest earlier message joins the presence transcript, so the decision still sees where they are once the scene runs long. A message hidden from the AI is never chosen. Anyone who could perceive any of the scene gets nothing added.visibilityTranscriptkeeps those messages, in time order, through trimming (the oldest other context goes first, keeping at least four other earlier messages). A message pulled in from before the window is shortened to 256 tokens; one already in the window keeps its full length.advanced-memory-visibility), all failing without their part of the fix:Known residual, accepted: a cutaway of four or more messages, all hidden from a silent companion whose last line was elsewhere, followed by a return to them.
Review
Not changed: a failed shared presence answer still hides nothing and isn't asked again, as the existing regression requires.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdCommands run by the agent:
pnpm check;node ./scripts/run-regressions.mjs --filterfor all 16advanced-memory-*regressions, roleplay-whisper-hidden-recipient, roleplay-user-private-generation and prompt (all pass).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)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.