Skip to content

Fix pipeline correctness: quality mapping, stale VHS warnings, ffmpeg timeout, binary paths#18

Merged
jmjava merged 1 commit intomainfrom
cursor/pipeline-correctness-b171
Apr 14, 2026
Merged

Fix pipeline correctness: quality mapping, stale VHS warnings, ffmpeg timeout, binary paths#18
jmjava merged 1 commit intomainfrom
cursor/pipeline-correctness-b171

Conversation

@jmjava
Copy link
Copy Markdown
Owner

@jmjava jmjava commented Apr 14, 2026

Summary

Implements a focused pipeline-correctness pass covering:

What changed

1) Manim quality mapping + path resolution (#6)

  • Added robust quality parsing in ManimRunner:
    • Presets: 480p15, 720p30, 1080p60, 2160p60
    • Parsed custom forms like 1080p30, 1440p30, etc. via explicit --resolution + --frame_rate
  • Added clearer render logging that prints the effective quality configuration.
  • Updated compose Manim source lookup to search quality directories based on configured manim.quality (with fallbacks), including both:
    • animations/media/videos/scenes/<quality>/...
    • animations/media/videos/<quality>/...

2) Binary resolution for manim/vhs (#7)

  • Added src/docgen/binaries.py with shared binary resolution helper.
  • manim resolution now supports:
    • manim.manim_path from config
    • venv-local executable resolution (next to sys.executable)
    • PATH fallback
  • vhs resolution now supports:
    • vhs.vhs_path from config
    • common install locations (~/go/bin/vhs, /usr/local/bin/vhs, /snap/bin/vhs)
    • PATH fallback
  • Improved actionable error output with paths attempted and config hints.

3) Stale VHS warning in compose (#12)

  • Added stale source warning before composing VHS segments when enabled:
    • warns if terminal/*.tape is newer than terminal/rendered/*.mp4
  • Configurable via compose.warn_stale_vhs (default true).

4) Configurable ffmpeg timeout (#13)

  • Added config option compose.ffmpeg_timeout_sec (default 300).
  • Added CLI override: docgen compose --ffmpeg-timeout <seconds>.
  • Updated ffmpeg handling:
    • raises ComposeError for hard failures (missing ffmpeg, non-zero exit, timeout without output)
    • emits a warning when timeout occurs but an output file already exists.

5) Config/docs/init updates

  • Added new config accessors in Config:
    • manim_path, vhs_path, ffmpeg_timeout_sec, warn_stale_vhs
  • Updated docgen init generated config to include manim_path, vhs_path, and compose timeout/stale warning options.
  • Updated README with:
    • new compose CLI option
    • config snippet for quality/path/timeout/stale warning
    • explicit vhs -> compose guidance after tape edits

Tests

  • Added new tests:
    • tests/test_manim_runner.py
    • tests/test_compose.py
  • Extended config tests in tests/test_config.py.
  • Full unit test run:
    • python3 -m pytest tests -q --ignore=tests/e2e -> 81 passed
  • Lint:
    • python3 -m ruff check src tests -> All checks passed

Issue linkage

Closes #6
Closes #7
Closes #12
Closes #13

Open in Web Open in Cursor 

… paths

Co-authored-by: John Menke <jmjava@gmail.com>
@jmjava jmjava marked this pull request as ready for review April 14, 2026 03:07
@jmjava jmjava merged commit babc4bd into main Apr 14, 2026
7 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

2 participants