Skip to content

Report ssh's failure to connect the same whichever pipe notices - #34

Merged
lydakis merged 1 commit into
mainfrom
claude/errand-ssh-early-exit
Oct 5, 2026
Merged

lydakis merged 1 commit into
mainfrom
claude/errand-ssh-early-exit

Conversation

@lydakis

@lydakis lydakis commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Before: when ssh could not connect to a peer, errand sometimes reported "unreachable: ssh could not connect to gone" and sometimes only "ssh to gone ended: exit status 255". Which one you got depended on timing, and TestSSHConnectFailureIsUnreachable (from #28) failed intermittently in CI.

After: a peer that ssh cannot connect to is always reported as unreachable, so ps, df and workspaces list it with the other unreachable peers.

The read side already treated exit status 255 before any output as a failure to connect. The write side didn't, and the request write can hit the closed pipe before the response read does.

How: reads and writes on the ssh pipes now explain an error through one function. It waits briefly for ssh to exit when nothing has been read yet, then classifies by the exit status. A new test writes after ssh has already exited. On main it fails with exactly the CI error.

🤖 Generated with Claude Code

https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6


Generated by Claude Code

When ssh exited with 255 before saying anything, a read reported the
peer unreachable but a write reported only that ssh ended. Whether the
request write or the response read hit the closed pipe first depended on
timing, so TestSSHConnectFailureIsUnreachable was flaky in CI. Both now
explain the error through one function.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013BQxiCNDXMnjv5pvmgo5E6
@lydakis
lydakis marked this pull request as ready for review October 5, 2026 06:03
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T06:04:00.861854Z 21ef1de Draft marked ready
🔒 Security Review ✅ Completed 2026-10-05T06:07:23.992930Z 21ef1de Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lydakis
lydakis merged commit 103f5f7 into main Oct 5, 2026
9 checks passed
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.

2 participants