[PR #6319] [MERGED] fix: address translation, startup and Mindless pursuit regressions #7135

Closed
opened 2026-10-23 04:16:50 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6319
Author: @SpicyMarinara
Created: 9/18/2026
Status: ✅ Merged
Merged: 9/18/2026
Merged by: @SpicyMarinara

Base: staging ← Head: codex/translation-only


📝 Commits (8)

  • 5afaba2 chore: start translation-only display fix
  • d6a0d03 fix: refresh translated replies and repair incomplete client builds
  • abf4dac test: tighten translation and launcher regression coverage
  • d6411c4 test: parse the Termux build block without backtracking
  • 119de3f fix: keep Mindless pursuit independent of terrain cost
  • 05bbb52 fix: reject explicit resource requests in SPA fallback
  • afb0dd3 fix: queue translations when regenerated source changes
  • 7783687 test: use touch input for mobile translation regeneration

📊 Changes

22 files changed (+567 additions, -39 deletions)

View changed files

📝 CHANGELOG.md (+6 -0)
📝 docs/TROUBLESHOOTING.md (+8 -0)
📝 docs/conversation/selfies.md (+9 -0)
📝 docs/development/game-combat-difficulty-weather.md (+1 -1)
➕ e2e/translation-only.e2e.ts (+199 -0)
📝 packages/client/src/hooks/use-generate.ts (+1 -1)
📝 packages/client/src/hooks/use-translate.ts (+11 -4)
📝 packages/client/vite.config.ts (+1 -0)
📝 packages/server/src/app.ts (+3 -13)
📝 packages/server/src/config/client-static-config.ts (+26 -0)
📝 packages/server/src/services/generation/empty-response-reason.ts (+1 -1)
📝 packages/shared/src/features/tactical-combat/profile-ai.ts (+3 -3)
➕ scripts/check-client-build.mjs (+41 -0)
📝 scripts/regressions/combat-ai.regression.ts (+14 -0)
➕ scripts/regressions/deepseek-reasoning-output.regression.ts (+92 -0)
➕ scripts/regressions/launcher/client-build.regression.mjs (+57 -0)
📝 scripts/regressions/open-issues.regression.ts (+11 -5)
📝 scripts/regressions/provider-compat.regression.ts (+1 -1)
📝 scripts/regressions/static-cache-headers.regression.ts (+67 -5)
📝 start-termux.sh (+3 -2)

...and 2 more files

📄 Description

Why this change

Regenerating a translated reply reused its old translation because automatic translation skipped every message ID already in the cache. The new original then appeared beside the stale translation even with Show Only Translation enabled. Compare the cached source as well as the message ID so regenerated content is translated again, retaining the existing stale-source guard for manual edits. If an older translation is still pending, reuse the existing queue and translate the changed source after that request and its persistence finish.

A partial client build could also pass launcher checks with only index.html present, while missing JavaScript requests received HTML from the SPA fallback. Reuse Vite's manifest to check eager/lazy chunks, styles and assets before startup; rebuild incomplete clients on Windows, Unix and Termux. Restrict the HTML fallback to browser navigation and return non-cacheable 404s for missing assets.

Closes #6317
Closes #6320
Closes #6318
Closes #6324
Refs #6321 — investigation remains open; this PR corrects misleading output-budget advice and adds provider-response regression coverage. It does not claim the intermittent live DeepSeek report is fixed.

Documentation review also reproduced a Tactical pursuit regression: a Mindless enemy took a longer cheap route instead of the fewest legal steps. A small condition in the existing path calculation preserves that policy while still charging real movement costs. Other profiles retain cost-aware pursuit.

What changed

  • Preserve shortest-step pursuit for Mindless units; strengthen the existing forest fixture so the cheaper detour genuinely differs.
  • Refresh automatic translations when regenerated content no longer matches their saved source, including regeneration while an earlier translation is pending.
  • Validate the client build using Vite's existing inventory, including a one-time rebuild of older builds without an inventory; stop if rebuilding remains incomplete.
  • Preserve HTML navigation while keeping missing assets/API/non-navigation requests out of the SPA fallback. Explicit resource destinations receive 404s even with HTML Accept headers; clients without Fetch Metadata and frame navigation remain supported.
  • Document supported selfie marker forms, Conversation setup requirements, and recovery from missing frontend assets.
  • Clarify reasoning-only errors when no output-limit exhaustion was reported; cover separate/combined reasoning and final-content responses without exposing reasoning as the answer.

Validation performed

  • pnpm check, including localization, formatting, lint/types, E2E types and production builds; pnpm version:check.
  • The final implementation at afb0dd3 also passed all 300 Node regressions in CI, plus native/platform artifact checks.
  • Full local Node suite before the pursuit follow-up: 300/300 passed; focused launcher/HTTP cases passed. After #6324, pnpm check and the combat AI/conditions regressions pass, including the demonstrated failing forest route, actual AI choices and snow-limited movement.
  • pnpm regression:launcher-update; new client-build regression; bash -n start.sh start-termux.sh; inventory check against the real production build.
  • Static-cache/fallback, provider compatibility and DeepSeek reasoning-output regressions (24 synthetic provider combinations).
  • Browser suite: 10 passed, 2 intentionally skipped. Nine translation cases cover Roleplay, Conversation and Game in desktop Chromium, mobile Chromium and mobile WebKit. Roleplay/Conversation additionally exercise actual overlapping regenerations with a delayed translation, reload, display-both, and a manual-edit negative control. The existing desktop reasoning-collapse case passes; that existing test skips mobile.
  • The mobile translation fixture uses actual touch taps, reveals actions only when needed, and retains the confirmation, overlapping-request and persisted-source assertions; all nine cases pass locally. The previous Linux WebKit second-confirmation timeout is being revalidated in CI.
  • Red proof: reverting only the source comparison reproduces the stale translation and fails on the persisted source. A delayed older translation also reproduced the wrong saved source after another regeneration; the shared queue fix passes all nine browser cases. The final pnpm check passes.
  • Local CodeRabbit completed and substantive findings were addressed. The #6324, Fetch Metadata and translation-request follow-up reviews each returned zero findings. The final suggestion to normalize shell-script line endings was declined because .gitattributes already enforces LF on every platform. The test uses string splitting rather than a backtracking regular expression.

Logs and before/after screenshots

Claim boundaries and manual verification

The asset regression proves missing/empty/mismatched inventory detection and correct HTTP fallback behavior. It does not identify the reporter's exact Windows installation failure. The DeepSeek fixtures prove parser behavior for documented response shapes, not live API reliability. No paid provider requests were made.

  • Manually verify translation regeneration and Show Only Translation on desktop and a physical phone.
  • Manually verify startup/rebuild recovery on Windows and Termux, including an old build without a Vite manifest.
  • Build and run the container; the local Docker daemon was unavailable.
  • Capture a sanitized failing DeepSeek response for #6321, including content/reasoning presence, finish reason, usage and active post-processing settings.

Docs and release impact

Added user-facing Unreleased entries. Reviewed the install/update guidance across README, Android README, CONTRIBUTING, configuration, troubleshooting and FAQ; only the focused troubleshooting and selfie sections needed changes. No version bump. All ten documentation language packs, including #6300, #6316, #6322 and the clarified Mindless weather guidance, were merged to docs-i18n in #6311.

Summary by CodeRabbit

  • New Features

    • Tactical enemies now choose pursuit routes differently when terrain and weather affect movement.
    • Regenerated replies are automatically retranslated when their text changes.
    • Duplicate translation requests are avoided for smoother translation handling.
    • Launchers detect incomplete client assets and rebuild them automatically; missing assets now return clearer 404 errors.
  • Bug Fixes

    • Improved errors when reasoning produces no visible response, with clearer retry guidance.
  • Documentation

    • Added Selfie setup and troubleshooting guidance.
    • Expanded installation troubleshooting for blank pages and missing assets.

🔄 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/6319 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/18/2026 **Status:** ✅ Merged **Merged:** 9/18/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/translation-only` --- ### 📝 Commits (8) - [`5afaba2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5afaba27a1bced06fea259c1b6323dd68c1264da) chore: start translation-only display fix - [`d6a0d03`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d6a0d03fcef1c234f270f294e6028fa318ebf6dc) fix: refresh translated replies and repair incomplete client builds - [`abf4dac`](https://github.com/Pasta-Devs/Marinara-Engine/commit/abf4dacd4008e72bc2cf5c7250c2d90155559ec3) test: tighten translation and launcher regression coverage - [`d6411c4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d6411c4c39591c5bf024e8c1bc8b491ae6367fa7) test: parse the Termux build block without backtracking - [`119de3f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/119de3f03e1dfb100789234f0d4d54d741da3fe8) fix: keep Mindless pursuit independent of terrain cost - [`05bbb52`](https://github.com/Pasta-Devs/Marinara-Engine/commit/05bbb52329df43d0a3bcde0df1f6c1f055348989) fix: reject explicit resource requests in SPA fallback - [`afb0dd3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/afb0dd3eb9f7f0efd23397390e5f8af87a91f2f0) fix: queue translations when regenerated source changes - [`7783687`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7783687710c72d1f6f05d02ca228929bad087d32) test: use touch input for mobile translation regeneration ### 📊 Changes **22 files changed** (+567 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+6 -0) 📝 `docs/TROUBLESHOOTING.md` (+8 -0) 📝 `docs/conversation/selfies.md` (+9 -0) 📝 `docs/development/game-combat-difficulty-weather.md` (+1 -1) ➕ `e2e/translation-only.e2e.ts` (+199 -0) 📝 `packages/client/src/hooks/use-generate.ts` (+1 -1) 📝 `packages/client/src/hooks/use-translate.ts` (+11 -4) 📝 `packages/client/vite.config.ts` (+1 -0) 📝 `packages/server/src/app.ts` (+3 -13) 📝 `packages/server/src/config/client-static-config.ts` (+26 -0) 📝 `packages/server/src/services/generation/empty-response-reason.ts` (+1 -1) 📝 `packages/shared/src/features/tactical-combat/profile-ai.ts` (+3 -3) ➕ `scripts/check-client-build.mjs` (+41 -0) 📝 `scripts/regressions/combat-ai.regression.ts` (+14 -0) ➕ `scripts/regressions/deepseek-reasoning-output.regression.ts` (+92 -0) ➕ `scripts/regressions/launcher/client-build.regression.mjs` (+57 -0) 📝 `scripts/regressions/open-issues.regression.ts` (+11 -5) 📝 `scripts/regressions/provider-compat.regression.ts` (+1 -1) 📝 `scripts/regressions/static-cache-headers.regression.ts` (+67 -5) 📝 `start-termux.sh` (+3 -2) _...and 2 more files_ </details> ### 📄 Description ## Why this change Regenerating a translated reply reused its old translation because automatic translation skipped every message ID already in the cache. The new original then appeared beside the stale translation even with Show Only Translation enabled. Compare the cached source as well as the message ID so regenerated content is translated again, retaining the existing stale-source guard for manual edits. If an older translation is still pending, reuse the existing queue and translate the changed source after that request and its persistence finish. A partial client build could also pass launcher checks with only index.html present, while missing JavaScript requests received HTML from the SPA fallback. Reuse Vite's manifest to check eager/lazy chunks, styles and assets before startup; rebuild incomplete clients on Windows, Unix and Termux. Restrict the HTML fallback to browser navigation and return non-cacheable 404s for missing assets. Closes #6317 Closes #6320 Closes #6318 Closes #6324 Refs #6321 — investigation remains open; this PR corrects misleading output-budget advice and adds provider-response regression coverage. It does **not** claim the intermittent live DeepSeek report is fixed. Documentation review also reproduced a Tactical pursuit regression: a Mindless enemy took a longer cheap route instead of the fewest legal steps. A small condition in the existing path calculation preserves that policy while still charging real movement costs. Other profiles retain cost-aware pursuit. ## What changed - Preserve shortest-step pursuit for Mindless units; strengthen the existing forest fixture so the cheaper detour genuinely differs. - Refresh automatic translations when regenerated content no longer matches their saved source, including regeneration while an earlier translation is pending. - Validate the client build using Vite's existing inventory, including a one-time rebuild of older builds without an inventory; stop if rebuilding remains incomplete. - Preserve HTML navigation while keeping missing assets/API/non-navigation requests out of the SPA fallback. Explicit resource destinations receive 404s even with HTML Accept headers; clients without Fetch Metadata and frame navigation remain supported. - Document supported selfie marker forms, Conversation setup requirements, and recovery from missing frontend assets. - Clarify reasoning-only errors when no output-limit exhaustion was reported; cover separate/combined reasoning and final-content responses without exposing reasoning as the answer. ## Validation performed - `pnpm check`, including localization, formatting, lint/types, E2E types and production builds; `pnpm version:check`. - The final implementation at `afb0dd3` also passed all 300 Node regressions in CI, plus native/platform artifact checks. - Full local Node suite before the pursuit follow-up: 300/300 passed; focused launcher/HTTP cases passed. After #6324, `pnpm check` and the combat AI/conditions regressions pass, including the demonstrated failing forest route, actual AI choices and snow-limited movement. - `pnpm regression:launcher-update`; new client-build regression; `bash -n start.sh start-termux.sh`; inventory check against the real production build. - Static-cache/fallback, provider compatibility and DeepSeek reasoning-output regressions (24 synthetic provider combinations). - Browser suite: 10 passed, 2 intentionally skipped. Nine translation cases cover Roleplay, Conversation and Game in desktop Chromium, mobile Chromium and mobile WebKit. Roleplay/Conversation additionally exercise actual overlapping regenerations with a delayed translation, reload, display-both, and a manual-edit negative control. The existing desktop reasoning-collapse case passes; that existing test skips mobile. - The mobile translation fixture uses actual touch taps, reveals actions only when needed, and retains the confirmation, overlapping-request and persisted-source assertions; all nine cases pass locally. The previous Linux WebKit second-confirmation timeout is being revalidated in CI. - Red proof: reverting only the source comparison reproduces the stale translation and fails on the persisted source. A delayed older translation also reproduced the wrong saved source after another regeneration; the shared queue fix passes all nine browser cases. The final `pnpm check` passes. - Local CodeRabbit completed and substantive findings were addressed. The #6324, Fetch Metadata and translation-request follow-up reviews each returned zero findings. The final suggestion to normalize shell-script line endings was declined because `.gitattributes` already enforces LF on every platform. The test uses string splitting rather than a backtracking regular expression. [Logs and before/after screenshots](https://gist.github.com/SpicyMarinara/00d8d5922a70ac1a113152fe83a19ad1) ## Claim boundaries and manual verification The asset regression proves missing/empty/mismatched inventory detection and correct HTTP fallback behavior. It does not identify the reporter's exact Windows installation failure. The DeepSeek fixtures prove parser behavior for documented response shapes, not live API reliability. No paid provider requests were made. - [ ] Manually verify translation regeneration and Show Only Translation on desktop and a physical phone. - [ ] Manually verify startup/rebuild recovery on Windows and Termux, including an old build without a Vite manifest. - [ ] Build and run the container; the local Docker daemon was unavailable. - [ ] Capture a sanitized failing DeepSeek response for #6321, including content/reasoning presence, finish reason, usage and active post-processing settings. ## Docs and release impact Added user-facing Unreleased entries. Reviewed the install/update guidance across README, Android README, CONTRIBUTING, configuration, troubleshooting and FAQ; only the focused troubleshooting and selfie sections needed changes. No version bump. All ten documentation language packs, including #6300, #6316, #6322 and the clarified Mindless weather guidance, were merged to docs-i18n in #6311. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Tactical enemies now choose pursuit routes differently when terrain and weather affect movement. - Regenerated replies are automatically retranslated when their text changes. - Duplicate translation requests are avoided for smoother translation handling. - Launchers detect incomplete client assets and rebuild them automatically; missing assets now return clearer 404 errors. - **Bug Fixes** - Improved errors when reasoning produces no visible response, with clearer retry guidance. - **Documentation** - Added Selfie setup and troubleshooting guidance. - Expanded installation troubleshooting for blank pages and missing assets. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:16:50 +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#7135
No description provided.