mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7466] [MERGED] fix(game): empty purses, tool-round caps, leaner GM prompts, and stable game e2e specs #7746
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#7746
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/7466
Author: @kolacheee
Created: 10/12/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @kolacheee
Base:
staging← Head:fix/game-mode-fixes📝 Commits (10+)
7c27aabtest(e2e): the Decision import notice by its catalog words; both coin toasts at once84f29a4fix(game): tell the Game Master when a purse is empty37444aefix(game): say the party in the empty-purse line, and load the book for coins in use1153771Merge origin/staging into fix/stale-e2e-specs96a7e86test(e2e): run Chromium with its audio output offd276c8ftest(e2e): three game specs that failed on current staginge697af6fix(game): give a Game Mode turn at most four tool roundsb892dbbfix(llm): retell a tool loop's exchange as text for its last request3abb122fix(agents): give an agent at most eight tool rounds, and its last request as text5443dccMerge origin/staging into fix/stale-e2e-specs📊 Changes
28 files changed (+612 additions, -60 deletions)
View changed files
📝
.env.example(+2 -1)📝
CHANGELOG.md(+5 -0)📝
docs/CONFIGURATION.md(+1 -1)📝
docs/agents/custom-agents.md(+2 -0)📝
docs/extending/writing-rulesets.md(+1 -1)📝
docs/game/getting-started.md(+1 -1)📝
e2e/game-npc-portraits.e2e.ts(+24 -14)📝
e2e/game-ruleset-money.e2e.ts(+6 -2)📝
e2e/game-tool-controls.e2e.ts(+3 -0)📝
e2e/ruleset-wound-sheet.e2e.ts(+2 -2)📝
packages/server/src/config/runtime-config.ts(+7 -0)📝
packages/server/src/routes/game.routes.ts(+22 -6)📝
packages/server/src/routes/generate.routes.ts(+29 -6)📝
packages/server/src/routes/generate/retry-agents-route.ts(+3 -1)📝
packages/server/src/services/agents/agent-executor.ts(+27 -4)📝
packages/server/src/services/game/gm-prompts.ts(+17 -4)📝
packages/server/src/services/tools/tool-executor.ts(+60 -1)📝
packages/shared/src/features/rulesets/item-book.ts(+4 -2)📝
playwright.config.ts(+18 -2)📝
scripts/regressions/advanced-memory-post-generation.regression.ts(+3 -1)...and 8 more files
📄 Description
Linked issue
Closes #7465
Why this change
MAX_TOOL_ROUNDSof 100, so a model that kept asking for a roll could make up to a hundred paid requests in one turn. The loop's last request goes out without tools, and native Anthropic and Gemini formats cannot carry a tool exchange without them, so a cap makes that request routine and it has to be valid.What changed
rulesetPurseTextsays "no coins" when the game has coins and the bag holds none;buildGmFormatReminderalways prints the player's inventory line when a purse is said and says party members not listed carry nothing;generate.routes.tsloads the item book when the pinned ruleset has coins in use.GAME_TURN_MAX_TOOL_ROUNDS = 4andAGENT_MAX_TOOL_ROUNDS = 16(a lorebook backfill asks for 64, and no stored agent setting goes past that); a lowerMAX_TOOL_ROUNDSstill wins, and a run that uses every round is logged.toolRoundsAsTextretells the last request's tool exchange as text, naming each call with its arguments (cut at 300 characters) so a receipt such as{"ok":true}still says what it was for. Docs:docs/CONFIGURATION.md,.env.example,docs/agents/custom-agents.md,docs/game/getting-started.md.--disable-audio-output(a headless page could stall about 17 s opening its first audio device, so toasts vanished before they were checked); the coin spec waits for both of a turn's toasts at once; the tool controls spec gets the time its four reloads need; the NPC portrait spec waits as long after a reload as on first load; the storage writer lock lane finds the watcher underpnpm -stoo. Staging had already fixed the Decision import notice, one-request dice and combat director specs its own way, so those files follow staging.advanced-memory-post-generation(new on staging) spots a tool follow-up by itstoolmessages; it now also counts the last round's follow-up, which retells the results as text.game-ruleset-money,game-inventory-turn,game-tool-outcomes,agent-runtime,game-ruleset-setup,cjk-token-budgets,open-issues.Validation
pnpm checkpasses locallyCONTRIBUTING.mdaee076362:pnpm checkgreen;node scripts/run-regressions.mjs583/587, thenadvanced-memory-post-generationpasses alone after the fix above. The three still failing (memory-recall-revectorize,regeneration-context,native-export-memorytimeout) fail the same way on stagingaee076362in the same container.Manual verification notes
MAX_TOOL_ROUNDS=1on an Anthropic connection and an OpenAI-compatible Gemini connection both narrated the roll; a body-capture probe of each native formatter shows the last request carries notoolrole,tool_callsor provider parts.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)[Unreleased]entries added.docs/CONFIGURATION.md,docs/agents/custom-agents.md,docs/game/getting-started.mdanddocs/extending/writing-rulesets.mdchanged; the translations are tracked on the Game Mode catch-up issue #6813.UI evidence (if applicable)
Not applicable (server, prompts and tests).
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.