Skip to content

fix(ssh): preserve in-band outcomes before transport diagnostics - #249

Merged
abruption merged 6 commits into
mainfrom
abruption/v103-issue-228
Oct 5, 2026
Merged

abruption merged 6 commits into
mainfrom
abruption/v103-issue-228

Conversation

@abruption

Copy link
Copy Markdown
Owner

Summary

Preserve matching schema-versioned SSH outcomes before classifying stderr. A started send timeout is explicitly unknown, disallows automatic retry, and does not claim non-submission.

Closes #228

Type

  • fix

Checklist

  • Conventional commit; generated standalone consistency checked.
  • Synthetic regression tests; no secrets or real messages in fixtures.
  • Real-host SSH validation (not performed; no operational changes).

Verified against

Python 3.13.7, macOS arm64: independently reran 37 SSH tests. Fixtures cover misleading stderr markers, valid outcomes on nonzero exit, schema/type/command mismatches, legacy responses and unknown timeouts. Independent read-only review completed.

Notes

Draft for v1.0.3 review; no merge/release authorization. Transport tests are mocked, not evidence of an actual remote incident. Coordinate with #229 and regenerate the standalone after overlapping changes. Existing private security work remains separate.

Trust valid matching schema envelopes before login-shell stderr, and report SSH send timeouts as unknown without allowing automatic retry.

Fixes #228
@abruption abruption added this to the v1.0.3 milestone Oct 3, 2026
@abruption

Copy link
Copy Markdown
Owner Author

Review follow-up implemented in 4864eed.

Normal completion and captured timeout output now use the same complete-response parser. Valid matching schema JSON survives a later timeout, including strict UTF-8 bytes and submitted/queue evidence. Partial, mismatched, duplicate-key or non-JSON output does not establish an outcome; incomplete send timeouts remain unknown with no automatic retry. End-to-end CLI preservation is covered alongside text/bytes and negative fixtures.

Verified: 41 SSH tests on Python 3.9.6; 44 SSH/generation tests on Python 3.13.7. Synthetic process outcomes only, no real SSH or messages. Draft/merge/release boundaries unchanged.

@abruption

Copy link
Copy Markdown
Owner Author

Additional review addressed: SSH now captures bytes so invalid diagnostic stderr cannot prevent strict stdout outcome parsing. Only stderr uses replacement decoding; stdout is neither repaired nor prefix-parsed. A real local fake subprocess proves complete Unicode response preservation at exits 0/255 with non-UTF8 stderr. The negative fixture distinguishes POSIX caller-thread decode failure from Windows reader-thread failure; raw-byte success tests remain active on both.

Strict framing/decoder guards also retain unknown/no-retry semantics for illegal JSON surrounding controls and decoder failure. Python 3.9.6/3.13.7 focused tests pass; the composed integration passed 707 tests (14 skips), preserving both parser methods. No real SSH/messages, merge, release or operations.

@abruption
abruption merged commit 8d43d62 into main Oct 5, 2026
28 checks passed
@abruption
abruption deleted the abruption/v103-issue-228 branch October 5, 2026 00:17
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.

fix(ssh): trust the remote in-band result before classifying stderr as a transport failure

1 participant