[PR #7272] [MERGED] fix(memory): keep Decision diagnostics on the shown reply after a group shrinks #7654

Closed
opened 2026-10-24 04:06:14 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7272
Author: @SpicyMarinara
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/recall-access-behaviour-followup


📝 Commits (6)

  • f0cb86a fix(memory): follow the shown reply's character in Decision diagnostics
  • f2de8bf Merge remote-tracking branch 'origin/staging' into fix/recall-access-behaviour-followup
  • 249a7b2 fix(memory): keep diagnostics on the shown reply after a group shrinks
  • 0de7d71 Merge remote-tracking branch 'origin/staging' into fix/recall-access-behaviour-followup
  • a63e664 docs(changelog): fold the shrunk-group diagnostics fix into its entry
  • 7b9a5b6 Merge origin/staging into fix/recall-access-behaviour-followup

📊 Changes

3 files changed (+23 additions, -2 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/client/src/components/chat/ChatArea.tsx (+3 -2)
📝 scripts/regressions/advanced-memory-post-generation.regression.ts (+19 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #7271

Follow-up to #7264, #7267 and #7273.

Why this change

  • Mari saw the Decision model (Jev) judging scene summaries for Cyno, a newcomer with nothing to recall. #7267 found that recall itself was right (Jev is never asked about memories for Cyno) and that Peek Prompt's Decision diagnostics showed another character's saved recall.
  • This PR first fixed the two remaining ways to get that wrong report: {{prompt}} in the chat input and a reply from an inactive character. #7273 landed the same fix on staging independently while this PR was open, so I dropped the duplicate code and kept only what #7273 does not cover.
  • What was still wrong: the client decided whether characters reply one by one from the current number of characters, while the server uses the saved chat setting. Once a one-by-one group shrank to one character, for example after Cyno was removed, Peek Prompt on Cyno's old reply sent no character. The server then fell back to the remaining character and showed their recall next to Cyno's prompt. CodeRabbit found this on this PR.

What changed

  • Client, ChatArea.tsx: Peek Prompt passes the shown reply's character whenever the saved setting has characters replying one by one, as the server does, even after the group shrinks to one character. Merged and single-character chats are unchanged.
  • Regression, advanced-memory-post-generation: covers the {{prompt}} request itself (peek-prompt with no reply selected). It returns Cyno's latest saved prompt and names Cyno, and calls no provider. #7273's regression covers only Peek Prompt on a selected reply. The new assertion failed on staging before #7273.
  • CHANGELOG.md: extends #7273's entry at the top of [Unreleased] with this case (#7271).
  • Recall selection, its access rules, the Decision prompts and "decide each message once" are untouched, so token use and debug prompt logging are unchanged.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Agent-run checks (these do not replace the boxes above):

  • pnpm check: exit 0, after merging the latest staging.
  • Passed after the merge: advanced-memory-post-generation, advanced-memory-generation, advanced-memory-inspector and advanced-memory-recall-shortlist.
  • Passed before the merge: all 15 advanced-memory-* regressions plus memory-recall-exclusivity, memory-recall-revectorize, roleplay-user-private-memory, decision-conditionals, decision-reachable-statements, roleplay-regeneration-context, character-id-macro-modes, lorebook-decision-activation, assigned-chat-sweep, game-tool-controls, pnpm regression:prompt and pnpm localization:check.
  • Behaviour check of #7267's claim: I ran a throwaway variant of advanced-memory-recall-shortlist (not kept) in which Cyno arrives mid-scene in the last or second-to-last archived scene. He still gets 0 Decision memory requests (no-recall-candidates).
  • GitHub CodeRabbit: one finding, the shrunk-group case described above. It is fixed in this PR.
  • Local CodeRabbit: the first runs hit the shared rate limit. The run on base 121b46c45 reviewed all 3 changed files and reported 1 trivial finding: two adjacent changelog entries described the same fix. I fixed it by folding this PR's entry into #7273's. No other findings.

Manual verification notes

  • Manually verify in a Roleplay group chat set so characters reply one by one, with Advanced Memory and a Decision model on. Let an established character reply with recall, then let a newly added character with no earlier memories reply. Remove the newcomer so one character is left. Open Peek Prompt on the newcomer's reply, open Decision diagnostics, and check that the Advanced Memory section shows no recall rather than the remaining character's recalled scenes.
  • Manually verify that with both characters still in the chat, {{prompt}} (typed and sent in the input) after the newcomer's reply shows "No saved recall yet" in Decision diagnostics.
  • Manually verify that in a merged group chat and a single-character chat, Peek Prompt and {{prompt}} show the same Decision diagnostics as before.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

No docs/ guide changed, so no [docs-i18n] follow-up is needed.

UI evidence (if applicable)

No visual change. The same panel now shows the right character's saved recall.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/7272 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/recall-access-behaviour-followup` --- ### 📝 Commits (6) - [`f0cb86a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f0cb86a64912807600217ff557eed4a18dd15c26) fix(memory): follow the shown reply's character in Decision diagnostics - [`f2de8bf`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f2de8bf706b018f909a753b2fdfcd0a946b87f77) Merge remote-tracking branch 'origin/staging' into fix/recall-access-behaviour-followup - [`249a7b2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/249a7b2f4d260a0f7ce49eab2ac4ec52dcd1cd3f) fix(memory): keep diagnostics on the shown reply after a group shrinks - [`0de7d71`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0de7d71264f2af728eca143e128bf11142ac19a1) Merge remote-tracking branch 'origin/staging' into fix/recall-access-behaviour-followup - [`a63e664`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a63e66483d410fb99c7d7506fe1545f8c0d54c07) docs(changelog): fold the shrunk-group diagnostics fix into its entry - [`7b9a5b6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7b9a5b65d79062870159ce1f57c304ca6ac828de) Merge origin/staging into fix/recall-access-behaviour-followup ### 📊 Changes **3 files changed** (+23 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+3 -2) 📝 `scripts/regressions/advanced-memory-post-generation.regression.ts` (+19 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Closes #7271 Follow-up to #7264, #7267 and #7273. ## Why this change - Mari saw the Decision model (Jev) judging scene summaries for Cyno, a newcomer with nothing to recall. #7267 found that recall itself was right (Jev is never asked about memories for Cyno) and that Peek Prompt's **Decision diagnostics** showed another character's saved recall. - This PR first fixed the two remaining ways to get that wrong report: `{{prompt}}` in the chat input and a reply from an inactive character. #7273 landed the same fix on `staging` independently while this PR was open, so I dropped the duplicate code and kept only what #7273 does not cover. - **What was still wrong:** the client decided whether characters reply one by one from the current number of characters, while the server uses the saved chat setting. Once a one-by-one group shrank to one character, for example after Cyno was removed, Peek Prompt on Cyno's old reply sent no character. The server then fell back to the remaining character and showed their recall next to Cyno's prompt. CodeRabbit found this on this PR. ## What changed - **Client, `ChatArea.tsx`:** Peek Prompt passes the shown reply's character whenever the saved setting has characters replying one by one, as the server does, even after the group shrinks to one character. Merged and single-character chats are unchanged. - **Regression, `advanced-memory-post-generation`:** covers the `{{prompt}}` request itself (`peek-prompt` with no reply selected). It returns Cyno's latest saved prompt and names Cyno, and calls no provider. #7273's regression covers only Peek Prompt on a selected reply. The new assertion failed on `staging` before #7273. - **`CHANGELOG.md`:** extends #7273's entry at the top of `[Unreleased]` with this case (#7271). - Recall selection, its access rules, the Decision prompts and "decide each message once" are untouched, so token use and debug prompt logging are unchanged. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` Agent-run checks (these do not replace the boxes above): - `pnpm check`: exit 0, after merging the latest `staging`. - Passed after the merge: `advanced-memory-post-generation`, `advanced-memory-generation`, `advanced-memory-inspector` and `advanced-memory-recall-shortlist`. - Passed before the merge: all 15 `advanced-memory-*` regressions plus `memory-recall-exclusivity`, `memory-recall-revectorize`, `roleplay-user-private-memory`, `decision-conditionals`, `decision-reachable-statements`, `roleplay-regeneration-context`, `character-id-macro-modes`, `lorebook-decision-activation`, `assigned-chat-sweep`, `game-tool-controls`, `pnpm regression:prompt` and `pnpm localization:check`. - **Behaviour check of #7267's claim:** I ran a throwaway variant of `advanced-memory-recall-shortlist` (not kept) in which Cyno arrives mid-scene in the last or second-to-last archived scene. He still gets 0 Decision memory requests (`no-recall-candidates`). - **GitHub CodeRabbit:** one finding, the shrunk-group case described above. It is fixed in this PR. - **Local CodeRabbit:** the first runs hit the shared rate limit. The run on base 121b46c45 reviewed all 3 changed files and reported 1 trivial finding: two adjacent changelog entries described the same fix. I fixed it by folding this PR's entry into #7273's. No other findings. ### Manual verification notes - Manually verify in a Roleplay group chat set so characters reply one by one, with Advanced Memory and a Decision model on. Let an established character reply with recall, then let a newly added character with no earlier memories reply. Remove the newcomer so one character is left. Open Peek Prompt on the newcomer's reply, open **Decision diagnostics**, and check that the Advanced Memory section shows no recall rather than the remaining character's recalled scenes. - Manually verify that with both characters still in the chat, `{{prompt}}` (typed and sent in the input) after the newcomer's reply shows "No saved recall yet" in **Decision diagnostics**. - Manually verify that in a merged group chat and a single-character chat, Peek Prompt and `{{prompt}}` show the same Decision diagnostics as before. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) No `docs/` guide changed, so no `[docs-i18n]` follow-up is needed. ## UI evidence (if applicable) No visual change. The same panel now shows the right character's saved recall. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:06:14 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#7654
No description provided.