[GH-ISSUE #5926] A Game Mode regenerate that returns command-only appends an anchor instead of replacing the message #3274

Closed
opened 2026-10-21 06:01:35 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @kolacheee on GitHub (Sep 7, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5926

Originally assigned to: @SpicyMarinara on GitHub.

When a Game Mode generation is a regenerate (the request carries the id of the message
being redone) and the model's reply strips down to nothing — today that means a reply
that was only bracket commands — the empty-response path ignores the regenerate id and
appends instead: the original message stays, and a new hidden anchor row is created
after it. Regenerate the same turn a few times and the chat accumulates trailing
anchors, one per attempt, while the message being regenerated never changes.

Where it is. The empty-response branch in
packages/server/src/routes/generate.routes.ts (~:7373-7379 on current staging plus
the GM verb runtime branch) always goes through message creation and never consults
input.regenerateMessageId, unlike the normal save path. The shape predates the GM
verb work — a Conversation command-only regenerate does the same — but the verb
channel makes verb-only replies a normal outcome rather than a rarity, so the
accumulation gets easier to hit.

Why it matters. The visible outcome is currently benign (the game surface filters
hidden rows when picking the narration to show, so the player sees the unchanged
original), but the stored chat grows a tail of empty hidden rows with no owner, and
anything that walks raw messages — exports, previews, future tooling — meets them.

The smallest honest fix is to make the empty-response branch honor the regenerate id
the way the normal save path does: a regenerate that comes back command-only should
land its anchor as the regenerated message's new swipe (or replace it), not as a fresh
appended row. Whichever shape is chosen should match what a Conversation command-only
regenerate decides to do, since the two paths share the behavior today.

Originally created by @kolacheee on GitHub (Sep 7, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5926 Originally assigned to: @SpicyMarinara on GitHub. When a Game Mode generation is a regenerate (the request carries the id of the message being redone) and the model's reply strips down to nothing — today that means a reply that was only bracket commands — the empty-response path ignores the regenerate id and appends instead: the original message stays, and a new hidden anchor row is created after it. Regenerate the same turn a few times and the chat accumulates trailing anchors, one per attempt, while the message being regenerated never changes. Where it is. The empty-response branch in `packages/server/src/routes/generate.routes.ts` (~:7373-7379 on current staging plus the GM verb runtime branch) always goes through message creation and never consults `input.regenerateMessageId`, unlike the normal save path. The shape predates the GM verb work — a Conversation command-only regenerate does the same — but the verb channel makes verb-only replies a normal outcome rather than a rarity, so the accumulation gets easier to hit. Why it matters. The visible outcome is currently benign (the game surface filters hidden rows when picking the narration to show, so the player sees the unchanged original), but the stored chat grows a tail of empty hidden rows with no owner, and anything that walks raw messages — exports, previews, future tooling — meets them. The smallest honest fix is to make the empty-response branch honor the regenerate id the way the normal save path does: a regenerate that comes back command-only should land its anchor as the regenerated message's new swipe (or replace it), not as a fresh appended row. Whichever shape is chosen should match what a Conversation command-only regenerate decides to do, since the two paths share the behavior today.
bsakaguchi 2026-10-21 06:01:35 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 8, 2026):

Codex is taking #5926 and #5927 for @SpicyMarinara. The draft targets staging and keeps command-only regenerations on the existing message/swipe while making Game narration and its sibling readers agree about hidden rows.

<!-- gh-comment-id:5592297910 --> @SpicyMarinara commented on GitHub (Sep 8, 2026): Codex is taking #5926 and #5927 for @SpicyMarinara. The draft targets `staging` and keeps command-only regenerations on the existing message/swipe while making Game narration and its sibling readers agree about hidden rows.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 8, 2026):

Resolved by #5975, merged into staging. Command-only regeneration now saves a new swipe on the original message; the real generation/storage regression covers repeated regeneration and visibility when switching swipes.

<!-- gh-comment-id:5592606224 --> @SpicyMarinara commented on GitHub (Sep 8, 2026): Resolved by #5975, merged into staging. Command-only regeneration now saves a new swipe on the original message; the real generation/storage regression covers repeated regeneration and visibility when switching swipes.
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#3274
No description provided.