[PR #8184] [MERGED] fix(game): preserve already-paid post-roll check costs #8146

Closed
opened 2026-10-24 04:10:46 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8184
Author: @SpicyMarinara
Created: 10/23/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/game-postroll-resource-payment-8180


📝 Commits (2)

  • bc447ae chore: start post-roll check payment fix
  • 5b2fe37 fix(game): preserve already-paid post-roll check costs

📊 Changes

2 files changed (+295 additions, -1 deletions)

View changed files

📝 packages/server/src/routes/generate.routes.ts (+4 -1)
➕ scripts/regressions/game-postroll-check-cost.regression.ts (+291 -0)

📄 Description

Linked issue

Closes #8180

Why this change

A ruleset check pays its purchase before the post-roll narrator runs. The old rewrite instruction asks for a sheet command for every spent resource, so it can request that same payment again: Gravewatch Resolve3 becomes1 instead of2.

What changed

  • Give the post-roll narrator the engine's actual reported check payments and distinguish already-applied check costs from new consequences.
  • Label those legacy receipt details as potentially partial: a catalog entry can also pay a row-use counter. The instruction covers all already-applied check-pass effects while retaining new harm, healing and genuinely additional costs, including another cost in the same pool.
  • Add a runnable real-generation-route regression covering payment, regeneration, clamping, refusal, two-pool entry costs and independent consequences. No shared schema/API, payment arithmetic or sheet-command filtering changes.

Validation

Raw-verified runnable proof and logs for final candidate 5b2fe37337b6390294ccb5544185e33713ce76bc:

  • Earlier repair: full pnpm check PASS (one inherited Professor hook warning), seven source shell smokes PASS and three compiled-startup smokes PASS. These preceded the final prompt-wording/test-only clarification; the old compiled output is not claimed to contain the revised wording. The clarification changes no executable logic, import or type shape, so another production build was not repeated.

  • Final source: canonical HTTP regression PASS in six groups, including separate two-pool entry cases with/without an additional same-pool cost; existing purchase and catalog-entry controls PASS; the three canonical prompt, attachment and context-fit regression files PASS; focused Prettier and Git diff checks PASS.

  • Local review: initial CodeRabbit completed with one minor. Its incomplete-legacy-receipt fact was reproduced using the actual resolver, then addressed with truthful partial-receipt wording, the all-costs instruction and actual HTTP controls. Final CodeRabbit completed with zero findings across both files. Full reports and disposition are in the proof; no product/test edits followed that final review.

  • pnpm check passes locally

  • Container (Docker / Podman) built and ran without issue

  • Ran the app, clicked through the changes manually

  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)

  • Above manual verification completed (describe below)

  • Read and followed CONTRIBUTING.md

Manual verification notes

The regression registers the actual Fastify generation route with temporary real storage and a local provider stub. It checks persisted sheets, saved roll records/narration and the streamed state patch. The corrected unchanged-source before run fails three original payment cases; the final suite passes. The expanded entry fixture's first attempt reused a depleted chat between scenarios; that failure is preserved, and the corrected cases each start from their own initial state.

Claim boundary: this fixes contradictory prompt instructions. The local narrator follows that instruction; arbitrary live-model obedience remains unverified. Manual verification should use a live provider for a paid check followed by new harm/healing and an additional cost. Browser smokes are emulation, not physical-device proof. No local Docker or live-provider success is claimed.

A clean install could not complete under filesystem pressure. The five dependency inputs match an existing immutable registry set; validation used private workspace links and separate outputs. A standard dev starter then tried its own install and hit ENOSPC before startup; the retained log records that infrastructure failure. Final source smokes used direct existing Node/Vite/Playwright binaries without an install hook. No dependency or launcher product changes are included. Hosted final-head checks and actual Dottore review remain merge gates.

Docs and release impact

Runtime prompt correction only; no new user setting, public contract or release metadata. No user-document change or translation follow-up is needed. No CHANGELOG.md edit.

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a follow-up issue opened
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

