[PR #6558] [MERGED] fix: preserve POVs and activity in Advanced Recall cutoff summaries #7226

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6558
Author: @SpicyMarinara
Created: 9/23/2026
Status: ✅ Merged
Merged: 9/23/2026
Merged by: @SpicyMarinara

Base: staging ← Head: codex/sept23-recall-cutoff


📝 Commits (2)

  • 8db78e2 docs: track Advanced Recall cutoff summary fixes
  • 8d4f796 fix: preserve Advanced Recall summary POVs and report activity

📊 Changes

6 files changed (+385 additions, -157 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 e2e/advanced-memory.e2e.ts (+177 -137)
📝 packages/server/src/services/advanced-memory.ts (+12 -13)
📝 packages/shared/src/utils/macro-engine.ts (+55 -0)
📝 scripts/regressions/advanced-memory-post-generation.regression.ts (+39 -1)
📝 scripts/regressions/advanced-memory-summary.regression.ts (+100 -6)

📄 Description

Linked issue

Closes #6557

Owner: SpicyMarinara, implemented with Codex.

Why this change

After an Advanced Memory context cutoff, summary work was missing from the Agents task list and generated character conditions received another enclosing guard. Archive preparation also rendered existing corrections for one character before sending them to the helper, dropping other POV sections. In shared mode, compaction could replace a mixed-POV summary using only the first character's rendered text.

What changed

  • Route summary calls through the existing Advanced Recall post-generation progress helper, including completion and failure events.
  • Reuse the macro parser to keep one character guard per section, preserve dynamic conditions, and enforce the intended readers without nesting redundant guards.
  • Pass existing correction sections intact to the archive helper and explicitly request every POV in the supplied range. Preserve mixed-POV templates during shared-mode compaction, as individual mode already does.

Validation

  • pnpm check passed (formatting, localization, ESLint, types and production builds).
  • pnpm regression:prompt passed.
  • All 10 Advanced Memory regression files passed, including private knowledge, history cutoffs, recovery, post-generation work and summary handling.
  • Six Playwright cases passed across desktop Chromium, mobile Chromium and iPhone-sized WebKit. With a real local Engine server and controlled OpenAI Responses endpoint, main replies streamed before the held helper completed; summary and scene-check calls appeared in Agents and completed normally. Light/dark activity screenshots were inspected.
  • Docker image built and /api/health returned status: ok from an isolated local container.
  • Local CodeRabbit review completed; fixed its character-profile condition and malformed guard-name findings, with regression coverage.

The duplicate-guard and held-helper activity assertions failed before the fixes. Restoring the old correction rendering and shared-mode compaction independently also fails the new POV regressions. Additional cases verify both POVs reach the helper, authored conditions remain intact, private sections stay private, and shared-mode compaction retains the entire mixed-POV entry.

GitHub validation: all 38 checks and CodeRabbit passed before merge, including 356/356 Node regressions and the full browser matrix. The initial iPhone shard hit fetch errors 19 ms after a reload in the unrelated GPT Image 2.5 test; the unchanged test passed three local repeats and its CI shard rerun.

Human verification tasks (unchecked intentionally):

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Manually verify Advanced Recall activity while a cutoff summary runs in the affected chat.
  • Manually verify the configured live helper preserves every POV and existing character conditions.
  • Read and followed CONTRIBUTING.md

Proof limits: synthetic chat fixtures and controlled provider responses; no paid model call, physical iPhone, or access to the affected chat. Existing saved summaries are not rewritten automatically.

Docs and release impact

User-focused [Unreleased] changelog entry included. No new dependency, storage schema, or version change. No user-guide change requiring translation.


🔄 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/6558 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/23/2026 **Status:** ✅ Merged **Merged:** 9/23/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/sept23-recall-cutoff` --- ### 📝 Commits (2) - [`8db78e2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8db78e29e53db7d654d5579075ac931a7a6a3b3c) docs: track Advanced Recall cutoff summary fixes - [`8d4f796`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8d4f7962c80459930338a3c1ea5bac6a478e6c9a) fix: preserve Advanced Recall summary POVs and report activity ### 📊 Changes **6 files changed** (+385 additions, -157 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `e2e/advanced-memory.e2e.ts` (+177 -137) 📝 `packages/server/src/services/advanced-memory.ts` (+12 -13) 📝 `packages/shared/src/utils/macro-engine.ts` (+55 -0) 📝 `scripts/regressions/advanced-memory-post-generation.regression.ts` (+39 -1) 📝 `scripts/regressions/advanced-memory-summary.regression.ts` (+100 -6) </details> ### 📄 Description ## Linked issue Closes #6557 Owner: SpicyMarinara, implemented with Codex. ## Why this change After an Advanced Memory context cutoff, summary work was missing from the Agents task list and generated character conditions received another enclosing guard. Archive preparation also rendered existing corrections for one character before sending them to the helper, dropping other POV sections. In shared mode, compaction could replace a mixed-POV summary using only the first character's rendered text. ## What changed - Route summary calls through the existing Advanced Recall post-generation progress helper, including completion and failure events. - Reuse the macro parser to keep one character guard per section, preserve dynamic conditions, and enforce the intended readers without nesting redundant guards. - Pass existing correction sections intact to the archive helper and explicitly request every POV in the supplied range. Preserve mixed-POV templates during shared-mode compaction, as individual mode already does. ## Validation - `pnpm check` passed (formatting, localization, ESLint, types and production builds). - `pnpm regression:prompt` passed. - All 10 Advanced Memory regression files passed, including private knowledge, history cutoffs, recovery, post-generation work and summary handling. - Six Playwright cases passed across desktop Chromium, mobile Chromium and iPhone-sized WebKit. With a real local Engine server and controlled OpenAI Responses endpoint, main replies streamed before the held helper completed; summary and scene-check calls appeared in Agents and completed normally. Light/dark activity screenshots were inspected. - Docker image built and `/api/health` returned `status: ok` from an isolated local container. - Local CodeRabbit review completed; fixed its character-profile condition and malformed guard-name findings, with regression coverage. The duplicate-guard and held-helper activity assertions failed before the fixes. Restoring the old correction rendering and shared-mode compaction independently also fails the new POV regressions. Additional cases verify both POVs reach the helper, authored conditions remain intact, private sections stay private, and shared-mode compaction retains the entire mixed-POV entry. GitHub validation: all 38 checks and CodeRabbit passed before merge, including 356/356 Node regressions and the full browser matrix. The initial iPhone shard hit fetch errors 19 ms after a reload in the unrelated GPT Image 2.5 test; the unchanged test passed three local repeats and its CI shard rerun. Human verification tasks (unchecked intentionally): - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Manually verify Advanced Recall activity while a cutoff summary runs in the affected chat. - [ ] Manually verify the configured live helper preserves every POV and existing character conditions. - [ ] Read and followed `CONTRIBUTING.md` Proof limits: synthetic chat fixtures and controlled provider responses; no paid model call, physical iPhone, or access to the affected chat. Existing saved summaries are not rewritten automatically. ## Docs and release impact User-focused `[Unreleased]` changelog entry included. No new dependency, storage schema, or version change. No user-guide change requiring translation. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:17:42 +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#7226
No description provided.