Repository navigation
fix(ssh): preserve in-band outcomes before transport diagnostics - #249
Conversation
Trust valid matching schema envelopes before login-shell stderr, and report SSH send timeouts as unknown without allowing automatic retry. Fixes #228
|
Review follow-up implemented in 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. |
|
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. |
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
Checklist
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.