mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7247] [MERGED] fix(memory): a character joining a group chat no longer holds back scenes with hidden messages #7643
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#7643
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/7247
Author: @SpicyMarinara
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/newcomer-scene-visibility📝 Commits (6)
6c4d962fix(memory): a character joining a group chat no longer holds back scenes with hidden messagesd429a6eMerge origin/staging into fix/newcomer-scene-visibility4645226test(memory): keep the newcomer regression valid with per-character merged recall3cae4bbMerge origin/staging into fix/newcomer-scene-visibility81fc046Merge origin/staging into fix/newcomer-scene-visibility5e826eeMerge origin/fix/newcomer-scene-visibility📊 Changes
4 files changed (+164 additions, -10 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
docs/agents/memory.md(+1 -1)📝
packages/server/src/services/advanced-memory.ts(+30 -9)📝
scripts/regressions/advanced-memory-summary.regression.ts(+132 -0)📄 Description
Linked issue
Closes #7245
Refs #7237 (Discord report by kociol21: "adding a new character midway ... older summaries remained saved, but their content disappeared from the prompt"). #7239 fixes the merged recall rule for newcomers. This PR fixes the other half of that report, which affects both group modes.
Why this change
sceneVisibility()inadvanced-memory.ts) hashed what every character currently in the chat could see of the scene. Adding a character changed that hash, sohasCurrentSceneVisibility()turned false for all those scenes.What changed
packages/server/src/services/advanced-memory.ts: the revision now names the reader IDs it covers (<hash>:<JSON reader IDs>).hasCurrentSceneVisibility()recomputes the same hash over only those readers, so a newcomer leaves the recap current.:and keep today's comparison over every character, so they are valid in exactly the cases they are valid today. Fix rewrites them once with the new format. I did not add a legacy heuristic: guessing the original reader set (for example from character order) is safe only in the narrow cases a hash happens to match, and the requested behaviour is "exactly as today" for legacy revisions.hasCurrentSceneVisibility().scripts/regressions/advanced-memory-summary.regression.ts: a merged and an individual group chat with Maukie, Pantalone and a narrator. Each has two scenes with a message hidden from Pantalone before summarising, one of them rewritten to the legacy revision format. The regression checks the following. It fails onorigin/stagingat the first post-join assertion.docs/agents/memory.mdandCHANGELOG.mddescribe the new behaviour. The translation follow-up is linked below.Validation
pnpm checkpasses locallyCONTRIBUTING.mdCommands the agent ran locally (for the reviewer to confirm, not ticked):
pnpm check(exit 0)node scripts/run-regressions.mjs --filter advanced-memory: 15/15 passednode scripts/run-regressions.mjs --filter memory-recall: 5/5 passednode scripts/run-regressions.mjs --filter roleplay-user-private-memory: 1/1 passedpnpm regression:prompt: 3/3 passedorigin/staging. Two mutation checks were also run: dropping the newcomer guard fails the "part of the scene hidden from the newcomer" assertion, and skipping the hash comparison for revisions with a reader list fails an existing visibility assertion.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)Docs:
docs/agents/memory.md(when recaps need review) andCHANGELOG.md. Translation follow-up: #7246.UI evidence (if applicable)
Not applicable: server-side recall change with no UI changes.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.