SC-5: SSH transport layer - #6
Merged
Merged
Conversation
ParseRemotePath (user@host:path, IPv6, Windows drive-letter disambiguation), BuildRSHCommand with quote-aware tokenizing (bare strings.Fields would mis-split real -e usage with quoted args), length-prefixed+type-tagged frame protocol, Session (subprocess/pipe lifecycle), and Handshake/ServeHandshake round trip. --server wired into CLI, hidden from --help like upstream. Option A (spawn ssh subprocess) confirmed correct: -e/--rsh's real semantics only work against an arbitrary shelled-out command. Verified against upstream that --port is daemon-mode-only and -i already means --itemize-changes, so -e is the sole customization mechanism, matching real rsync rather than inventing new flags. Self-review found a real pipe leak: StdoutPipe() failing after StdinPipe() succeeded meant Start() was never reached, leaking the stdin pipe. Fixed. Scope note: this builds transport primitives + a minimal handshake proof, not full pipeline wiring (file-list/signature/delta exchange over this transport) — that's separate follow-up scope, not silently included or silently skipped.
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.
ParseRemotePath (user@host:path, IPv6, Windows drive-letter disambiguation), BuildRSHCommand with quote-aware tokenizing (bare strings.Fields would mis-split real -e usage with quoted args), length-prefixed+type-tagged frame protocol, Session (subprocess/pipe lifecycle), and Handshake/ServeHandshake round trip. --server wired into CLI, hidden from --help like upstream.
Option A (spawn ssh subprocess) confirmed correct: -e/--rsh's real semantics only work against an arbitrary shelled-out command. Verified against upstream that --port is daemon-mode-only and -i already means --itemize-changes, so -e is the sole customization mechanism, matching real rsync rather than inventing new flags.
Self-review found a real pipe leak: StdoutPipe() failing after StdinPipe() succeeded meant Start() was never reached, leaking the stdin pipe. Fixed.
Scope note: this builds transport primitives + a minimal handshake proof, not full pipeline wiring (file-list/signature/delta exchange over this transport) that's separate follow-up scope, not silently included or silently skipped.