feat(deploy): stage streamed payloads to a temp file for replication#536
Draft
kriszyp wants to merge 1 commit into
Draft
feat(deploy): stage streamed payloads to a temp file for replication#536kriszyp wants to merge 1 commit into
kriszyp wants to merge 1 commit into
Conversation
When a deploy_component is replicated to peers, the origin needs to keep a copy of the payload so it can re-stream it to each peer. The payload Readable is consumed once by local extraction; without staging, peer replication would have nothing to send. deployComponent now stages the payload to a temp file before extraction when there are nodes to replicate to and the payload is a Readable (non-package, streaming deploys). Local extraction re-sources from the staged file, which keeps backpressure behavior identical to the non-replicated case. The temp file is cleaned up in a finally block after replication completes (success, failure, or skipped). Local-only deploys keep their zero-disk-copy property; package-identifier deploys are unaffected. This is the core-side staging needed for harper-pro's direct-HTTPS deploy relay (slice 3b, addressing #524). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Reviewed; no blockers found. |
3 tasks
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
Origin-side payload staging needed for the direct-HTTPS peer relay (harper-pro slice 3b). When a `deploy_component` request will be replicated to peers, the origin now writes the streamed payload to a temp file before local extraction so it can re-stream the same bytes to each peer afterwards. Without this, the payload Readable is consumed once by local extract and gone by the time replication runs.
Third slice of #524.
Where to look
Backward compatibility
Test plan
🤖 Generated with Claude Code