No interface changes. Shell/compiled smoke logs are in the proof; no screenshot is presented as validation of model behavior.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/8184 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/23/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/game-postroll-resource-payment-8180` --- ### 📝 Commits (2) - [`bc447ae`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bc447ae53662d2bbfe94713ec169176552cda76b) chore: start post-roll check payment fix - [`5b2fe37`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5b2fe37337b6390294ccb5544185e33713ce76bc) fix(game): preserve already-paid post-roll check costs ### 📊 Changes **2 files changed** (+295 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/routes/generate.routes.ts` (+4 -1) ➕ `scripts/regressions/game-postroll-check-cost.regression.ts` (+291 -0) </details> ### 📄 Description ## Linked issue Closes #8180 ## Why this change A ruleset check pays its purchase before the post-roll narrator runs. The old rewrite instruction asks for a sheet command for every spent resource, so it can request that same payment again: Gravewatch Resolve3 becomes1 instead of2. ## What changed - Give the post-roll narrator the engine's actual reported check payments and distinguish already-applied check costs from new consequences. - Label those legacy receipt details as potentially partial: a catalog entry can also pay a row-use counter. The instruction covers all already-applied check-pass effects while retaining new harm, healing and genuinely additional costs, including another cost in the same pool. - Add a runnable real-generation-route regression covering payment, regeneration, clamping, refusal, two-pool entry costs and independent consequences. No shared schema/API, payment arithmetic or sheet-command filtering changes. ## Validation [Raw-verified runnable proof and logs](https://gist.github.com/SpicyMarinara/d5996d090cc0d06e7e4ab0e4c51f3856) for final candidate `5b2fe37337b6390294ccb5544185e33713ce76bc`: - **Earlier repair:** full `pnpm check` PASS (one inherited Professor hook warning), seven source shell smokes PASS and three compiled-startup smokes PASS. These preceded the final prompt-wording/test-only clarification; the old compiled output is not claimed to contain the revised wording. The clarification changes no executable logic, import or type shape, so another production build was not repeated. - **Final source:** canonical HTTP regression PASS in six groups, including separate two-pool entry cases with/without an additional same-pool cost; existing purchase and catalog-entry controls PASS; the three canonical prompt, attachment and context-fit regression files PASS; focused Prettier and Git diff checks PASS. - **Local review:** initial CodeRabbit completed with one minor. Its incomplete-legacy-receipt fact was reproduced using the actual resolver, then addressed with truthful partial-receipt wording, the all-costs instruction and actual HTTP controls. Final CodeRabbit completed with zero findings across both files. Full reports and disposition are in the proof; no product/test edits followed that final review. - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes The regression registers the actual Fastify generation route with temporary real storage and a local provider stub. It checks persisted sheets, saved roll records/narration and the streamed state patch. The corrected unchanged-source before run fails three original payment cases; the final suite passes. The expanded entry fixture's first attempt reused a depleted chat between scenarios; that failure is preserved, and the corrected cases each start from their own initial state. Claim boundary: this fixes contradictory prompt instructions. The local narrator follows that instruction; arbitrary live-model obedience remains unverified. Manual verification should use a live provider for a paid check followed by new harm/healing and an additional cost. Browser smokes are emulation, not physical-device proof. No local Docker or live-provider success is claimed. A clean install could not complete under filesystem pressure. The five dependency inputs match an existing immutable registry set; validation used private workspace links and separate outputs. A standard dev starter then tried its own install and hit ENOSPC before startup; the retained log records that infrastructure failure. Final source smokes used direct existing Node/Vite/Playwright binaries without an install hook. No dependency or launcher product changes are included. Hosted final-head checks and actual Dottore review remain merge gates. ## Docs and release impact Runtime prompt correction only; no new user setting, public contract or release metadata. No user-document change or translation follow-up is needed. No `CHANGELOG.md` edit. - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a follow-up issue opened - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) No interface changes. Shell/compiled smoke logs are in the proof; no screenshot is presented as validation of model behavior. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi changed title from [PR #8184] fix(game): preserve already-paid post-roll check costs to [PR #8184] [MERGED] fix(game): preserve already-paid post-roll check costs 2026-10-25 04:04:25 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#8146
No description provided.