[PR #3643] [CLOSED] Fix Conversation scene summary compaction #6029

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3643
Author: @SpicyMarinara
Created: 7/15/2026
Status: ❌ Closed

Base: staging ← Head: agent/issue-3641-scene-summary


📝 Commits (1)

  • 37311c0 Fix Conversation scene summary compaction

📊 Changes

3 files changed (+95 additions, -8 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/server/src/routes/generate/conversation-history-runtime.ts (+22 -8)
📝 scripts/regressions/prompt.regression.ts (+72 -0)

📄 Description

Linked issue

Closes #3641

Why this change

  • Concluded Conversation-mode scene summaries are stored as timestamped narrator messages, but prompt mapping represents narrator history as system-role messages. Conversation history therefore kept every old scene summary verbatim instead of replacing it with its existing day/week summary, allowing the prompt to grow indefinitely.
  • The recent-message tail also reinserted summarized narrator blocks after compaction.

What changed

  • Treat timestamped narrator history from past conversation days as summarizable history while preserving current-day narrator context and genuine system instructions verbatim.
  • Keep summarized narrator/system history out of the recent-message tail, while continuing to fill the configured tail with real user and character turns.
  • Add a regression covering weekly compaction, recent-tail behavior, current-day scene context, and authored system instructions.
  • Document the fix in the v2.3.0 changelog.

Validation

  • pnpm check passes locally
  • pnpm regression:prompt passes locally
  • pnpm version: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

Manual verification notes

  • Manual browser verification remains for the maintainer. The deterministic regression reconstructs the assembled-prompt failure from #3641 and verifies that an old scene summary is removed while its compact week summary, a real conversation tail turn, the current-day scene summary, and an authored system instruction remain.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Not applicable; this changes server-side Conversation prompt assembly.


🔄 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/3643 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/15/2026 **Status:** ❌ Closed **Base:** `staging` ← **Head:** `agent/issue-3641-scene-summary` --- ### 📝 Commits (1) - [`37311c0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/37311c073878488fa41c4ee2c36def5bf6d3ff55) Fix Conversation scene summary compaction ### 📊 Changes **3 files changed** (+95 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/server/src/routes/generate/conversation-history-runtime.ts` (+22 -8) 📝 `scripts/regressions/prompt.regression.ts` (+72 -0) </details> ### 📄 Description ## Linked issue Closes #3641 ## Why this change - Concluded Conversation-mode scene summaries are stored as timestamped narrator messages, but prompt mapping represents narrator history as system-role messages. Conversation history therefore kept every old scene summary verbatim instead of replacing it with its existing day/week summary, allowing the prompt to grow indefinitely. - The recent-message tail also reinserted summarized narrator blocks after compaction. ## What changed - Treat timestamped narrator history from past conversation days as summarizable history while preserving current-day narrator context and genuine system instructions verbatim. - Keep summarized narrator/system history out of the recent-message tail, while continuing to fill the configured tail with real user and character turns. - Add a regression covering weekly compaction, recent-tail behavior, current-day scene context, and authored system instructions. - Document the fix in the v2.3.0 changelog. ## Validation - [ ] `pnpm check` passes locally - [ ] `pnpm regression:prompt` passes locally - [ ] `pnpm version: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` ### Manual verification notes - Manual browser verification remains for the maintainer. The deterministic regression reconstructs the assembled-prompt failure from #3641 and verifies that an old scene summary is removed while its compact week summary, a real conversation tail turn, the current-day scene summary, and an authored system instruction remain. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) Not applicable; this changes server-side Conversation prompt assembly. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:06:22 +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#6029
No description provided.