Skip to content

Fail closed when compose ffmpeg times out with a partial mux - #121

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/compose-ffmpeg-timeout-2ccd
Sep 7, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/compose-ffmpeg-timeout-2ccd

Conversation

@jmjava

@jmjava jmjava commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

Composer._run_ffmpeg treated subprocess.TimeoutExpired as success when the output path already existed and had a non-zero size. A hung mux could leave a truncated recordings/<stem>.mp4; compose printed a warning and counted the segment as composed. Concat already raises on ffmpeg timeout.

This PR:

  • Always raises ComposeError on compose ffmpeg timeout.
  • Unlinks the incomplete output so later stages cannot treat a truncated mux as a finished recording.

Milestone: milestones/compose-ffmpeg-timeout.md. No clock / compile change.

Local gates

  • ruff check src/ tests/ — pass
  • pytest tests/ — 703 passed, 1 skipped
  • docgen benchmark — meets src/docgen/benchmark_data/baseline.json (no --update-baseline)
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 7, 2026 22:17
Composer._run_ffmpeg treated TimeoutExpired as success when the
output path already existed. A hung mux could leave a truncated
recording that compose counted as done. Always raise ComposeError
and unlink the incomplete file, matching concat's timeout contract.

Co-authored-by: jmjava <jmjava@gmail.com>
ruff, pytest (703 passed, 1 skipped), and docgen benchmark all green.

Co-authored-by: jmjava <jmjava@gmail.com>
@jmjava
jmjava marked this pull request as ready for review September 7, 2026 22:18
@cursor
cursor Bot merged commit 37884fc into main Sep 7, 2026
6 checks passed
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.

2 participants