Skip to content

fix(producer): reject regression audio stream mismatches - #5297

Closed
user-github-me wants to merge 10 commits into
heygen-com:mainfrom
user-github-me:review/5228-muted-video-baseline
Closed

user-github-me wants to merge 10 commits into
heygen-com:mainfrom
user-github-me:review/5228-muted-video-baseline

Conversation

@user-github-me

@user-github-me user-github-me commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

A regression render can lose its audio track and still pass because the harness assigns correlation 1 when either side lacks audio. Require matching audio-stream presence before comparing envelopes. Both mismatch directions fail even with a zero correlation threshold; two silent renders still pass.

Preserve the reviewed silent pip-video-late-host baseline: 144 H.264 frames at 24 fps, six seconds, no audio stream. Its LFS content hash remains 7e29ebc1c3851394d7ca1abe2ef57d742b04f21911d4e1f72e5d7f7086d12ee5. The current-main integration retains the current integration-test classifications and refreshes their reachability fingerprint.

Validation: 46 harness/audio tests pass with their declared Bun/Vitest runners, including four real render audio-presence cases; five classification tests also pass. FFprobe and SHA-256 verification confirm that the exact reviewed silent baseline is retained. Producer rebuild/typecheck, classification and reachability checks, lint, formatting, normal commit hooks and both comment checks pass against the built current-main workspace.

Closed as a duplicate of #5228, which has the same tested commit and the earlier review history. Review and merging continue there, as requested in the review.

@jrusso1020

Copy link
Copy Markdown
Collaborator

Thanks for this, @user-github-me. This PR now has merge conflicts with main. Could you rebase it onto the latest main? Once it's conflict-free we'll review it and get it into the merge queue.

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for following through on this. Regenerating the pip-video-late-host snapshot was the missing piece. At 69a31a00, every regression shard passes with the stricter rule, so no other fixture has a one-sided audio track either.

The change itself is small and right: a one-sided audio stream now fails, two silent outputs still pass, and when both sides have audio the existing envelope and residual checks still run. The new test goes through runTestSuite, the same entry the regression runner uses, and the "rendered missing, snapshot present" case would have passed before this change, so it really guards the fix.

One optional nit: extractMonoPcm16 returns an empty result both when there is no audio stream and when ffmpeg fails to read it. A broken extraction would therefore be logged as rendered=missing. It still fails, so this only affects the message.

Housekeeping: #5228 is open with this exact same commit, and the earlier review lives there. Please close one of the two so review and the merge queue happen in one place.

Reviewed head 69a31a00. It merges cleanly with main, and CI is green.

Verdict: APPROVE
Reasoning: The fix is correct and covered by a test that fails without it, the stale baseline the earlier review flagged is regenerated, and all regression shards pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants