[PR #8223] [MERGED] Fix music model selection and add test-track playback #8194

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

📋 Pull Request Information

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

Base: staging ← Head: fix/elevenlabs-music-model-option


📝 Commits (9)

  • 57d04d4 fix: offer Eleven Music v2.5 in the music model selector
  • 86a1e13 Add explicit music connection sample playback and safe provider errors
  • a78d207 Merge remote-tracking branch 'origin/staging' into fix/elevenlabs-music-model-option
  • 8b5116d Use themed sample controls and redact overlapping private URLs
  • d521938 Start sample playback before asserting decoded audio readiness
  • 3c44c6e Merge remote-tracking branch 'origin/staging' into fix/elevenlabs-music-model-option
  • 7ffb88f Address music test diagnostics and bounded sample storage
  • 13e53aa Serialize changed music tests without reusing stale requests
  • ce793ef Keep music test request kinds distinct

📊 Changes

8 files changed (+747 additions, -29 deletions)

View changed files

📝 e2e/compatible-game-audio.e2e.ts (+216 -1)
📝 packages/client/src/components/connections/ConnectionEditor.tsx (+127 -8)
📝 packages/client/src/localization/locales/en.json (+13 -1)
📝 packages/server/src/routes/audio.routes.ts (+16 -0)
📝 packages/server/src/services/audio/generative-audio-providers.ts (+98 -4)
📝 packages/server/src/services/audio/generative-audio.service.ts (+42 -12)
📝 scripts/regressions/generative-audio-connections.regression.ts (+176 -2)
📝 scripts/regressions/generative-audio-providers.regression.ts (+59 -1)

📄 Description

Linked issue

Closes #8222

Why this change

The ElevenLabs music-model dropdown is empty although the Engine already defaults to music_v2_5. The maintainer also requested a way to generate and hear a test track. Provider rejections currently lose their useful reason.

What changed

  • Offer localized Eleven Music v2.5 only for ElevenLabs, preserving saved/manual models, other sources and current defaults.
  • Add Generate test music for the saved selected connection: one explicit 10-second instrumental request, provider-credit guidance, native playback and safe specific errors. Some services may return a longer track.
  • Disable duplicate clicks and discard stale client waits after edits or leaving. Provider processing/charges may continue; paid submissions are never automatically retried.
  • Bound test storage to one generated sample per server-owned connection directory. Each later test really generates and gets a fresh URL; identical in-flight requests coalesce, changed requests serialize their publication, and other contexts/non-generated replacements remain intact.
  • Preserve legacy error detail while adding actual provider status, an allowlisted code and a recognized sanitized reason. Accepted error JSON is bounded to 16KiB; exact secrets and URLs are redacted before the 300-character display cap. Non-HTTP failures use localized host-defined classes rather than raw detail.

Validation

Validation, source hashes, review dispositions, screenshots and negative/replay records.

Final canonical pnpm check and the maintained provider/real-route suites passed. Browser proof covers 12 desktop/mobile light/dark selector/sample cases and seven unchanged shell smoke cases on checkpoint 7ffb88f53; the final client, English catalog and browser-spec bytes are identical. Later server-only request-identity changes have focused concurrency/credential/duration/kind controls and actual earlier-source counterfactual failures. The two pre-existing compatible-audio save/reopen cases also passed in the original feature validation.

The substantive repair review found one valid local CodeRabbit minor, now fixed; its two-file correction review completed with zero findings at 13e53aa441. The final one-item kind hash correction and matching regression follow that captured review and are independently checked; they are not relabeled as an exact-final-head local review. Earlier findings and source-backed declined minor suggestions remain in the public packet. The actual final-head hosted Dottore verdict, required CI and unresolved threads remain separate merge gates.

  • 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

  • Manually select Eleven Music v2.5, save/reopen, and verify manual IDs and source switching remain intact.
  • Manually enable Music generation, click Generate test music after reading the provider-credit notice, and play the result.
  • Manually verify provider/non-HTTP errors show a safe diagnosis and editing or leaving discards an in-flight result.

Risk and proof boundaries

The sample uses the existing selected-connection generation route and MP3 asset playback. Its context is reserved for connection testing; normal Game/Roleplay/package cache semantics are preserved. The actual route passes no live abort signal to the shared service, so client cancellation is a stale-result fence rather than a promise to stop server/provider work.

The first hosted pnpm attempt timed out while Ubuntu apt installed Chromium dependencies before browser assertions; one unchanged failed-job retry passed. The newly added held-request fixture initially failed because Fastify injection chains had not been started; an unchanged replay and direct Fastify probe isolate that harness error. Correct startup retains all assertions and existing deadlines. Earlier WebKit metadata-preload and old-source HMR isolation records are preserved without weakening product checks.

Browser playback uses a bundled 97-second MP3 fixture while the intercepted request asserts 10 seconds. These are emulated-browser proofs, not physical-device validation. Separate maintainer-authorized live validation exercised the byte-identical ElevenLabs request-construction block on the earlier 8b5116df7 candidate, with two decoded music successes and one sanitized ToS rejection. Later diagnostics/storage repairs were fixture-tested; no further paid call or key use occurred in this lane.

Docs and release impact

No defaults, dependencies, release metadata or changelog change. UI copy uses canonical English keys. The official Music API lists music_v2_5; the existing provider request format remains unchanged.

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

UI evidence

The public packet includes both themes on desktop Chromium, mobile Chromium and mobile WebKit, old-source missing-button/model controls, native playback, safe rejection and viewport-fit screenshots. Human verification boxes remain unchecked.


🔄 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/8223 **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/elevenlabs-music-model-option` --- ### 📝 Commits (9) - [`57d04d4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/57d04d4decdff387a63da1d769861a4961d7a3ee) fix: offer Eleven Music v2.5 in the music model selector - [`86a1e13`](https://github.com/Pasta-Devs/Marinara-Engine/commit/86a1e13a6f6f1ecc3a082d37780102b8e65c32e7) Add explicit music connection sample playback and safe provider errors - [`a78d207`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a78d2079649d620ed483ab25a510b603e040c9ae) Merge remote-tracking branch 'origin/staging' into fix/elevenlabs-music-model-option - [`8b5116d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8b5116df7ba79f54e2467a63fc576d5f001763e3) Use themed sample controls and redact overlapping private URLs - [`d521938`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d521938a5e88a00b7b962e8e6538aa67824aabd9) Start sample playback before asserting decoded audio readiness - [`3c44c6e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3c44c6e8ba42f5f4a0551781c0c68c202e90a431) Merge remote-tracking branch 'origin/staging' into fix/elevenlabs-music-model-option - [`7ffb88f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7ffb88f53deaed6ba1bf23423f67f13997084250) Address music test diagnostics and bounded sample storage - [`13e53aa`](https://github.com/Pasta-Devs/Marinara-Engine/commit/13e53aa441f1bec71d1b2fd862b9e43ccc3fea00) Serialize changed music tests without reusing stale requests - [`ce793ef`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ce793ef7772a1da708ad7ac5fa11aaa05d7b9564) Keep music test request kinds distinct ### 📊 Changes **8 files changed** (+747 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `e2e/compatible-game-audio.e2e.ts` (+216 -1) 📝 `packages/client/src/components/connections/ConnectionEditor.tsx` (+127 -8) 📝 `packages/client/src/localization/locales/en.json` (+13 -1) 📝 `packages/server/src/routes/audio.routes.ts` (+16 -0) 📝 `packages/server/src/services/audio/generative-audio-providers.ts` (+98 -4) 📝 `packages/server/src/services/audio/generative-audio.service.ts` (+42 -12) 📝 `scripts/regressions/generative-audio-connections.regression.ts` (+176 -2) 📝 `scripts/regressions/generative-audio-providers.regression.ts` (+59 -1) </details> ### 📄 Description ## Linked issue Closes #8222 ## Why this change The ElevenLabs music-model dropdown is empty although the Engine already defaults to `music_v2_5`. The maintainer also requested a way to generate and hear a test track. Provider rejections currently lose their useful reason. ## What changed - Offer localized Eleven Music v2.5 only for ElevenLabs, preserving saved/manual models, other sources and current defaults. - Add Generate test music for the saved selected connection: one explicit 10-second instrumental request, provider-credit guidance, native playback and safe specific errors. Some services may return a longer track. - Disable duplicate clicks and discard stale client waits after edits or leaving. Provider processing/charges may continue; paid submissions are never automatically retried. - Bound test storage to one generated sample per server-owned connection directory. Each later test really generates and gets a fresh URL; identical in-flight requests coalesce, changed requests serialize their publication, and other contexts/non-generated replacements remain intact. - Preserve legacy error detail while adding actual provider status, an allowlisted code and a recognized sanitized reason. Accepted error JSON is bounded to 16KiB; exact secrets and URLs are redacted before the 300-character display cap. Non-HTTP failures use localized host-defined classes rather than raw detail. ## Validation [Validation, source hashes, review dispositions, screenshots and negative/replay records](https://gist.github.com/SpicyMarinara/bb97ea70684dd4eca2d51bfcc0d71622). Final canonical `pnpm check` and the maintained provider/real-route suites passed. Browser proof covers 12 desktop/mobile light/dark selector/sample cases and seven unchanged shell smoke cases on checkpoint `7ffb88f53`; the final client, English catalog and browser-spec bytes are identical. Later server-only request-identity changes have focused concurrency/credential/duration/kind controls and actual earlier-source counterfactual failures. The two pre-existing compatible-audio save/reopen cases also passed in the original feature validation. The substantive repair review found one valid local CodeRabbit minor, now fixed; its two-file correction review completed with zero findings at `13e53aa441`. The final one-item kind hash correction and matching regression follow that captured review and are independently checked; they are not relabeled as an exact-final-head local review. Earlier findings and source-backed declined minor suggestions remain in the public packet. The actual final-head hosted Dottore verdict, required CI and unresolved threads remain separate merge gates. - [ ] `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 - Manually select Eleven Music v2.5, save/reopen, and verify manual IDs and source switching remain intact. - Manually enable Music generation, click Generate test music after reading the provider-credit notice, and play the result. - Manually verify provider/non-HTTP errors show a safe diagnosis and editing or leaving discards an in-flight result. ## Risk and proof boundaries The sample uses the existing selected-connection generation route and MP3 asset playback. Its context is reserved for connection testing; normal Game/Roleplay/package cache semantics are preserved. The actual route passes no live abort signal to the shared service, so client cancellation is a stale-result fence rather than a promise to stop server/provider work. The first hosted pnpm attempt timed out while Ubuntu apt installed Chromium dependencies before browser assertions; one unchanged failed-job retry passed. The newly added held-request fixture initially failed because Fastify injection chains had not been started; an unchanged replay and direct Fastify probe isolate that harness error. Correct startup retains all assertions and existing deadlines. Earlier WebKit metadata-preload and old-source HMR isolation records are preserved without weakening product checks. Browser playback uses a bundled 97-second MP3 fixture while the intercepted request asserts 10 seconds. These are emulated-browser proofs, not physical-device validation. [Separate maintainer-authorized live validation](https://gist.github.com/SpicyMarinara/f20945cb1b0d55f2a206be067e095379) exercised the byte-identical ElevenLabs request-construction block on the earlier `8b5116df7` candidate, with two decoded music successes and one sanitized ToS rejection. Later diagnostics/storage repairs were fixture-tested; no further paid call or key use occurred in this lane. ## Docs and release impact No defaults, dependencies, release metadata or changelog change. UI copy uses canonical English keys. The [official Music API](https://elevenlabs.io/docs/api-reference/music/compose) lists `music_v2_5`; the existing provider request format remains unchanged. - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence The public packet includes both themes on desktop Chromium, mobile Chromium and mobile WebKit, old-source missing-button/model controls, native playback, safe rejection and viewport-fit screenshots. Human verification boxes remain unchecked. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-25 04:04:37 +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#8194
No description provided.