Problem
Local transcription starts FFmpeg and Whisper subprocesses, but timeout, cancellation, and application shutdown do not consistently own the full process tree. A parent can exit while descendants keep running, hold files, or consume GPU and CPU resources. A job can also reach a terminal state before its processes and output streams are finished.
Evidence
- electron/whisperService.cjs:36-80 and electron/whisperService.cjs:370-427 start and stop local transcription processes without one owner for the full tree.
- electron/main.cjs:1742-1749 and electron/main.cjs:2097-2117 handle cancellation and shutdown without waiting for every descendant to exit.
Proposed work
Create one lifecycle owner for each local transcription job. It should track the FFmpeg and Whisper process trees, accept timeout and cancellation signals, stop descendants on every supported platform, drain output, and await exit before publishing the final job state.
Acceptance criteria
- Start with a failing integration test that leaves a descendant alive after its direct parent is stopped.
- Timeout, explicit cancellation, and application shutdown terminate the full process tree.
- Shutdown waits for process exit and output cleanup within a bounded period.
- A job is marked complete, failed, or cancelled only after its owned processes are reaped.
- Tests cover Windows process-tree behavior.
Non-goals
- Changing transcription models or media formats.
- Redesigning the transcription UI.
Problem
Local transcription starts FFmpeg and Whisper subprocesses, but timeout, cancellation, and application shutdown do not consistently own the full process tree. A parent can exit while descendants keep running, hold files, or consume GPU and CPU resources. A job can also reach a terminal state before its processes and output streams are finished.
Evidence
Proposed work
Create one lifecycle owner for each local transcription job. It should track the FFmpeg and Whisper process trees, accept timeout and cancellation signals, stop descendants on every supported platform, drain output, and await exit before publishing the final job state.
Acceptance criteria
Non-goals