Harden large-transfer durability and observability#7
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Why
The overnight 10,824,083,788-byte MKV download completed, with its final range ending at the exact stored EOF. macftpd streamed the bytes unchanged; there was no media transcoding or remuxing. The request history also exposed three correctness gaps: the previous 60-second whole-response deadline interrupted long streams and triggered retries, requested sizes and tiny media tail probes distorted download analytics, and overwrite paths could truncate destinations before transfer/retention success. Public writes could additionally leave cached objects or directory listings stale.
Impact
Large streams can continue while making progress, completed-download counts now reflect completed bodies or substantial resumes, and failed uploads/retention operations leave the original destination intact. Overwrites temporarily require space for the staged replacement and retained prior version. Internal staging/trash/version directories are always hidden. Public cache invalidation is best-effort and requires the configured Cloudflare zone token and cache tag.
Checks
./scripts/check.shgo vet, native build, Darwin/arm64 buildgo test ./...after merging currentmain