Skip to content

test(engine): pin audio fallback gain and retries - #7083

Open
CreedTech wants to merge 2 commits into
heygen-com:mainfrom
CreedTech:test/audio-fallback-review
Open

CreedTech wants to merge 2 commits into
heygen-com:mainfrom
CreedTech:test/audio-fallback-review

Conversation

@CreedTech

Copy link
Copy Markdown
Contributor

What

Strengthen audio fallback regression coverage and retain the explanation for timestamp renumbering.

Why

The one-track normalize fallback test cannot detect a missing volume=N compensation. It also does not cover the sequence where normalize=0 is unsupported and the following automated mix needs a static-volume retry.

Related work

Refs #5563 and #5563 (review), addressing all three nonblocking nits.

The suggested group-padding optimization is already merged in #6101. This PR does not duplicate it. Open #6612 changes boosted-volume handling; these cases use unity/sub-unity gain and test fallback graph selection instead.

How

Use two delayed/overlapping tracks and parameterize the fallback test with and without automation. Assert both padded input branches, the unnormalized two-input sum, compensation gain of two, and retention of that graph after the static-volume retry. The automated case also checks that the degradation warning is surfaced. Restore the comment explaining why asetpts must sit between apad and atrim for delayed audio on FFmpeg 5-8.0.

Test plan

  • Workspace build: passed before package checks.
  • bun run --cwd packages/engine test src/services/audioMixer.test.ts: 87 passed.
  • Both deliberate mutations are rejected by the new coverage: removing the track-count gain compensation, and making the automation retry re-enable normalize=0. Restored the source and reran all 87 tests successfully.
  • Engine typecheck, oxlint and oxfmt: passed.
  • Comment citation and comment-share checks: passed on the committed diff.

These are graph and retry regression tests using the existing FFmpeg mock. No new real-FFmpeg performance or waveform measurements are claimed. No production behavior changes.

  • Unit tests added/updated
  • Manual testing performed: mutation checks
  • Documentation updated (if applicable): restored implementation comment
  • Comments follow CONTRIBUTING.md

Implementation and validation were assisted by Codex.

@CreedTech

Copy link
Copy Markdown
Contributor Author

@jrusso1020, could you review this follow-up to your feedback on #5563? It checks gain compensation for two tracks and the retry when both normalization and volume automation fail. All 87 mixer tests passed locally, and GitHub CI is green.

@github-actions

Copy link
Copy Markdown
Contributor

This PR has had no activity for 14 days, so it is marked stale and will close in 7 days. Push a commit or leave a comment to keep it open. A maintainer can add keep-open to exempt it.

@github-actions github-actions Bot added the stale label Nov 25, 2026
@CreedTech

Copy link
Copy Markdown
Contributor Author

@jrusso1020, this follow-up is still active. The branch was synced with main today at e870f301, and the new CI run is underway. Could you review the two audio fallback regression cases and add keep-open if it needs longer in the queue?

@github-actions github-actions Bot removed the stale label Nov 26, 2026

This branch has not been deployed

No deployments
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.

1 participant