Skip to content

fix(error): add actionable SSH client diagnostics - #294

Merged
inureyes merged 2 commits into
mainfrom
fix/issue-284-actionable-io-errors
Aug 27, 2026
Merged

fix(error): add actionable SSH client diagnostics#294
inureyes merged 2 commits into
mainfrom
fix/issue-284-actionable-io-errors

Conversation

@inureyes

@inureyes inureyes commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace opaque SSH I/O failures with typed DNS, TCP, negotiation, host-key, authentication, channel, command, and stage-aware timeout diagnostics that preserve underlying causes.
  • Preserve typed failures through raw streaming so single-destination SSH client failures exit 255 and write one diagnostic to stderr or -E, while remote statuses and existing local or multi-host semantics remain unchanged.
  • Add focused unit and end-to-end coverage for refused connections, DNS failures, OS causes, timeout context, authentication wording, output routing, Clap usage, local configuration errors, and exit-code behavior.

Validation

  • cargo test --lib ssh::auth::tests
  • cargo test --lib ssh::tokio_client::error::tests
  • cargo test --lib commands::exec::tests
  • cargo test --test ssh_compat_output_test
  • cargo test --lib ssh::client::connection::tests::test_connect_error
  • cargo test --lib ssh::client::file_transfer::tests
  • cargo check --lib --tests
  • cargo clippy --lib --tests -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

Closes #284

Distinguish resolver, transport, negotiation, host-key, authentication, channel, command, and timeout failures while preserving their causes.

Keep typed client failures through raw streaming so single-host SSH exits 255 and writes exactly one diagnostic. Preserve generic local, Clap, multi-host aggregation, and remote-command exit behavior.

Refs #284
@inureyes inureyes added type:bug Something isn't working priority:medium Medium priority issue status:review Under review labels Aug 27, 2026
Return a typed SSH client error when agent, default-key, and password selection is exhausted so keyless non-interactive sessions keep the OpenSSH exit status and receive method-specific remediation.

Make transport tests supply a temporary pre-auth key so they deterministically exercise DNS and TCP failures on keyless runners, and cover authentication diagnostics on stderr and `-E`.

Refs #284
@inureyes inureyes added status:done Completed and removed status:review Under review labels Aug 27, 2026
@inureyes
inureyes merged commit 1a7ff41 into main Aug 27, 2026
5 checks passed
@inureyes
inureyes deleted the fix/issue-284-actionable-io-errors branch August 27, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:medium Medium priority issue status:done Completed type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(error): replace the opaque I/O error with actionable diagnostics

1 participant