Stream file transfers with cancellation and atomic downloads - #190
Merged
qwrobins merged 3 commits intoSep 4, 2026
Merged
Conversation
Owner
Author
|
Greploop complete (GitHub): 3 review rounds, final confidence 5/5, 2 findings fixed/resolved, 0 unresolved comments. Final validation after integrating main:
|
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
--transfer-timeout, default 120 seconds) and SIGINT/SIGTERM/caller cancellation.Validation
Closes #184
Greptile Summary
Streams file uploads and downloads with bounded memory, cancellation, shared deadlines, validated redirects, and atomic destination replacement.
--transfer-timeout, signal-driven cancellation, updated command metadata, documentation, bundled skills, and transfer-focused tests.Greptile automatically discovered a related ticket that helped explain the purpose of this PR: file downloads should respect backpressure while preserving cancellation, cleanup, and final rename semantics.
Confidence Score: 5/5
The PR appears safe to merge; the previous transfer findings are fully addressed and no new actionable failures remain.
Successful uploads now require clean source-stream completion, and staging cleanup can no longer alter a committed download’s outcome or mask its primary error. The subsequent workflow, pagination, CLI-output, installer, and HTTP-classification changes preserve their documented contracts without introducing a blocking defect.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[File command] --> B{Upload or download?} B -->|Upload| C[Open regular file and record size] C --> D[Request signed upload target] D --> E[Stream PUT under shared deadline] E --> F{Redirect?} F -->|Yes| G[Validate HTTPS and filter cross-host headers] G --> E F -->|No, success| H[Await complete upload stream] H --> I[Optionally create attachment] B -->|Download| J[Validate Linear upload URL] J --> K[Stream GET under shared deadline] K --> L[Write private staging file with backpressure] L --> M[Atomically rename over destination] E --> N[Cancellation or failure cleanup] K --> N L --> NReviews (3): Last reviewed commit: "Merge main and preserve structured uploa..." | Re-trigger Greptile
Context used (4)