Repository navigation
fix(media): make transcode pool saturation test deterministic - #122279
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Contributor
Author
|
Merged via squash.
|
Contributor
Author
|
Post-merge manual full-gate note (informational): run 31537799228 targeted exact source head
|
This was referenced Aug 11, 2026
vincentkoc
added a commit
that referenced
this pull request
Aug 11, 2026
* origin/main: (1725 commits) fix(agents): preserve reply cleanup when cancellation throws (#122252) fix(ui): render disallowed link schemes as plain text (#122311) fix(test): isolate gateway helper env stubs (#122319) fix(ui): keep chat Markdown block rhythm consistent (#122289) test(cli): trim duplicate Hooks process cases (#122278) fix(ui): retain identity while agent roster loads fix(ui): preserve configured agent labels fix(plugins): keep startup convergence read-only (#122330) fix: preserve WebChat reply context after reloads (#122169) fix(ui): make DONE moves visibly reversible (#122303) fix(ui): keep inline-code punctuation attached (#122291) fix(google-meet): publish exports atomically (#122306) fix(channels): preserve failed agent run reactions (#122009) fix(ui): label patch file operations accurately (#122287) fix(windows): preserve Unicode LAN route aliases (#122263) test(media): synchronize transcode pool completion (#122279) fix(android): keep completed subagent activity visible for sixty seconds (#122089) fix(ui): humanize bare GitHub item links (#122285) refactor(qqbot): install plugin from Tencent package (#107295) chore: scope SQLite session lifecycle CI (#121917) ...
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Resolves a timing-dependent media test failure where the saturated playback transcode pool test could observe only two mocked
ffmpegcalls after releasing one mock. Releasingffmpegdoes not release pool capacity: output validation and cache persistence still have to settle first.Why This Change Was Made
The pool now retains its authoritative job promises instead of boolean occupancy markers. Test support can observe the same settlement boundary used by pool admission, while deferred mock-start signals preserve the exact two-job capacity and three-job scheduling assertions without wall-clock polling.
The wait is order-independent because the two initial transcodes legitimately race; it observes the next pool completion and then all remaining jobs rather than assuming the first mock finisher belongs to a particular source.
User Impact
No user-visible runtime behavior changes. CI no longer depends on output validation and cache persistence finishing inside Vitest's one-second polling window.
Evidence
ffmpegvalidation delay made the old test fail withexpected 3 calls, got 2; the repaired test passed under the identical delay.src/media/playback-transcode.test.ts: 27/27 passed.2f071c9371bdf7b7163660fc58361edc42db6154: https://github.com/openclaw/openclaw/actions/runs/31537040507Production LOC: +7/-4 (net +3) | Tests/test support: +31/-15
Root cause and owner:
resolvePlaybackTranscodeowns capacity through the complete transcode promise, but the test synchronized only on the inner mockedffmpegpromise. Recording the owner promise makes pool occupancy and test observation share one lifecycle fact.Provenance: the original saturation test and pool behavior were introduced together in #115987 (
4229e96e0ec3394ab9d154d09992d825c64d8685, authored and merged by @steipete on 2026-07-29). The timing gap became visible under loaded exact-head CI; no runtime regression was introduced by the Android PR whose gate exposed it.Best-fix verdict: best. Increasing the timeout, retrying the test, or weakening the third-call assertion would retain the wrong synchronization boundary. Automatically queueing saturated requests would change runtime behavior unnecessarily.
ClawSweeper is waived for this repair per the standing deployment request.