[PR #6460] [MERGED] fix: clear obsolete memory cutoffs after manual flag changes #7186

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

📋 Pull Request Information

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

Base: staging ← Head: codex/sept20-memory-cutoff-review


📝 Commits (2)

  • 4611a2b chore: coordinate memory cutoff review follow-up
  • 9966570 fix: invalidate memory cutoffs when manual starts change

📊 Changes

3 files changed (+34 additions, -7 deletions)

View changed files

📝 CHANGELOG.md (+1 -1)
📝 packages/server/src/services/advanced-memory.ts (+15 -6)
📝 scripts/regressions/advanced-memory-history-start.regression.ts (+18 -0)

📄 Description

Linked issue

Follow-up to #6459 and #6450.

Why this change

The memory fix has landed on staging. Local CodeRabbit review identified that removing or moving a shared manual start can leave the previously derived live-context cutoff in place.

What changed

Continuity records now track the shared manual start they were derived from. Removing or moving that flag invalidates its old cutoff; normal budget-based rollover still applies. The preparation policy also invalidates previously cached prompts, and the existing changelog entry is shorter.

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

Manual verification notes

Passed locally: pnpm check, pnpm regression:prompt, and all six Advanced Memory regressions. The 1,000-message regression failed before the fix and now proves that removing a shared flag restores eligible live history, clears the stale marker, and respects moving the flag earlier. Hidden-message and individual-character restrictions, automatic rollover, long-scene compression, historical regeneration, reset, and original transcript preservation remain covered.

A local runtime container built from compiled artifacts on the existing identical-dependency production base returned a healthy /api/health. The GitHub container check performs the full source build. Existing desktop/mobile automatic-marker browser proof remains linked from #6459; this follow-up changes no layout. Human checklist items remain unchecked. Manually verify removing a flag in the installed app with a live provider.

This fixes both local CodeRabbit findings from #6459. Local CodeRabbit review of the completed follow-up passed with zero further findings. GitHub review feedback remains under observation; the maintainer merged this follow-up while those reviews were pending.

Docs and release impact

Update the existing Unreleased memory entry. No version or dependency changes.

UI evidence

No new UI layout. Reuses the automatic markers from #6459.


🔄 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/6460 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/20/2026 **Status:** ✅ Merged **Merged:** 9/20/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/sept20-memory-cutoff-review` --- ### 📝 Commits (2) - [`4611a2b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4611a2b043dc8ef36921af168b059a344745425e) chore: coordinate memory cutoff review follow-up - [`9966570`](https://github.com/Pasta-Devs/Marinara-Engine/commit/996657039c46adbc59138e6e98fb390d842125eb) fix: invalidate memory cutoffs when manual starts change ### 📊 Changes **3 files changed** (+34 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -1) 📝 `packages/server/src/services/advanced-memory.ts` (+15 -6) 📝 `scripts/regressions/advanced-memory-history-start.regression.ts` (+18 -0) </details> ### 📄 Description ## Linked issue Follow-up to #6459 and #6450. ## Why this change The memory fix has landed on staging. Local CodeRabbit review identified that removing or moving a shared manual start can leave the previously derived live-context cutoff in place. ## What changed Continuity records now track the shared manual start they were derived from. Removing or moving that flag invalidates its old cutoff; normal budget-based rollover still applies. The preparation policy also invalidates previously cached prompts, and the existing changelog entry is shorter. ## 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` ### Manual verification notes Passed locally: `pnpm check`, `pnpm regression:prompt`, and all six Advanced Memory regressions. The 1,000-message regression failed before the fix and now proves that removing a shared flag restores eligible live history, clears the stale marker, and respects moving the flag earlier. Hidden-message and individual-character restrictions, automatic rollover, long-scene compression, historical regeneration, reset, and original transcript preservation remain covered. A local runtime container built from compiled artifacts on the existing identical-dependency production base returned a healthy `/api/health`. The GitHub container check performs the full source build. Existing desktop/mobile automatic-marker browser proof remains linked from #6459; this follow-up changes no layout. Human checklist items remain unchecked. Manually verify removing a flag in the installed app with a live provider. This fixes both local CodeRabbit findings from #6459. Local CodeRabbit review of the completed follow-up passed with zero further findings. GitHub review feedback remains under observation; the maintainer merged this follow-up while those reviews were pending. ## Docs and release impact Update the existing Unreleased memory entry. No version or dependency changes. ## UI evidence No new UI layout. Reuses the automatic markers from #6459. --- <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:21 +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#7186
No description provided.