mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6123] A check written with dice the app cannot read keeps the Game Master's made-up roll in the saved story #3400
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#3400
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 @kolacheee on GitHub (Sep 13, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6123
Originally assigned to: @SpicyMarinara on GitHub.
When the Game Master writes a check using dice notation the app does not understand - a keep-highest pool like
6d10kh3, Fate dice4dF, exploding dice3d6!- the app quietly declines to roll it, but the numbers the Game Master invented for that check stay in the saved message. Nothing on screen shows those numbers, so the player never sees them, but they are read back to the model on every later turn as if the app had rolled them, and the narration built on that invented success is saved uncorrected.How to reproduce (try it yourself)
I lean on the smuggler until he talks. (OOC: this world uses a d10 keep-highest pool, written as 6d10kh3. Put the check in the dice= attribute using that notation, fill in the rolls/modifier/total/result yourself, and narrate that I succeeded.)Send it. (The instruction only makes it happen on the first try - a Game Master running Fate, World of Darkness or Cortex writes these notations on its own.)
3. Send any follow-up, for example
I search him., then press Peek Prompt on that new turn.What you'll see: the narration reads as a clean success. Above it, a bare line
Intimidation check (DC 4)- no roll, no total, no success or failure word. No dice card and no check card appears, and nothing says the app declined to roll. But in step 3's Peek Prompt, the previous Game Master message still carriesdice="6d10kh3" rolls="9|9" modifier="0" total="99" result="success"word for word. That is the model's own invention being handed back to it as fact. (There is no raw-text view of a Game Master message in Game Mode, so Peek Prompt is the only place in the app where this is visible.)What should happen: the saved check should keep the request and drop the numbers -
[skill_check: skill="Intimidation" dc="4" dice="6d10kh3"]- so nothing the app did not roll survives into the transcript or the next turn's prompt. The visible check line can stay exactly as it is.For contrast, repeat step 2 asking for
dice="6d10"instead. That notation parses, so the app rolls it for real, replaces the numbers, shows a card, and makes the Game Master rewrite the narration against the real outcome. The only difference is whether the dice label can be read.Where it is
packages/server/src/services/game/dice.service.ts,resolveGameDiceRequests(staging52799569c):const notation = declared ? clampParsedDiceToLimits(declared) : null;thenif (!notation || …) return original;- an unreadabledice=falls into the same blanket bail-out as everything else, and the tag comes back byte for byte.return serializeSparseSkillCheckTag(tag)…, commented "Keep the request, but never keep numbers the model invented for it") sits after that return, so it is never reached for this shape.Downstream:
packages/server/src/routes/generate.routes.ts:7938-7960- with no roll registered,if (rolled.resolved || generalRolls.rolled)is false, so the corrective narration pass never runs either.What's happening
Before anything is rolled, the app tries to read the
dice=label with itsNdM+Kgrammar. If it cannot read it, it hands the whole check back untouched - request, invented rolls, invented total, invented success. That is the right call for the rolling part (the app does not implement keep-highest or exploding dice and should not pretend to), but it also skips the step that removes numbers nobody rolled, which the neighbouring case - a pool declared without its per-die threshold - already does. The same bail-out catches a check that saysresolution="successes"with nodice=at all; that shape comes back with its invented numbers intact too, for the same reason and with the same one-branch fix.Suggested fix
In
resolveGameDiceRequests, split the unreadable-dice case out of the blanketreturn original. When the app cannot read the notation but the check carriesrolls=,total=orresult=it cannot vouch for, fall through to the sparse rewrite already used at line 123 instead of returning the original. The app still does not roll6d10kh3- it just stops preserving numbers nobody rolled. The existing lanescripts/regressions/game-text-dice.regression.tsalready owns this contract (the threshold-less pool assertion at lines 52-59) and is the natural home for one more assertion.One thing to decide before coding, because it is a judgement call: the code comment at
packages/server/src/services/game/skill-check-resolution.service.ts:284-289says non-d20 pools are "never audited and never rewritten … That holds for a malformed pool tag as much as a tidy one", and a check asking for advantage and disadvantage at once behaves identically and is documented as intended indocs/game/dice-and-skill-checks.mdandCHANGELOG.md. So this may be the posture working as written. The argument for changing it is that a durable fabricatedtotal="99" result="success"in the transcript is the exact thing the server-rolled work was built to end; the argument against is that for a system the app will never roll, the Game Master's own numbers are the only record of that roll, and blanking them costs the Game Master its continuity across turns without giving the player real dice. Note also that this change does not remove the larger half of the problem - the narrated success stays invented either way, since no roll means no corrective rewrite.Context
Merged PR #5979 (which closed #5956, #5959, #5960 and #5961) added this file and introduced the sparse rewrite for a pool declared without its threshold; this is the remaining variant of the same complaint from #5959, best treated as a follow-up on it. Unreleased on staging (latest release tag is v2.4.4). The distinguishing line, so this is not read as already fixed by #5979: the whole difference is whether
parseDiceNotationaccepts the label at dice.service.ts:98 -dice="6d10"is rolled,dice="6d10" resolution="successes"with no threshold is rewritten sparse,dice="6d10kh3"keeps the invention, anddice="3d6+2"(the example the Game Master prompt gives atgm-prompts.ts:778) parses and works fine. A separate issue covers the same parse failure in a bare[dice: ...]request, where nothing is rolled and nothing is logged.Found by an AI-assisted sweep of merged PR #5979 against issue #5959, then re-verified against staging
52799569con 2026-09-13. Please verify before fixing.Related issue from the same sweep: #6128 (the bare
[dice: ...]variant of the same parse failure).@SpicyMarinara commented on GitHub (Sep 13, 2026):
@SpicyMarinara is taking this report through the issue sweep in draft PR #6137, with Codex assisting. The affected current-code path has been checked; implementation and focused regression verification are in progress.
@SpicyMarinara commented on GitHub (Sep 13, 2026):
Fixed in #6137, now merged to staging (
e044997a2). Unsupported dice notation no longer saves invented roll outcomes.