mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6128] When the Game Master asks for a dice roll the engine can't read, nothing is rolled and nothing anywhere says why #3405
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#3405
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/6128
Originally assigned to: @SpicyMarinara on GitHub.
If the Game Master writes a dice request in notation the engine doesn't support (for example
[dice: 4d6kh3]for keep-highest,[dice: 3d6!]for exploding dice, or[dice: 4dF]for Fate dice), the request is quietly dropped: no dice are rolled, the tag is removed from the narration, and the turn continues as if it was never asked for. Leaving the player's screen clean is intended, but nothing is written to the server log either, so when a game stops producing rolls there is no way for anyone - player or maintainer - to find out why.How to reproduce (try it yourself)
When the player attacks, request the damage roll by writing exactly [dice: 4d6kh3] in your narration and write no numbers yourself.I swing my greatsword at the ogre.Keep the turn to that one request.What you'll see: the narration arrives with the request simply gone - no animated dice card, no dice badge, no rewrite of the narration around a real total, and no line at any log level (including
debug) about the request. The Game Master either leaves the outcome hanging or makes one up.[dice: 4d6]. The same turn now shows the dice card, the badge, and narration rewritten around the real total. The only difference is the notation.What should happen: the dropped request should leave a trace. At minimum a server warning naming the notation the engine could not read, and a way for the Game Master to learn its request was not understood so it can re-ask in supported notation. Whether the player also sees a one-line note is a product call.
A faster check without a model: from the repository, run
resolveGameDiceRequests("[dice: 4d6kh3]")frompackages/server/src/services/game/dice.service.tsunderpackages/server/node_modules/.bin/tsx. It returns the text byte-identical withrolled = 0and no rolls.Where it is
At staging
52799569c:packages/server/src/services/game/dice.service.ts:85-87, inresolveGameDiceRequests:const notation = parseDiceNotation(body);thenif (!notation) return original;- no logging anywhere in the file.packages/shared/src/utils/dice-notation.ts:22-DICE_NOTATION_REGEX = /^(\d+)?d(\d+)([+-]\d+)?$/i, anchored, sokh3,!,dF, inner spaces and trailing attributes all miss.packages/server/src/routes/generate.routes.ts:7943(the call) and:7948-7958(theroll_diceevent that draws the card is sent only for rolls that actually happened).packages/client/src/lib/game-tag-parser.ts:497, :923, :961, :1023- every[dice: ...]tag is stripped from visible text regardless of body.What's happening
The engine finds the tag, fails to parse its contents, and returns the tag exactly as written - deliberately, so that already-resolved records like
[dice: 2d6 = 10 (4 + 6)]survive a re-scan untouched. The unread request then rides that same path: no roll, so no dice card and no second pass that rewrites the narration around real numbers, and the client strips the leftover tag before the player sees it. The parse failure is never recorded, so the only evidence is a missing roll.Suggested fix
Separate "already resolved" from "cannot be read" at the parse site instead of treating both as leave-alone. A resolved record already has a recognisable shape (
= total (...)), so a body that matches neither that nor the supported notation can be treated as a genuine miss: log a warning naming the notation, and count it so a fix or regression is observable. Then decide one policy for telling the Game Master, ideally reusing whatever path already feeds roll results back into the same turn, so the model can re-ask in supported notation rather than inventing an outcome. If a player-visible note is wanted too, it should match how unresolvable skill checks already behave rather than inventing a second style. Worth pinning in thegame-text-diceregression lane: it already asserts that unreadable notation rolls nothing, but nothing asserts that the miss is reported.Context
This path arrived with merged PR #5979, which delivered issue #5959 (let the Game Master request rolls from narration text); it landed after v2.4.4, so it is unreleased on staging. Worth saying plainly: the silence toward the player looks intentional, not accidental - the Game Master instructions state the supported notation and say exploding dice, botches and other special pool rules are not implemented (
packages/server/src/services/game/gm-prompts.ts:776-777), anddocs/game/dice-and-skill-checks.mdalready describes leaving unresolvable checks alone with no banner. So the gap worth closing here is the missing server warning and the missing feedback to the model, not the quiet screen; the same reporting would naturally cover the unresolvable skill-check cases the documentation describes. A separate issue covers the[skill_check:]variant of the same parse failure, where the Game Master's invented numbers are also kept in the saved message.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: #6123 (the
[skill_check:]variant where invented numbers are kept).@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 requests produce bounded diagnostics and a corrective generation path.