Repository navigation
test(engine): the URL-read concurrency test passes on machines with 32 or more cores - #7544
Merged
Merged
Conversation
…2 or more cores The test checks that clips read from a URL are not held to the CPU-sized prepare limit. On 32 or more cores that limit reaches the URL limit of 16, so the test could not pass there. It now fixes the core count at 8.
Contributor
There was a problem hiding this comment.
Requesting changes at 804302b3 for one reason only: the body has no fails without the fix: line. This lane requires that line on every fix PR, and that includes test-environment fixes.
The evidence already exists in the Test plan. Add it as a line in this form:
fails without the fix: packages/engine/src/services/audioMixer.urlRead.test.ts › reads many clips of one URL at once, since the wait is on the network and not the CPU (on main, on 32+ cores: expected 16 to be greater than 16)
The code itself is fine, and I'd approve it once the line is in:
audioMixer.ts:213sets the local prepare limit fromcpus().lengthwhen the module loads.vi.mockis hoisted above that import, so the mixer sees 8 cores and gets a local limit of 4. The assertion on line 289 calls the same mockedcpus(), so both sides agree, and the fixed URL limit of 16 clears 4 on any machine.- The other
cpus()calls the mixer can reach (videoFrameExtractorandparallelCoordinator) read only.length, so the{}entries are safe. - This matches the existing mock in
audioMixer.order.test.ts. - CI and every other check on this head pass.
Contributor
There was a problem hiding this comment.
Approve at 804302b3. The body now names the failing test on a fails without the fix: line: audioMixer.urlRead.test.ts › reads many clips of one URL at once…, which fails on main on 32+ cores with "expected 16 to be greater than 16". The head is unchanged, so my earlier code review still holds and CI is green. Nothing blocks this.
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 11, 2026
Merged
3 of 4 tasks
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
audioMixer.urlRead.test.ts›reads many clips of one URL at once, since the wait is on the network and not the CPUnow passes on machines with 32 or more cores.Why
The test checks that clips read from a URL are not held to the CPU-sized prepare limit. The mixer has two limits:
max(2, floor(cores / 2)).The test asserts that the peak number of open reads is above the local limit. On 32 cores the local limit is also 16, and the URL limit holds the peak at exactly 16, so the test failed on
main(expected 16 to be greater than 16). It failed the same way on any box with more cores.Related work
None.
How
The test file pins the core count at 8 by mocking
cpusfromnode:os, asaudioMixer.order.test.tsalready does. The local limit is then 4, whatever the machine, and the assertion checks the same claim everywhere.Test plan
fails without the fix:
reads many clips of one URL at once, since the wait is on the network and not the CPU(audioMixer.urlRead.test.ts) fails onmainon a 32-core box withexpected 16 to be greater than 16, and passes with this change.mainfails this test: 3 runs in a row, 5 of 5 pass each time.Size
8 lines, on purpose: this is a one-test environment fix. The sound PR it was found on has already merged, and none of my open PRs touches this file.