mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #1777] [Issue]: Gacha Forge story memory stops for good when an already-summarized source changes #1748
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#1748
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 @SpicyMarinara on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1777
Originally assigned to: @SpicyMarinara on GitHub.
Summary
If a source that story memory has already summarized changes its fingerprint, background memory stops for good. It never summarizes later chapters, and Retry does not help. Two chapters later every prompt falls back to the legacy history. That history is unbounded, so on most models generation then fails with
context-too-large.Found while investigating #1761. That issue's fix (gacha-forge 1.25.2) bounds the summaries sent while the overview is behind; it does not touch this stall.
Affected package
gacha-forge(1.25.1 and earlier; still present in 1.25.2)Expected behavior
A changed source does not stop memory. Later canon keeps being summarized, the overview is rebuilt, and recall stays on the bounded memory path.
Actual behavior
maintainImplreturnsstale/source-changedat the first source whose fingerprint differs from its saved record, and keeps the old record (packages/gacha-forge/src/story-memory.mjs, theexisting.fingerprint !== source.fingerprintcheck in the source loop). This is deliberate: "first canonical records cannot be rewritten by replay" (tests/gacha-forge-story-memory.regression.mjs). But it returns before summarizing anything after that source.recall()sets the overview aside, because one of its stamps no longer matches.recall()returnsstaleandcontext()useslegacy(). Legacy holds every earlier chapter in full unless a manual Compress digest exists. In a probe with 42 chapters it came to 227,079 tokens; on a 32k model the route returnedgeneration-failed/context-too-large.Steps to reproduce
No gameplay path changes a completed source today. Completed chapters and Character Stories refuse regeneration, and a regeneration that resets an ongoing one clears the overview itself. The realistic triggers are:
Probe (scratch harness, real bundle routes): change the content of a covered Character Story, then play two more chapters. Memory stays
stale/source-changedwith an unchangedrecordCount, and the next scene uses the legacy history.Environment
Logs, screenshots, or video
Bundle probe after a covered Character Story changed: memory
"phase":"stale","reason":"source-changed"; two chapters laterrecordCountstays 41 and the chat route returns"error":"generation-failed","detail":"generation-output-capacity"at 32k.Additional context
This needs a maintainer decision on policy:
validRecordsand the overview's stamp check accept it, and later sources keep being summarized. This matches the existing "first canon is never rewritten" rule and protects against replays. (Recommended.)legacy(), so a memory failure degrades to a shorter history instead of a refused prompt.Related: #1761, #1765.
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 (Oct 27, 2026):
SpicyMarinara chose option A: the first-saved record stays canon and memory carries on, and the legacy full-history fallback gets bounded too. Claude Code is adding this to #1778 (Gacha Forge 1.25.2).