You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Edit-job lifecycle: inconsistent timeouts, no cancellation for analysis passes, and shutdown leaves .partial files #237
Long recordings are where agents use these tools most. Today some passes time out on legitimate inputs, a cancelled request can leave ffmpeg decoding for minutes to hours, and a server shutdown mid-edit leaves invalid .partial files behind. This is a follow-up to #81 (closed), which fixed the main runEditJob path only.
Evidence
src/tools/sampleFrames.ts:172: fps mode uses a fixed 5-minute timeout while decoding the whole input.
src/tools/speed.ts:39, src/tools/cutIdle.ts:83 and the pipeline size timeouts from the output duration, not the input that must be decoded (e.g. speed ×20 on a 2 h video).
No signal is passed for the transcribe whisper pass, the normalize measure passes, the denoise and cut_idle scans, the zoom analysis or the scene scan.
src/index.ts:170 calls process.exit(0) while a runEditJob (src/utils/jobs.ts) may be running, so its rmSync(partial) cleanup never runs. Repro left a 48-byte invalid out.partial.mp4.
Suggested approach
Use jobTimeoutMs(inputDurationSec) everywhere ffmpeg decodes the input.
Thread extra.signal through runCapture and runFfmpegBuffer.
Track active edit jobs in a registry; on shutdown abort them, await exit briefly and delete partials.
Done when
Every ffmpeg spawn site takes a signal and an input-scaled timeout (a lint-style test can assert this). A shutdown test with a running edit job leaves no .partial file.
Activity
test(entry): exercise the built stdio server in CI (#295)