mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8310] [MERGED] perf(game): cache the GM's standing instructions with the system prompt; repair drifted speaker lines #8267
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#8267
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8310
Author: @kolacheee
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @kolacheee
Base:
staging← Head:claude/project-thread-r412n9📝 Commits (3)
4ac581eCache the GM's standing instructions with the system prompt; repair drifted speaker linesd77556aCount repaired speaker lines the same in segment edits and the Interrupt cut549d0a9Name the truncation offset helper's parameter apart from the scan position📊 Changes
10 files changed (+1023 additions, -530 deletions)
View changed files
📝
docs/development/game-rulesets-and-sheets-implementation.md(+2 -2)📝
packages/client/src/components/game/GameNarration.tsx(+1 -181)➕
packages/client/src/lib/narration-truncation.ts(+220 -0)📝
packages/client/src/lib/party-dialogue-parser.ts(+2 -2)📝
packages/server/src/routes/generate.routes.ts(+120 -108)📝
packages/server/src/services/game/gm-prompts.ts(+334 -233)📝
packages/server/src/services/game/segment-edits.ts(+8 -1)📝
packages/shared/src/utils/game-narration-text.ts(+78 -3)➕
scripts/regressions/game-gm-reminder-split.regression.ts(+105 -0)➕
scripts/regressions/game-speaker-line-repair.regression.ts(+153 -0)📄 Description
Linked issue
Closes #8309
Why this change
[whisper:Target]line lost its target to the unknown-tag stripper.What changed
buildGmFormatRemindertakespart: "whole" | "stable" | "turn"."whole"is the default and renders exactly what it did before.[main] [side]), a merged slot splits ([main|thinking]becomes typemain, spritethinking), and a dash where the colon goes counts as the colon. Lines already in shape, lines with no type slot and prose are left alone. The party dialogue parser uses the same repair.[whisper:Target]right after a speaker's bracket is kept as the line's type instead of being stripped as an unknown tag, so a whisper shows as one again. A whisper command anywhere else is still stripped.Validation
tsc --noEmitpass, and Prettier is clean on the changed filesgame-gm-reminder-split: the stable part is the same bytes whatever the turn holds, carries no live state, and the turn part carries all of it; the placement goes before lore and leaves history alonegame-speaker-line-repair: each drifted shape, lines left alone, whisper targets kept, whisper commands still stripped, and bounded time on runaway outputCONTRIBUTING.mdManual verification notes
Docs and release impact
docs/development/game-rulesets-and-sheets-implementation.mdsays where the sheet guidance and the sheets now godocs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation): noted on #7512🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.