[PR #8027] [MERGED] fix: Game audio, NanoBanana sizing, launcher and Roleplay TTS readiness #8061

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

📋 Pull Request Information

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

Base: staging ← Head: fix/assigned-issue-sweep-20261022


📝 Commits (7)

  • 0d3dfba fix(images): use NanoBanana 2.1 resolution tiers on NanoGPT
  • d52386b fix: complete assigned audio, roleplay and startup issue sweep
  • 331fe2e fix: preserve IPv6 startup and strengthen review regression controls
  • e2b7ae3 fix: persist turn variables before early speech readiness
  • d9590ee Merge remote-tracking branch 'origin/staging' into fix/assigned-issue-sweep-20261022
  • df13d88 fix: reject browser launch requests without a server entrypoint
  • e49993e fix: require the server entry first for browser startup

📊 Changes

32 files changed (+1828 additions, -118 deletions)

View changed files

📝 docs/CONFIGURATION.md (+1 -1)
📝 docs/TROUBLESHOOTING.md (+4 -0)
📝 docs/media/tts-setup.md (+17 -0)
➕ e2e/compatible-game-audio.e2e.ts (+242 -0)
📝 packages/client/src/components/connections/ConnectionEditor.tsx (+96 -9)
📝 packages/client/src/components/game/GameSetupWizard.tsx (+6 -9)
📝 packages/client/src/components/game/GameSurface.tsx (+10 -6)
📝 packages/client/src/hooks/use-connections.ts (+3 -0)
📝 packages/client/src/lib/connection-transfer.ts (+21 -0)
📝 packages/client/src/localization/locales/en.json (+10 -0)
📝 packages/server/src/db/schema/connections.ts (+3 -0)
📝 packages/server/src/index.ts (+7 -0)
📝 packages/server/src/routes/generate.routes.ts (+28 -26)
📝 packages/server/src/routes/tts.routes.ts (+100 -41)
➕ packages/server/src/services/game/compatible-audio.ts (+64 -0)
📝 packages/server/src/services/image/image-generation.ts (+35 -5)
📝 packages/server/src/services/storage/connections.storage.ts (+10 -0)
📝 packages/shared/src/schemas/connection.schema.ts (+14 -0)
📝 packages/shared/src/types/connection.ts (+28 -2)
➕ scripts/regressions/audio-connection-transfer.regression.ts (+74 -0)

...and 12 more files

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote staging or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #7967
Closes #8022
Closes #8023
Closes #8026

Owner: @SpicyMarinara, assisted by Codex.

Why this change

Game music/SFX was restricted to ElevenLabs, NanoGPT rejected NanoBanana 2.1 avatar sizes, launcher timers could open the browser before startup completed, and unrelated agent activation calls could delay Roleplay speech preparation. This maintainer-assigned sweep leaves existing contributor PRs and their dependent translation issues untouched.

What changed

  • Compatible Game audio: the existing OpenAI-compatible Audio source can explicitly enable music/SFX and configure relative endpoint paths. Choose prompt JSON returning MP3 bytes or the ACE-Step-compatible Chat Completions inline-audio contract. Both use the connection's model and credentials. Game setup/playback honor configured capabilities, context tracks retain once-per-area/tier reuse, and requests/cache/retries/audio bytes are validated. Settings survive save/reopen, duplication and safe export/import. Invalid hidden drafts cannot block switching sources. No provider entry is added.
  • NanoBanana 2.1: NanoGPT receives supported 1k/2k resolution tiers and an aspect ratio derived from requested dimensions. Other models/providers and explicit custom overrides retain their behavior.
  • Browser startup: four launchers ask the supervisor to open the browser after the actual server reports readiness. Fixed timers are removed. Valid raw IPv6 hosts receive brackets, and an invalid optional browser URL warns without stopping the server. Missing/duplicate CLI values and browser requests without a server entrypoint fail clearly before spawning a child. Startup failure, browser opt-out, existing-server reopening, build repair, restart and exit-status behavior stay covered.
  • Roleplay TTS: durable main text is published before unrelated agent activation calls when no rewriting agent is enabled. Enabled rewrites still hold speech until final saved text. Message/swipe ownership, errors, aborts and exactly-once readiness are preserved; the existing speaker/emotion extractor starts from that event.
  • English audio/startup guides and localized control help/errors are updated. #8029 tracks their translations. Earlier editor/preset translation issues #7975/#8024 were separately published and verified in #8028 on docs-i18n.

Validation

  • 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

Recorded evidence

Final candidate e49993e2a4025860add98afaa62857664af4475f, current staging base 93c37404c432193a8c342b20549ce900a12246b6:

  • Install and final integrated-head pnpm check passed, including localization, formatting, types and builds. One pre-existing HomeProfessorMariChat effect-dependency warning remains.
  • Full hosted Node runner at d9590ee6c: 973/973 passed; all eight required statuses and all ten platform checks also passed there. The final CLI-only repair requires fresh hosted results. Full local Node runner at d52386b5f: 969/969 passed. After the review follow-up, the changed startup/audio controls were rerun on 331fe2e6d. An outdated launcher source assertion failed initially; unchanged reproduction confirmed the stale pin, then an exact quoted-argument assertion and the runner's serial retry passed. Real Termux shell-block checks preserved arguments and exit codes 0/37 with browser opening enabled/disabled.
  • NanoBanana real-transport fixture reproduced pre-fix HTTP400 and passed after correction, with other-model/provider/custom-parameter controls. Ground truth: NanoGPT model, image API.
  • Compatible audio real-route/local-HTTP proof passed both contracts, cache/context reuse, model isolation, capability refusals, failed-request retries, byte limits and endpoint boundaries. Connection import/export and legacy-default controls passed. On the final integrated head, compatible audio, upstream Experience music, Roleplay readiness and streaming suites all passed again.
  • Roleplay readiness reproduced the activation wait and passed the original 11 real-runner timing/rewrite/error/abort/backpressure cases plus a new concurrent-turn macro persistence case. Streaming, command, variable-history and activation regressions also passed.
  • Startup passed delayed HTTP readiness, duplicate/restart/failed-start/opt-out fixtures and a real server-entrypoint health-at-open capture, plus launcher environment/existing-server/build-repair/restart/shutdown checks.
  • Focused Audio browser matrix at d9590ee6c: 9/9, including mobile computed-font guards, desktop Chromium/mobile Chromium/mobile WebKit, dark/light, persistence, invalid-save/source-switch recovery and Game capability gating. Initial selector failures were preserved/reproduced; only the test's combobox/switch selectors changed, with no skip, forced click or timeout increase.
  • Container build/run and health at d9590ee6c passed; production startup/reload against that container passed 3/3 across the browser targets.
  • UI smoke at d9590ee6c: 7/7 passed.
  • Local CodeRabbit initial review completed all 32 files with four minor findings: fixed the IPv6 startup regression and two boundary-test false positives. The mobile-font suggestion is a non-regression: the existing unlayered coarse-pointer CSS gives all three controls 17px, confirmed in mobile WebKit and guarded in E2E. A fresh review of 331fe2e6d completed all 32 files and found one substantive ordering issue: early readiness preceded macro-variable persistence. The fix commits macro variables before exposing readiness; a new real-runner test fails unchanged (0 instead of 1) and passes with the fix, including a concurrent next turn and preservation of its final counter value. The follow-up review of the two changed files completed with 0 findings. Current staging was then merged without conflicts; the feature patch has the identical stable patch ID before/after integration. Hosted Dottore then completed a full examination of d9590ee6c (59 model calls, 95 tools). Its two low findings were adjudicated: keep the documented Base-URL-relative endpoint contract, with a code-based reply; fix the malformed browser CLI form with a four-line no-entry guard. The new regression proves malformed/missing/option-only server arguments previously executed Node stdin and now fail before a child starts. Browser mode requires the script first; Node flags before the supervisor and non-browser Node forwarding are verified. All four launcher suites passed. A local follow-up found the option-only variant, which is fixed; the final review of the two changed files completed with 0 findings. Final-head hosted Dottore review remains a merge gate.

Manual verification notes and claim boundaries

Browser interactions and screenshots were visually inspected. Manually verify the Audio editor/Game setup with your own backend and browser opening on physical Windows10/Firefox and Termux devices. External provider generations, physical-device behavior and live Infermatic compatibility are not claimed. Its music contract was unverified in the report; the two supported contracts and unsupported asynchronous/remote-result APIs are documented.

Risk areas are provider shaping, additive connection storage, agent scheduling and launcher lifecycle. Positive and negative controls cover current/legacy audio, native ElevenLabs, other image models/providers, writers/non-writers, failures/aborts and shell exit codes. Storage layout is unchanged; no storage-format bump is required.

Docs and release impact

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

Updated docs/media/tts-setup.md, docs/CONFIGURATION.md, docs/TROUBLESHOOTING.md; translation follow-up #8029. Reviewed README, Android README, CONTRIBUTING, Configuration, Troubleshooting and FAQ together. No version, dependency or CHANGELOG changes.

UI evidence (if applicable)

Verified gallery: 12 dark/light desktop/mobile editor captures. Published bytes match the local artifact. Current-state screenshots only; no before-state capture is claimed.


🔄 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/8027 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/assigned-issue-sweep-20261022` --- ### 📝 Commits (7) - [`0d3dfba`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0d3dfba8b00d5c4cd6904d8dc794c17f6fdc81c6) fix(images): use NanoBanana 2.1 resolution tiers on NanoGPT - [`d52386b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d52386b5faaea8e442cf78c7274ae6b7af7ed238) fix: complete assigned audio, roleplay and startup issue sweep - [`331fe2e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/331fe2e6df6f274440d531641f9a111210ff9deb) fix: preserve IPv6 startup and strengthen review regression controls - [`e2b7ae3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e2b7ae3feaa4068227a34ca0fe7444116dfd5f96) fix: persist turn variables before early speech readiness - [`d9590ee`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d9590ee6c37bd0ccd0b62509b9ea577f07686944) Merge remote-tracking branch 'origin/staging' into fix/assigned-issue-sweep-20261022 - [`df13d88`](https://github.com/Pasta-Devs/Marinara-Engine/commit/df13d88b2beddc277bb3c89328e584669bc20bca) fix: reject browser launch requests without a server entrypoint - [`e49993e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e49993e2a4025860add98afaa62857664af4475f) fix: require the server entry first for browser startup ### 📊 Changes **32 files changed** (+1828 additions, -118 deletions) <details> <summary>View changed files</summary> 📝 `docs/CONFIGURATION.md` (+1 -1) 📝 `docs/TROUBLESHOOTING.md` (+4 -0) 📝 `docs/media/tts-setup.md` (+17 -0) ➕ `e2e/compatible-game-audio.e2e.ts` (+242 -0) 📝 `packages/client/src/components/connections/ConnectionEditor.tsx` (+96 -9) 📝 `packages/client/src/components/game/GameSetupWizard.tsx` (+6 -9) 📝 `packages/client/src/components/game/GameSurface.tsx` (+10 -6) 📝 `packages/client/src/hooks/use-connections.ts` (+3 -0) 📝 `packages/client/src/lib/connection-transfer.ts` (+21 -0) 📝 `packages/client/src/localization/locales/en.json` (+10 -0) 📝 `packages/server/src/db/schema/connections.ts` (+3 -0) 📝 `packages/server/src/index.ts` (+7 -0) 📝 `packages/server/src/routes/generate.routes.ts` (+28 -26) 📝 `packages/server/src/routes/tts.routes.ts` (+100 -41) ➕ `packages/server/src/services/game/compatible-audio.ts` (+64 -0) 📝 `packages/server/src/services/image/image-generation.ts` (+35 -5) 📝 `packages/server/src/services/storage/connections.storage.ts` (+10 -0) 📝 `packages/shared/src/schemas/connection.schema.ts` (+14 -0) 📝 `packages/shared/src/types/connection.ts` (+28 -2) ➕ `scripts/regressions/audio-connection-transfer.regression.ts` (+74 -0) _...and 12 more files_ </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote `staging` or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #7967 Closes #8022 Closes #8023 Closes #8026 Owner: @SpicyMarinara, assisted by Codex. ## Why this change Game music/SFX was restricted to ElevenLabs, NanoGPT rejected NanoBanana 2.1 avatar sizes, launcher timers could open the browser before startup completed, and unrelated agent activation calls could delay Roleplay speech preparation. This maintainer-assigned sweep leaves existing contributor PRs and their dependent translation issues untouched. ## What changed - **Compatible Game audio:** the existing OpenAI-compatible Audio source can explicitly enable music/SFX and configure relative endpoint paths. Choose prompt JSON returning MP3 bytes or the ACE-Step-compatible Chat Completions inline-audio contract. Both use the connection's model and credentials. Game setup/playback honor configured capabilities, context tracks retain once-per-area/tier reuse, and requests/cache/retries/audio bytes are validated. Settings survive save/reopen, duplication and safe export/import. Invalid hidden drafts cannot block switching sources. No provider entry is added. - **NanoBanana 2.1:** NanoGPT receives supported `1k`/`2k` resolution tiers and an aspect ratio derived from requested dimensions. Other models/providers and explicit custom overrides retain their behavior. - **Browser startup:** four launchers ask the supervisor to open the browser after the actual server reports readiness. Fixed timers are removed. Valid raw IPv6 hosts receive brackets, and an invalid optional browser URL warns without stopping the server. Missing/duplicate CLI values and browser requests without a server entrypoint fail clearly before spawning a child. Startup failure, browser opt-out, existing-server reopening, build repair, restart and exit-status behavior stay covered. - **Roleplay TTS:** durable main text is published before unrelated agent activation calls when no rewriting agent is enabled. Enabled rewrites still hold speech until final saved text. Message/swipe ownership, errors, aborts and exactly-once readiness are preserved; the existing speaker/emotion extractor starts from that event. - English audio/startup guides and localized control help/errors are updated. #8029 tracks their translations. Earlier editor/preset translation issues #7975/#8024 were separately published and verified in #8028 on `docs-i18n`. ## Validation - [ ] `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` ### Recorded evidence Final candidate `e49993e2a4025860add98afaa62857664af4475f`, current staging base `93c37404c432193a8c342b20549ce900a12246b6`: - Install and final integrated-head `pnpm check` passed, including localization, formatting, types and builds. One pre-existing HomeProfessorMariChat effect-dependency warning remains. - Full hosted Node runner at `d9590ee6c`: **973/973 passed**; all eight required statuses and all ten platform checks also passed there. The final CLI-only repair requires fresh hosted results. Full local Node runner at `d52386b5f`: **969/969 passed**. After the review follow-up, the changed startup/audio controls were rerun on `331fe2e6d`. An outdated launcher source assertion failed initially; unchanged reproduction confirmed the stale pin, then an exact quoted-argument assertion and the runner's serial retry passed. Real Termux shell-block checks preserved arguments and exit codes 0/37 with browser opening enabled/disabled. - NanoBanana real-transport fixture reproduced pre-fix HTTP400 and passed after correction, with other-model/provider/custom-parameter controls. Ground truth: [NanoGPT model](https://nano-gpt.com/models/image/google/gemini-nano-banana-2.1), [image API](https://docs.nano-gpt.com/api-reference/endpoint/image-generation-openai). - Compatible audio real-route/local-HTTP proof passed both contracts, cache/context reuse, model isolation, capability refusals, failed-request retries, byte limits and endpoint boundaries. Connection import/export and legacy-default controls passed. On the final integrated head, compatible audio, upstream Experience music, Roleplay readiness and streaming suites all passed again. - Roleplay readiness reproduced the activation wait and passed the original **11 real-runner timing/rewrite/error/abort/backpressure cases** plus a new concurrent-turn macro persistence case. Streaming, command, variable-history and activation regressions also passed. - Startup passed delayed HTTP readiness, duplicate/restart/failed-start/opt-out fixtures and a real server-entrypoint health-at-open capture, plus launcher environment/existing-server/build-repair/restart/shutdown checks. - Focused Audio browser matrix at `d9590ee6c`: **9/9**, including mobile computed-font guards, desktop Chromium/mobile Chromium/mobile WebKit, dark/light, persistence, invalid-save/source-switch recovery and Game capability gating. Initial selector failures were preserved/reproduced; only the test's combobox/switch selectors changed, with no skip, forced click or timeout increase. - Container build/run and health at `d9590ee6c` passed; production startup/reload against that container passed **3/3** across the browser targets. - UI smoke at `d9590ee6c`: **7/7 passed**. - Local CodeRabbit initial review completed all 32 files with four minor findings: fixed the IPv6 startup regression and two boundary-test false positives. The mobile-font suggestion is a non-regression: the existing unlayered coarse-pointer CSS gives all three controls 17px, confirmed in mobile WebKit and guarded in E2E. A fresh review of `331fe2e6d` completed all 32 files and found one substantive ordering issue: early readiness preceded macro-variable persistence. The fix commits macro variables before exposing readiness; a new real-runner test fails unchanged (`0` instead of `1`) and passes with the fix, including a concurrent next turn and preservation of its final counter value. The follow-up review of the two changed files completed with **0 findings**. Current staging was then merged without conflicts; the feature patch has the identical stable patch ID before/after integration. Hosted Dottore then completed a full examination of `d9590ee6c` (59 model calls, 95 tools). Its two low findings were adjudicated: keep the documented Base-URL-relative endpoint contract, with a code-based reply; fix the malformed browser CLI form with a four-line no-entry guard. The new regression proves malformed/missing/option-only server arguments previously executed Node stdin and now fail before a child starts. Browser mode requires the script first; Node flags before the supervisor and non-browser Node forwarding are verified. All four launcher suites passed. A local follow-up found the option-only variant, which is fixed; the final review of the two changed files completed with **0 findings**. Final-head hosted Dottore review remains a merge gate. ### Manual verification notes and claim boundaries Browser interactions and screenshots were visually inspected. Manually verify the Audio editor/Game setup with your own backend and browser opening on physical Windows10/Firefox and Termux devices. External provider generations, physical-device behavior and live Infermatic compatibility are not claimed. Its music contract was unverified in the report; the two supported contracts and unsupported asynchronous/remote-result APIs are documented. Risk areas are provider shaping, additive connection storage, agent scheduling and launcher lifecycle. Positive and negative controls cover current/legacy audio, native ElevenLabs, other image models/providers, writers/non-writers, failures/aborts and shell exit codes. Storage layout is unchanged; no storage-format bump is required. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on `docs-i18n` updated to match, or a follow-up issue opened - [ ] Version/release files updated (only if this PR includes a version bump) Updated `docs/media/tts-setup.md`, `docs/CONFIGURATION.md`, `docs/TROUBLESHOOTING.md`; translation follow-up #8029. Reviewed README, Android README, CONTRIBUTING, Configuration, Troubleshooting and FAQ together. No version, dependency or CHANGELOG changes. ## UI evidence (if applicable) [Verified gallery: 12 dark/light desktop/mobile editor captures](https://gist.githack.com/SpicyMarinara/01946ffba901d15a9f38dc72a80f1506/raw/50f0dd96af7e03c1945e281a876774b8a25ce3eb/marinara-compatible-game-audio.html). Published bytes match the local artifact. Current-state screenshots only; no before-state capture is claimed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:10:03 +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#8061
No description provided.