fix: complete managed runtime downloads on slow connections - #10
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.
Summary
ephemeral(policy:)behavior for callers that explicitly provide one policyRoot cause
The managed runtime used one ephemeral
URLSessionfor both the small signed manifest and the 228,709,309-byte runtime archive. Its 60-second resource timeout was appropriate for metadata but terminated the archive after exactly one minute. The manifest and detached signature had already downloaded and verified successfully; only the large asset timed out.User impact
A first-time PDF user could open and preview a PDF, but the managed runtime never became ready and translation stayed disabled. Existing verified runtime installations were unaffected. With this change, a slow connection may continue downloading while a stalled connection still fails after 60 seconds without data.
Validation
Scripts/smoke_babeldoc_runtime.sh: passed against the public arm640.6.4+gloss.4release in 1,766.952 secondsswift test --parallel: passedswift test: 171 XCTest tests, 4 opt-in skips, 0 failures; 26 Swift Testing tests, 1 opt-in skip, 0 failuresswift format lint --stricton both changed Swift filesbash -n Scripts/*.shswift package describeplutil -lint Resources/Info.plistgit diff --check