Repository navigation
Conversation
Register logs and temporary section files for cleanup as they are created. Reap started renderers when a later launch fails or a wait is interrupted, using process groups on POSIX and taskkill tree cleanup on Windows. Preserve the existing non-zero exit log tail and successful cached sections. Add regressions for launch failures, interruption, success and process-tree cleanup, including a real child that ignores SIGTERM. Closes blixvip#49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Closes #49.
Registers cleanup as each section's files, log handle and renderer are created. A failed launch or interrupted wait now closes the logs, removes temporary section HTML and frame caches, and stops and waits for started renderers. POSIX renderers use their own process group; Windows uses
taskkill /T /F, with a parent-process kill fallback.The existing non-zero exit message still includes the log tail. Successfully rendered and cached sections remain available for muxing and reuse.
How did you test it?
Tested on macOS with Python 3.13.5 and Node.js 25.1.0.
python -m unittest discoverpasses — 98 tests. The new launch-failure and interruption regressions fail against the original implementation.python -m easyedit.doctor --jsonreports a ready machine.render()and muxing: a four-second synthetic fixture produced two sections and a 1920×1080, 24 fps MP4 with audio. A second run reused both cached sections. Inputs used local system fonts, a test pattern and silent audio; no movie download or LLM stage was run.The unit tests cover first and later launch failures,
KeyboardInterruptduring a wait, non-zero exit log preservation, successful section retention, mocked Windows tree cleanup and a real POSIX child that ignores SIGTERM.An additional real-renderer check injected a second-launch failure after Chrome started. The started Node process was reaped, the observed Chrome/FFmpeg descendants stopped, log handles closed, and temporary section files/caches were removed. Native Windows was not available; its cleanup path is mocked in the unit tests.
Checklist
easyedit/util.pyhelpers for the new external command (taskkill)jobs/,.cache/,node_modules/, or any footage