63d5dfe7

By: Michael Lynch <git@mtlynch.io>

Centralize media publication

Move media item construction, validation and processing coordination, and
metadata insertion into media.Service. HTTP handlers now parse requests, map
publication errors, and redirect; uploads.Processor accepts source paths and
writes the required variants.

The service preserves the files-before-metadata ordering, so a gallery item
never points at files that were not written. Its focused tests can assert that
orchestration without coupling to HTTP or the filesystem.

This is intentionally a publication-only stepping stone. It does not delete
files or add recovery behavior, so upload processing retains a write-only
storage dependency. Future work can extend the service with recoverable file
deletion and soft-delete recovery without adding DeleteFile to upload-facing
interfaces again.

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 2s 15s 15s 18s 2s
Eval 15s 46s 46s 1m01s 0s
Build 45s 5m27s 1m15s 2m01s 0s
Suite 2s 6m29s 1m58s 2m01s 2s

Timeline

0s10s20s30s40s50s1m1m10s1m20s1m30s1m40s1m50s2m