Skip to content

SC-5: SSH transport layer - #6

Merged
iampryce merged 1 commit into
mainfrom
sc-5-ssh-transport
Jul 31, 2026
Merged

iampryce merged 1 commit into
mainfrom
sc-5-ssh-transport

Conversation

@iampryce

Copy link
Copy Markdown
Contributor

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.

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.
@iampryce
iampryce requested a review from jasonmiller-cc July 31, 2026 19:14
@iampryce
iampryce merged commit 118e24c into main Jul 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant