Repository navigation
Description
What happens
Batch clipping treats any matching stem-based output as proof that an entire source completed. Output filenames also omit source identity. These are related resume/output-identity failures, grouped in one report.
Tested on CLI main a4a7760ad7925f5feb1f4776d56b5ffd299f3d54, Linux, Python 3.13.14. The actual Typer CLI was used with recording/failure-injecting ffmpeg stubs. Range-only commands did not require credentials or call transcription.
1. Rerun skips a partially failed source
printf '%s\n' meeting.mp4 |
assembly clip --from-stdin --range 0-1 --range 5-6 --no-snap --jsonInject an encoder failure only for meeting.clip02.mp4:
- First command exits 1: clip01 exists, clip02 does not.
- Identical rerun without the injected failure exits 0, reports
"status":"skipped", and makes zero cut calls. clip02 is still missing. --forcemakes two cuts and creates both outputs.- Control: an actually complete first run correctly skips on rerun.
The failure response tells users to rerun the same command to retry failures, but that advice cannot recover this partial state.
2. Distinct sources with identical stems collide
printf '%s\n' a/meeting.mp4 b/meeting.mp4 |
assembly clip --from-stdin --range 0-1 --no-snap \
--out-dir clips --concurrency 1 --jsonBoth sources target clips/meeting.clip01.mp4. Serial execution completes A and incorrectly skips B because A's output exists.
Fresh concurrent runs with --concurrency 2 reported both sources completed but left just one output. In 3/3 recorded runs, the surviving stub output identifies B as its source, demonstrating that A's output was overwritten. This proves the destination collision and observed scheduling with the stub, not deterministic real-ffmpeg scheduling.
Control: unique stems produce distinct outputs and both resume correctly.
3. Brackets in a stem prevent resume
printf '%s\n' 'meeting [1].mp4' |
assembly clip --from-stdin --range 0-1 --no-snap --jsonThe first run and identical rerun both cut and report completed. [1] is interpreted as a glob character class, so the resume pattern does not match its own literal output filename. A plain-stem control skips the second cut.
Expected behavior
Only complete outputs for the specific source should mark it complete. Failed sources should remain retryable, separate sources should not silently overwrite or skip one another, and legal literal filenames should resume.
The batch error suggestion promises reruns will retry failures.
Cause
- Resume checks whether any stem-based glob matches.
- Sequential cutting can leave only the earlier outputs.
- Destination naming uses stem, segment number, and suffix only.
Escaping the glob fixes only the bracket case, not incomplete output or collisions.
Proposed direction
Could we agree on source/output identity and completion tracking before a patch? Options include collision-safe per-source destinations, explicit collision rejection, and recording complete segment sets. The fix should preserve successful resume while making partial failures retryable.
The above commands are range-only and can be reproduced with local valid media. The measured counts/overwrites used ffmpeg stubs to inject failures and identify output ownership; no live API calls or billing were tested. The targeted existing CLI test run passed 167 tests, not the full repository gate.
Activity