Repository navigation
distribution: download-update progress reporting - #219
Merged
Merged
Conversation
copy-limited! (now exported) takes #:on-progress and #:progress-every — byte-count callbacks throttled so fast links do not flood UI pollers — and download-update threads them through, reporting against the signed artifact size so a progress bar reads real percentages. Every tray-era app (fulcrum, movebit) hand-rolled a byte-for-byte copy of this function just to drive a progress bar, because the first-party downloader was silent. The duplicated copies had already drifted on the redirect-following fix (#153) once.
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.
Extracted from shipped app updaters: downstream applications duplicated download-update solely to drive progress bars, and those copies drifted on redirect and key-handling fixes.
This PR keeps the low-level copy helper private and adds the actual public contract needed by apps: download-update #:on-progress. It reports cumulative bytes from zero through the final signed size, throttles intermediate callbacks, validates callback arity, rejects response bytes beyond the signed artifact size before writing them, and removes .partial files for both ordinary failures and cancellation (�xn:break).
The original test was strengthened so a payload spans multiple 64 KiB reads and proves the exact monotonic cadence; a separate regression proves cancellation cleanup.
Documentation now states callback thread/verification semantics.
Local evidence: focused distribution/public API/docs tests pass.