By: Michael Lynch <git@mtlynch.io>
Reduce duplication in video upload code Collapses duplication introduced by the video upload feature without changing behavior: - Fold the repeated ffmpeg/ffprobe run-and-wrap-error pattern into one runMediaCommand helper, and drop the per-transcode requireWebMEncoders pre-flight (ffmpeg already fails clearly on a missing encoder). - Merge MarkMediaItemReady/MarkMediaItemFailed into UpdateMediaStatus. - Extract a viewerID handler helper for the four identical viewer-lookup blocks in browse/media handlers. - Express WriteConverted in terms of WriteProduced so the temp-file lifecycle lives in one place. - Inline the single-use Processor.writeProduced wrapper. Net non-test LOC drops by ~60 (123 deleted, 61 added). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| Time to Start | Worker time | Duration | Time to finish | |
| Config | 2s | 20s | 20s | 22s |
| Eval | 20s | 2m13s | 2m13s | 2m34s |
| Build | 41s | 12m25s | 2m06s | 2m48s |
| Suite | 2s | 14m59s | 2m46s | 2m48s |