mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1149] [Issue]: Refactor game segment edits leave JSON fragments from unknown tags #568
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#568
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 @cha1latte on GitHub (May 24, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1149
Originally assigned to: @cha1latte on GitHub.
Summary
Game-mode segment edits on the refactor branch can leave dangling JSON fragments in the message history when a GM message contains an unknown bracket command with nested brackets.
Expected behavior
When segment edit persistence strips processed/unknown GM command tags, it should remove the entire balanced unknown tag body so the edited history only contains readable narration/dialogue.
Actual behavior
src/engine/modes/game/state/segment-edits.tsstrips unknown[tag: ...]commands with a first-]regex. A tag such as[debug: {"items":["torch"]}]leaves}]behind after stripping. If the player edits/deletes a game narration segment, that malformed residue can be saved into the prompt/history used for later game turns.Steps to reproduce
refactorbranch, run the segment edit stripping path against game narration containing an unknown tag with nested brackets, for example:The room shifts. [debug: {"items":["torch"]}] Continue forward.stripGmCommandTagsruns.Environment
60050abe)Logs, screenshots, or video
Not specified.
Additional context
The client-side game tag parser already has a quote-aware balanced unknown-tag stripper. The refactor engine copy did not get the same handling, so UI-visible parsing and prompt/history rewriting disagree.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: