Repository navigation
test(producer): the injector budget test no longer leaves a no-op injector for later tests - #7384
Merged
Merged
Conversation
…ector for later tests
Contributor
Contributor
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 0 nits · head 3939a725
Scope
- Read both files. The seam has the same shape as
distributedCaptureSessionDependencies. Thetry/finallyrestore puts the real injector back before the next test. - The new test asserts
nullfor anulllookup. That holds: the realcreateVideoFrameInjectorreturnsnullfirst thing (videoFrameInjector.ts:180). On main, the module mock is only undone inafterAll, so the test gets the no-op and fails. The "fails without the fix" line holds. renderChunk.verifyInWorker.test.tsusesvi.mockon engine. It spreads the original module and leavescreateVideoFrameInjectoralone.vi.mockis hoisted, so the object-captured binding sees the same value as before.- CI at this head: CI, Comments, CodeQL, PR captures and Player perf pass. regression and Windows render were still running when I posted.
- No prior reviews.
— genesis-v2
miguel-heygen
enabled auto-merge
November 7, 2026 22:49
Merged
4 of 6 tasks
Merged
3 of 5 tasks
SanHsien
added a commit
to SanHsien/hyperframes
that referenced
this pull request
Nov 9, 2026
Port the adopted upstream fixes from f5bde95 to the current upstream tip: heygen-com#7375 multipart cloud upload, heygen-com#7382 minParallelChunks, heygen-com#7349 HLG header SEI, heygen-com#7369 skip unmounted compositions in lint/check, heygen-com#7381 filesystem-path media in the cloud archive, heygen-com#7383 Safari cut-point pre-roll revert, heygen-com#7373 clock steering between audio time updates, heygen-com#7384 injector test isolation, heygen-com#7378 preview seek retention, heygen-com#7390 virtual timer schedule per worker, heygen-com#7394 CDN script failure naming, heygen-com#7395 menu row radius, heygen-com#7119 decode timeout caller test, heygen-com#7397 authored tween order, heygen-com#7402 capture page clip loading, heygen-com#7412 muted video audio track at cuts, heygen-com#6150 template root variable test, heygen-com#7442 held tail seek once. Deliberate local differences: heygen-com#7067's audio-start hold is not carried into clock.ts, mountedSources comes from heygen-com#6827 as a helper only, cloud/_gen/types.ts omits the image-request types the fork does not generate, and the lint symlink test skips through symlinkOrSkip where the account cannot create links. Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
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
chunkFrames.injectorBudget.test.tsno longer leaves a no-op video frame injector behind for the tests that run after it in the same bun process.Why
The test replaced the whole
@hyperframes/enginemodule withmock.module, swappingcreateVideoFrameInjectorforasync () => {}, and then importedchunkFrames.jsunder that mock. ItsafterAllput the engine module back, butchunkFrames.jswas already loaded and kept the no-op. Run in one process withbun test src/services/distributed, every later chunk render drew no video frames:So renderChunk's "a video the chunk does not show" test failed with two different chunk hashes. CI runs each bun test file in its own process (
scripts/run-test-lane.mjs), so CI never hit this, and the renderer itself is unchanged in behaviour. Only a hand-run of the folder did.How
chunkFrames.tsbuilds injectors through a small mutablechunkFrameInjectorDependenciesobject, the same seamrenderChunk.tsalready has (distributedCaptureSessionDependencies). The budget test swaps it insidetry/finally, so the real injector is back before the next test. No module mock.Tests
chunkFrames.injectorBudget.test.ts: "leaves the engine's own injector in place for every later test". It runs after the budget test and checks that the factory builds the engine's real injector, which returns null for an empty lookup.fails without the fix: on main the new test gets
[AsyncFunction](the leftover no-op) instead of null. RunningchunkFrames.injectorBudget.test.tsandrenderChunk.test.tsin one process fails renderChunk's "a video the chunk does not show" 3 of 3 on main; with this change it passes 2 of 2.Break checks:
finallyrestore and the new test fails.createVideoFrameInjectordirectly and the budget test fails.Run on Linux:
chunkFrames.test.tsandrenderChunk.test.ts, each on their own.services/distributedfolder in one process: renderChunk now passes. The three files there that use vitest'svi.mock(plan.masterBus,renderChunk.stall,renderChunk.verifyInWorker) still report load errors under plainbun test, the same as on main; CI runs them under vitest.bun run typecheckand the comment ratchet.Size
About 30 lines, on its own: a test-isolation fix in one file and its seam. No open PR in this repo touches these files.