mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3123] [Issue]: automatic roleplay chat summary runs on the first user post/reply #1676
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1676
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @calmcacil on GitHub (Jul 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3123
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Automatic roleplay/visual novel chat summaries can run on the first eligible user post/reply instead of waiting for the configured summary interval. This happens because a missing or stale
lastAutomaticSummaryMessageIdis treated as infinite messages since the last summary.Expected behavior
Automatic summaries should wait until the configured
summaryRunIntervalworth of user messages has actually occurred before generating the first rolling summary.Actual behavior
On a fresh chat, or when
lastAutomaticSummaryMessageIdis missing/invalid, the first eligible assistant reply can immediately trigger an automatic summary. This creates a low-value summary of messages that are already still in active context and wastes a provider call.Steps to reproduce
lastAutomaticSummaryMessageId, such as a fresh chat or migrated/old metadata.Environment
Logs, screenshots, or video
Relevant code path:
packages/server/src/routes/generate.routes.tscountUserMessagesAfterAnchor()returnsNumber.POSITIVE_INFINITYwhenanchorMessageIdis missing or not found.runAutomaticRoleplaySummary()compares that value tosummaryRunInterval, so the first run passes cadence immediately.Additional context
Likely fix: when there is no valid summary anchor, count actual user messages in the chat instead of returning
Infinity.Suggested regression coverage:
summaryRunIntervaluser messages.lastAutomaticSummaryMessageIddoes not force an immediate summary on the next reply.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Jul 2, 2026):
Codex is taking this in branch codex/issue-sweep-3119-3135 for a staging-targeted fix sweep.
@SpicyMarinara commented on GitHub (Jul 2, 2026):
Fix is ready in PR #3138 with CI passing. This issue will close automatically when the PR merges into staging.