Wait for an upload's URL to expire before deleting its bytes (#218)

* Wait for an upload's URL to expire before deleting its bytes

An image deleted while its presigned PUT was still in flight lost its row
before the bytes landed, so the object stayed in R2 with nothing left to
reclaim it. Intents now record when their upload URL expires, and the
physical-deletion claim skips an asset until that time plus a 15 minute
grace for a PUT that started just before expiry. The hourly sweep picks
it up afterwards.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Give an in-flight upload a day, not 15 minutes, to finish

A PUT that R2 accepted just before its URL expired can keep sending for as
long as the connection takes: a 15 MB image at 12 KB/s needs about 20
minutes. Deleting its object after a fixed 15 minutes could still orphan
the bytes. A day covers any real upload, and the wait costs little since a
deleted element's image already stays for its 30-day tombstone.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
029717f45aDara Adedeji committed on 9/28/2026, 5:07:00 PM· committed by GitHubparentd967315
4 files changedLine totals unavailable