By: Michael Lynch <git@mtlynch.io>
Simplify video upload code after review Remove redundant complexity surfaced in review, with no behavior change for any reachable input: - Delete uploadTooLargeError and the per-file size cap in copyToTempFile. Each route's http.MaxBytesReader uses the same ceiling as the per-file cap, and the multipart body is always larger than the file alone, so MaxBytesReader always trips first. The per-file cap was unreachable. - Revert WriteProduced; its only caller was WriteConverted. Restore the original temp-file-then-WriteFile implementation. - Probe video duration once: thread the already-probed duration into ProcessVideo so thumbnailSeekOffset no longer reruns ffprobe. - Drop runMediaCommand's exec.ErrNotFound special-case; the default command error is already actionable. - Inline spillToTempFile back into its single caller, restoring the plain-defer cleanup shape. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| Time to Start | Worker time | Duration | Time to finish | |
| Config | 2s | 24s | 24s | 26s |
| Eval | 25s | 2m14s | 2m14s | 2m40s |
| Build | 45s | 7m13s | 3m00s | 3m46s |
| Suite | 2s | 9m52s | 3m44s | 3m46s |