Files
zpan/server
saltbo 9afa8f1bb6 fix(downloads): make a blocked remote-download unit retryable so credit top-ups recover
reportRemoteDownloadUnit short-circuited on a locally-cached 'blocked' usage
record and threw without re-contacting the cloud. Once a unit was blocked, the
task was wedged in 'suspended' permanently — recharging credits had no effect,
because the next charge attempt never re-asked the cloud (confirmed on prod: the
stuck task's unit 1 was status='blocked').

Drop the short-circuit so a previously-blocked unit re-syncs with the cloud on
the next attempt; if credits are now available it's accepted and the task leaves
suspended. A 'reported' (already-charged) unit still short-circuits, so no
double-charge.

Test: a unit blocked on first attempt is accepted on retry after a top-up, and
the task transitions back to downloading.
2026-06-19 14:40:05 -04:00
..