fix(site): make media cache safe for cold builds #1

Merged
julian merged 1 commit from fix/media-cache-race into main 2026-10-08 10:05:09 +00:00
Owner

Same image on several sections/pages was localized concurrently: one call
read a cache file another was still writing ("Input Buffer is empty"), and
a crashed build left truncated files that later builds trusted. Never
showed on the server because its cache was warm; every fresh clone hits it.

ensureFile() dedupes concurrent work per output file and writes tmp+rename.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

Same image on several sections/pages was localized concurrently: one call read a cache file another was still writing ("Input Buffer is empty"), and a crashed build left truncated files that later builds trusted. Never showed on the server because its cache was warm; every fresh clone hits it. ensureFile() dedupes concurrent work per output file and writes tmp+rename. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same image on several sections/pages was localized concurrently: one call
read a cache file another was still writing ("Input Buffer is empty"), and
a crashed build left truncated files that later builds trusted. Never
showed on the server because its cache was warm; every fresh clone hits it.

ensureFile() dedupes concurrent work per output file and writes tmp+rename.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
julian merged commit dd0ab8ee05 into main 2026-10-08 10:05:09 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
julian/postfinance-gb!1
No description provided.