Repository navigation
[replay 7239] fix(memory): characters joining a merged group chat no longer hide earlier memories - #453
[replay 7239] fix(memory): characters joining a merged group chat no longer hide earlier memories#453Promansis wants to merge 2 commits into
Conversation
…rlier memories In merged Roleplay group chats the recall audience is every chat character, and a scene was recalled only when all of them had been there. After a character joined, no earlier scene qualified. Character-scoped Chat Summaries were also rendered as whichever character's random id sorted first, which could be the newcomer, so they rendered empty. A merged reply can voice any character, so recall now keeps what any present character remembers and marks what not everyone knows: "Scene summary (known only to Alice):" for scenes and "[Known only to Alice: ...]" for private summary sections. Memories no present character has, including narrator-only scenes, stay out. Individual group chats, single-reader recall, impersonation and narrator rules are unchanged. Closes Pasta-Devs#7237 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Keeps every CHANGELOG entry from both sides. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
🎭 Dottore Review — ConcludedTip Review posted. The specimen has left the observation table.
|
🎭 Dottore ReviewDottore Verdict: Repair RequiredWarning REPAIR REQUIRED
Note Mode: 🧭 Specimen Summary
🔎 Isolated Defects
🧹 Minor Imperfections
🤖 Copy prompt for isolated Dottore findings✅ Control Checks
🧪 Observations
📝 Lab Notes
|
| // evaluating those per reader is the upgrade path. | ||
| const readers = [...new Set(mergedReaders(ctx, audience).map((id) => ctx.names.get(id) ?? "Character"))]; | ||
| if (readers.length > 1) | ||
| text = scopeCharacterSummary(text, readers, 0, (part, known) => { |
There was a problem hiding this comment.
⚠️ MEDIUM: Resolve each reader's fragment before marking it
Location: packages/server/src/services/advanced-memory.ts:1689 (RIGHT)
The union preserves Bob's branch, then rather elegantly assigns its actions to Alice. In a merged Alice/Bob Chat Summary,
{{#if char == "Bob"}}{{char}} hid the key{{/if}}becomes[Known only to Bob: Alice hid the key], because scoping removes the guard before the singlenames[0]macro pass. Marking unresolved fragments also lets a false nested variable guard leave a nonempty[Known only to Bob: ], defeating the empty-recap filter.
Tip
Suggested fix: Resolve surviving fragments in their readers' macro contexts, discard empty results, and only then attach knowledge labels.
| // A merged group recalls what any present character remembers, labelled with who does (#7237). | ||
| return ctx.individual | ||
| ? characters.every((id) => record.audienceCharacterIds.includes(id)) | ||
| : characters.some((id) => record.audienceCharacterIds.includes(id)); |
There was a problem hiding this comment.
⚠️ MEDIUM: Align recap source eligibility with any-reader recall
Location: packages/server/src/services/advanced-memory.ts:3382 (RIGHT)
The new audience union admits an Alice-only scene, only for the source intersection to revoke admission. When every scene message is hidden from Bob but readable by Alice,
allowed()removes them all for the merged audience, and the mandatory coverage check rejects the recap even with current visibility metadata. Adding Bob therefore still erases Alice's earlier recall in precisely the differing-source-view case the any-reader promise should cover.
Tip
Suggested fix: Check recap safety per remembering reader, while leaving live-message and raw-excerpt visibility on their stricter path.
Dottore replay shadow (fork only) of upstream PR 7239 at accf679, the first head CodeRabbit reviewed.
Original title: fix(memory): characters joining a merged group chat no longer hide earlier memories