Seed pending media_process_task rows for a user's already-stored images
so the APP-101 pipeline compresses them. Adds a resumable MediaBackfillTask
(mirrors full_text_rebuild) that paginates candidate files and enqueues
each image idempotently, a self-service /workflow/mediaBackfill endpoint,
and cursor-based candidate listers. A file-level guard (HasHandledForFile)
skips already-processed files so re-runs do not re-compress. Bumps the
assets submodule for the frontend UI.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds a media post-processing pipeline that compresses images off the upload
path, in batches, to save storage:
- New media_process_task ent table (media_type discriminator; image now,
video later) + inventory client with idempotent Enqueue/ListPending.
- CompleteUpload enqueues the primary entity when the global switch and the
owner's auto_compress_images opt-in are on and mime/size gates pass.
- A configurable cron enqueues a bounded batch onto a dedicated
MediaProcessQueue (default 1 worker) that compresses each blob via vips
(default) or ffmpeg using EntitySource, then writes the result back as a
new version through manager.Update (quota handled by StorageDiff). A
context guard prevents the write-back from re-enqueueing itself.
- BackendVersion 4.14.1 -> 4.14.2 to fire the migration; new default
settings are idempotently backfilled.
BusyWorkers/metrics expose the queue in /admin/task; result mode 'version'
is the MVP (replace/auto are follow-ups).