mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7896] [MERGED] fix(tts): end a test clip only after it has loaded (WebKit stall at tts-mobile-playback:124) #7992
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7992
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7896
Author: @SpicyMarinara
Created: 10/20/2026
Status: ✅ Merged
Merged: 10/20/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/webkit-tts-second-ended📝 Commits (1)
2dfa250fix(tts): end a test clip only after it has loaded📊 Changes
1 file changed (+13 additions, -2 deletions)
View changed files
📝
e2e/tts-mobile-playback.e2e.ts(+13 -2)📄 Description
Linked issue
No issue. This fixes a release-matrix stall from run 39457323028 (mobile-webkit shard 18/18,
17796b6c0).Why this change
e2e/tts-mobile-playback.e2e.ts:124hung on the second syntheticended, with nothing logged until the 60 s test timeout. Both synthesis responses had already returned 200, and every earlier assertion had passed. The 60 s teardown then hid the original wait behind a closed-contextDELETEerror.Cause: the test's
finish()fired a syntheticendedat a clip whose blob was still loading (readyState0,networkStateLOADING). The spy stubsplay(), so nothing waits for the clip to load, and the second clip was ended about 4–10 ms after itssrcwas set. Real playback can't do this, becauseendedonly fires after the media has loaded and played. On thatended,TTSServicecleans up the reused<audio>element by pausing it, removingsrc, callingload()and revoking the URL. Linux WebKit's GStreamer backend can freeze the page while it tears down a load that is still in progress. The secondpage.evaluatetherefore never returns. Chromium and macOS WebKit don't stall here.This is a test race against a Linux-WebKit native stall, not an Engine logic bug. The Engine's completion handlers settle and clear their listeners correctly. Dropping only
load()doesn't help: the stall moves to the nextsrc =(see the numbers below).What changed
e2e/tts-mobile-playback.e2e.ts,finish()now waits for the current clip'sloadedmetadata(orerror) before dispatchingended. It waits for the right condition, not a longer timeout. All assertions, gates and counts are unchanged.Validation
Repro numbers:
TTSService's clip sequence on one reused element, Linux WebKit (officialplaywright:v1.63.0-nobleimage), syntheticendedright after thesrcchange, 60 roundspause → removeAttribute(src) → load()withreadyState=0,networkState=2loadedmetadatafirst)load()removed from cleanup (rejected alternative)audio.src = …--repeat-each=20 --workers=2pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
tts-mobile-playback.e2e.tspasses.pnpm check, and a long full-spec Linux WebKit repeat run.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
Not applicable. This is a test-only change.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.