Skip to content

fix(ssh): preserve successful discovery when the installed-version probe fails #265

Closed

Description

@abruption

What happened

Priority: P2. A successful source-streamed SSH list can become an overall failure and lose its discovered sessions when the separate installed-version probe fails.

Source:

The listing and remote_installed_version() run inside the same try block. Injecting a successful listing, followed by a probe-only exception, produces exit 1 / ok=false and drops the successful sessions.

What you expected

The installed-version probe is supplementary metadata. Preserve successful discovery even if this second connection or version parsing fails; expose a bounded diagnostic/version-unknown state separately.

Environment

  • Python session-peer 1.0.3 / source 817d92ab780f657ec754d40fcf86087b5b01a883.
  • macOS arm64, Python 3.13.7; transport/list and secondary probe were mocked.
  • The coupling also exists in v1.0.2: this is an existing behaviour to improve, not wholly a new 1.0.3 regression. Stricter 1.0.3 probe validation can expose additional failure cases.
  • No real SSH or remote installation was touched.

Discovery output

Synthetic primary listing returned ok=true with one placeholder session. The final host result after probe failure contained only the error, without that session.

Proposed fix and acceptance criteria

  • Isolate supplementary version-probe failures from the primary list result.
  • Retain sessions, discovery metadata, SSH identity metadata, and requested/resolved host identity.
  • Report version-unknown/probe diagnostics without unsanitized host/process data or terminal controls.
  • Test probe timeout, invalid version response, and transport failure following successful discovery.
  • Preserve genuine primary discovery failures and multi-host partial-failure exit behaviour.
  • Keep update --host installation/version verification strict; do not globally weaken remote_installed_version().
  • Preserve normal successful and uninstalled-remote output compatibility.

Checked

  • Searched existing issues and open PRs.
  • Removed sensitive information; values are fixtures.
  • Real SSH connectivity and native approval settings were outside this isolated verification.

Activity

  1. added this to the v1.0.4 milestone on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions