[PR #1451] [MERGED] Fix Game whitespace-only turns #5094

Closed
opened 2026-10-22 04:13:11 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1451
Author: @cha1latte
Created: 5/28/2026
Status: ✅ Merged
Merged: 5/28/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-1449-game-whitespace-turn


📝 Commits (2)

  • 47a7b55 Fix Game whitespace-only turns
  • 3b605cb Clarify Game turn attachment test fixture

📊 Changes

3 files changed (+101 additions, -2 deletions)

View changed files

➕ src/engine/modes/game/turn/game-turn.service.test.ts (+89 -0)
📝 src/engine/modes/game/turn/game-turn.service.ts (+7 -0)
📝 src/features/modes/game/components/GameSurface.tsx (+5 -2)

📄 Description

Linked issue

Closes #1449

Why this change

  • Game mode could accept a whitespace-only player turn and persist/generate extra messages instead of treating the send as a no-op.

What changed

  • Trim Game turn text at the Game surface send boundary and no-op empty text when there are no attachments.
  • Add a React-free Game turn service guard so kind: "turn" requests with no player text and no attachments do not enter generation.
  • Add a focused regression test for whitespace-only Game turns and attachment-only turns.

Refactor impact

Primary owner:

Game mode / engine generation.

Impact areas reviewed:

  • Game input send path
  • Game turn generation service
  • Remote runtime QA core flow

Boundary notes:

  • UI stays in src/features.
  • Product turn validation lives in src/engine.
  • No storage schema, shared API, Rust runtime, dependency, or provider protocol changes.

Pressure points touched:

  • GameSurface
  • Game turn generation service

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

Codex verification run:

  • pnpm exec vitest run src/engine/modes/game/turn/game-turn.service.test.ts passed.
  • MARINARA_QA_ONLY_BLOCKS=core-flow MARINARA_QA_OUT_DIR=scratch/game-qa-fix-1449-before node scratch/game-qa-runner.mjs reproduced the original whitespace failure.
  • MARINARA_QA_ONLY_BLOCKS=core-flow MARINARA_QA_OUT_DIR=scratch/game-qa-fix-1449-after-2 node scratch/game-qa-runner.mjs passed with bugs: 0.
  • node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\game-qa-fix-1449-after-2\ledger.json passed.
  • pnpm check passed.

Non-blocking tooling limitation:

  • graphify update . timed out twice, including a longer retry.
  • graphify update . --no-cluster also timed out.
  • Orphaned Graphify/Python processes were stopped after each timeout.

Evidence note:

  • Before/after screenshots are local-only because GitHub gist upload rejected PNG binaries.
  • The core claim is still covered by the targeted browser QA ledger, proof gate, local unit test, pnpm check, and passing GitHub CI.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

Local evidence paths:

  • Before: scratch/game-qa-fix-1449-before/core-flow-whitespace-created-message.png
  • After: scratch/game-qa-fix-1449-after-2/core-flow-after-reload.png

These screenshots are not GitHub-renderable from the PR body; the automated browser QA and CI results above are the reviewer-visible proof for the core fix.


🔄 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/1451 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/28/2026 **Status:** ✅ Merged **Merged:** 5/28/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-1449-game-whitespace-turn` --- ### 📝 Commits (2) - [`47a7b55`](https://github.com/Pasta-Devs/Marinara-Engine/commit/47a7b55e41de3dee07f4a41d53ec19a2eaa792fd) Fix Game whitespace-only turns - [`3b605cb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3b605cb90ca0086b732e121f6b2ae341500055f8) Clarify Game turn attachment test fixture ### 📊 Changes **3 files changed** (+101 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `src/engine/modes/game/turn/game-turn.service.test.ts` (+89 -0) 📝 `src/engine/modes/game/turn/game-turn.service.ts` (+7 -0) 📝 `src/features/modes/game/components/GameSurface.tsx` (+5 -2) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue Closes #1449 ## Why this change - Game mode could accept a whitespace-only player turn and persist/generate extra messages instead of treating the send as a no-op. ## What changed - Trim Game turn text at the Game surface send boundary and no-op empty text when there are no attachments. - Add a React-free Game turn service guard so `kind: "turn"` requests with no player text and no attachments do not enter generation. - Add a focused regression test for whitespace-only Game turns and attachment-only turns. ## Refactor impact Primary owner: Game mode / engine generation. Impact areas reviewed: - Game input send path - Game turn generation service - Remote runtime QA core flow Boundary notes: - UI stays in `src/features`. - Product turn validation lives in `src/engine`. - No storage schema, shared API, Rust runtime, dependency, or provider protocol changes. Pressure points touched: - `GameSurface` - Game turn generation service ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> - [ ] `pnpm check` passes locally - [ ] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [ ] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes Codex verification run: - `pnpm exec vitest run src/engine/modes/game/turn/game-turn.service.test.ts` passed. - `MARINARA_QA_ONLY_BLOCKS=core-flow MARINARA_QA_OUT_DIR=scratch/game-qa-fix-1449-before node scratch/game-qa-runner.mjs` reproduced the original whitespace failure. - `MARINARA_QA_ONLY_BLOCKS=core-flow MARINARA_QA_OUT_DIR=scratch/game-qa-fix-1449-after-2 node scratch/game-qa-runner.mjs` passed with `bugs: 0`. - `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\game-qa-fix-1449-after-2\ledger.json` passed. - `pnpm check` passed. Non-blocking tooling limitation: - `graphify update .` timed out twice, including a longer retry. - `graphify update . --no-cluster` also timed out. - Orphaned Graphify/Python processes were stopped after each timeout. Evidence note: - Before/after screenshots are local-only because GitHub gist upload rejected PNG binaries. - The core claim is still covered by the targeted browser QA ledger, proof gate, local unit test, `pnpm check`, and passing GitHub CI. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence Local evidence paths: - Before: `scratch/game-qa-fix-1449-before/core-flow-whitespace-created-message.png` - After: `scratch/game-qa-fix-1449-after-2/core-flow-after-reload.png` These screenshots are not GitHub-renderable from the PR body; the automated browser QA and CI results above are the reviewer-visible proof for the core fix. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:13:11 +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#5094
No description provided.