startFfmpeg() currently registers an error listener that ignores the error, and AudioManager.play() sets the manager to playing immediately after creating the Discord audio resource.
Evidence:
src/ffmpeg.ts:52 spawns the process
src/ffmpeg.ts:54 swallows the child process error event
src/ffmpeg.ts:55 drains stderr without preserving diagnostics
Impact: when ffmpeg is missing, cannot execute, or fails before producing audio, callers can see a successful play() call and state === 'playing' while no audio is actually playable. The exported FfmpegProcessError is not used for this path.
Acceptance Criteria
ffmpeg startup errors are observable by callers instead of being swallowed.
AudioManager.play() does not leave the manager in playing when startup fails.
Include useful failure context, ideally using the existing FfmpegProcessError export.
Preserve a small stderr tail or equivalent diagnostic when ffmpeg exits early.
Add a focused test for a mocked child-process error event or early exit before playback is accepted.
## Description
`startFfmpeg()` currently registers an `error` listener that ignores the error, and `AudioManager.play()` sets the manager to `playing` immediately after creating the Discord audio resource.
Evidence:
- `src/ffmpeg.ts:52` spawns the process
- `src/ffmpeg.ts:54` swallows the child process `error` event
- `src/ffmpeg.ts:55` drains stderr without preserving diagnostics
- `src/audio-manager.ts:121` sets `playbackState = 'playing'`
Impact: when `ffmpeg` is missing, cannot execute, or fails before producing audio, callers can see a successful `play()` call and `state === 'playing'` while no audio is actually playable. The exported `FfmpegProcessError` is not used for this path.
## Acceptance Criteria
- `ffmpeg` startup errors are observable by callers instead of being swallowed.
- `AudioManager.play()` does not leave the manager in `playing` when startup fails.
- Include useful failure context, ideally using the existing `FfmpegProcessError` export.
- Preserve a small stderr tail or equivalent diagnostic when ffmpeg exits early.
- Add a focused test for a mocked child-process `error` event or early exit before playback is accepted.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
startFfmpeg()currently registers anerrorlistener that ignores the error, andAudioManager.play()sets the manager toplayingimmediately after creating the Discord audio resource.Evidence:
src/ffmpeg.ts:52spawns the processsrc/ffmpeg.ts:54swallows the child processerroreventsrc/ffmpeg.ts:55drains stderr without preserving diagnosticssrc/audio-manager.ts:121setsplaybackState = 'playing'Impact: when
ffmpegis missing, cannot execute, or fails before producing audio, callers can see a successfulplay()call andstate === 'playing'while no audio is actually playable. The exportedFfmpegProcessErroris not used for this path.Acceptance Criteria
ffmpegstartup errors are observable by callers instead of being swallowed.AudioManager.play()does not leave the manager inplayingwhen startup fails.FfmpegProcessErrorexport.errorevent or early exit before playback is accepted.