refactor(producer): delete the dead audioExtractor duplicate - #3389
Open
vanceingalls wants to merge 2 commits into
Open
refactor(producer): delete the dead audioExtractor duplicate#3389vanceingalls wants to merge 2 commits into
vanceingalls wants to merge 2 commits into
Conversation
`packages/producer/src/services/audioExtractor.ts` defined its own
`parseAudioElements` and a `processAudio` that nothing calls. Every live
consumer — `audioMixer.ts` (a pure re-export), `renderMediaCollector.ts`, the
playback-rate parity fixture — imports these from `@hyperframes/engine`
instead, so the file was a second, silently diverging copy of an engine
decision.
That divergence was already a bug: PRINFRA-349's review flagged this file's
hand-rolled `startsWith("/")` source-path join as the same percent-encoded-CJK
failure fixed in the HDR probes, with no decode, no compiledDir and no Windows
`isAbsolute`. Engine's resolver has all three. Deleting the copy is the fix —
patching it would have kept a resolver nobody reaches.
`check-no-main-deletions.mjs` fails any branch that removes a file main has, by design — the guard has no blanket escape hatch, so an intended removal is a named, reviewable line. This adds that line with the reason.
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.
Follow-up flagged in the PRINFRA-349 reviews (#2759):
packages/producer/src/services/audioExtractor.tsresolved<audio>srcs with a hand-rolledstartsWith("/") && startsWith("http")join — no percent-decode, nocompiledDir, no WindowsisAbsolute— the same shape the HDR video and image probes were just fixed for. A CJK audio filename (音频1.mp3) served percent-encoded reproduces the same silent miss.Tracing it to fix it turned up the better answer: nothing calls this file. Its
processAudiohas no callers, and itsparseAudioElementsis shadowed everywhere that matters —audioMixer.tsis a pure re-export of the engine's, andrenderMediaCollector.tsplus the playback-rate parity fixture import from@hyperframes/enginedirectly. The engine resolver already has decode + compiledDir +isAbsolute.So the file was a second, silently diverging copy of an engine decision, and the CJK bug was one symptom of that. Deleting it fixes the symptom and removes the duplicate; patching it would have left a resolver nobody reaches.
Producer typecheck and the full producer suite pass with it gone.
🤖 Generated with Claude Code