Skip to content

docs: SSH stderr audit + socketpair channel design (#2370, #2371)#4339

Merged
oferchen merged 1 commit into
masterfrom
docs/ssh-stderr-socketpair-design
May 17, 2026
Merged

docs: SSH stderr audit + socketpair channel design (#2370, #2371)#4339
oferchen merged 1 commit into
masterfrom
docs/ssh-stderr-socketpair-design

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

  • Adds docs/audits/ssh-stderr-handling.md (SSE-1, fix: improve metadata platform stubs for cross-platform compilation #2370): per-call-site audit of how crates/rsync_io/src/ssh/ configures, drains, surfaces, and shuts down the SSH subprocess stderr stream, with a sync-vs-async behaviour matrix.
  • Adds docs/design/socketpair-stderr-channel.md (SSE-2, refactor: improve protocol message codes and negotiation #2371): pipe-vs-socketpair trade-off, cross-platform construction (Unix socketpair(2), Windows TCP-loopback shim), AsyncSshTransport integration plan, optional warning channel, default-off ssh-socketpair-stderr feature flag, and a five-step rollout keyed to SSE-3..SSE-7.
  • No code changes. The existing StderrAuxChannel trait in aux_channel.rs is the seam the new tokio backend slots into.

Test plan

  • cargo fmt --all -- --check
  • Markdown renders cleanly on GitHub
  • All file/line citations resolve at the referenced commit
  • No references to disallowed terms in either doc

Adds two docs covering the SSE-1 (#2370) and SSE-2 (#2371) tasks:

- `docs/audits/ssh-stderr-handling.md` maps every call site that
  configures, drains, surfaces, or shuts down the SSH subprocess stderr
  stream in `crates/rsync_io/src/ssh/`. Covers the dual-backend
  selection (socketpair on Unix, pipe everywhere else), the 50 ms
  bounded join policy, the `Drop`-time surface-on-error path, and
  confirms the async transport currently uses `Stdio::inherit()` with
  no drain or capture.
- `docs/design/socketpair-stderr-channel.md` proposes a tokio-aware
  `StderrAuxChannel` backend behind a default-off
  `ssh-socketpair-stderr` feature flag, covers a Windows TCP-loopback
  shim for the missing `socketpair(2)`, and lays out the five-step
  rollout keyed to SSE-3..SSE-7.

No code changes; the existing dual-backend abstraction in
`aux_channel.rs` already supports the proposed trait-level extension.
@oferchen oferchen merged commit bc98ea5 into master May 17, 2026
10 checks passed
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 17, 2026
oferchen added a commit that referenced this pull request May 18, 2026
)

Adds two docs covering the SSE-1 (#2370) and SSE-2 (#2371) tasks:

- `docs/audits/ssh-stderr-handling.md` maps every call site that
  configures, drains, surfaces, or shuts down the SSH subprocess stderr
  stream in `crates/rsync_io/src/ssh/`. Covers the dual-backend
  selection (socketpair on Unix, pipe everywhere else), the 50 ms
  bounded join policy, the `Drop`-time surface-on-error path, and
  confirms the async transport currently uses `Stdio::inherit()` with
  no drain or capture.
- `docs/design/socketpair-stderr-channel.md` proposes a tokio-aware
  `StderrAuxChannel` backend behind a default-off
  `ssh-socketpair-stderr` feature flag, covers a Windows TCP-loopback
  shim for the missing `socketpair(2)`, and lays out the five-step
  rollout keyed to SSE-3..SSE-7.

No code changes; the existing dual-backend abstraction in
`aux_channel.rs` already supports the proposed trait-level extension.
oferchen added a commit that referenced this pull request May 18, 2026
)

Adds two docs covering the SSE-1 (#2370) and SSE-2 (#2371) tasks:

- `docs/audits/ssh-stderr-handling.md` maps every call site that
  configures, drains, surfaces, or shuts down the SSH subprocess stderr
  stream in `crates/rsync_io/src/ssh/`. Covers the dual-backend
  selection (socketpair on Unix, pipe everywhere else), the 50 ms
  bounded join policy, the `Drop`-time surface-on-error path, and
  confirms the async transport currently uses `Stdio::inherit()` with
  no drain or capture.
- `docs/design/socketpair-stderr-channel.md` proposes a tokio-aware
  `StderrAuxChannel` backend behind a default-off
  `ssh-socketpair-stderr` feature flag, covers a Windows TCP-loopback
  shim for the missing `socketpair(2)`, and lays out the five-step
  rollout keyed to SSE-3..SSE-7.

No code changes; the existing dual-backend abstraction in
`aux_channel.rs` already supports the proposed trait-level extension.
@oferchen oferchen deleted the docs/ssh-stderr-socketpair-design branch May 19, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant