Skip to content

fix: make SSH command launch and cleanup portable to Windows - #1

Merged
lw-liuwang merged 3 commits into
mainfrom
codex/windows-ssh-is-model
Oct 20, 2026
Merged

lw-liuwang merged 3 commits into
mainfrom
codex/windows-ssh-is-model

Conversation

@lw-liuwang

@lw-liuwang lw-liuwang commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Native Windows cannot launch the generated OpenSSH ProxyCommand when Python paths are quoted with POSIX single quotes. ssh --proxy-mode --rm also raises AttributeError because Windows has no signal.SIGHUP. This PR fixes these SSH blockers and adds Windows regression coverage.

This ports only the three Windows SSH commits from upstream PR googlecolab/google-colab-cli#181 onto this repository's main (d4f855d). The unrelated upstream allocation-timeout and README changes are not included.

Related upstream issue #178 and Windows support discussion #180. Thanks to @Le-Anh-Duy for the original quoting diagnosis in discussion #97.

Changes

  • Use Windows command-line quoting for ProxyCommand, retaining POSIX quoting and argument-preservation tests.
  • Register only available cleanup signals and select the local null device with os.devnull.
  • Add real Windows child-process/OpenSSH launch tests, including a Python installation path and SSH identity paths containing spaces.
  • Add Windows/Linux/macOS SSH CI and a native Windows live integration script; update the SSH design documentation.

Validation

Re-tested this port on native Windows 11 build 26200 with Python 3.12.14 and Windows OpenSSH:

  • The full suite reports 350 passed, 15 failed, 2 skipped. The remaining failures are the previously reproduced Windows issues: help-output parsing (2), temporary-file editing (2), and headless REPL construction (11). The SSH tests pass.
  • Ruff passes for every changed Python file; git diff --check passes.
  • Live Colab CPU test passed on 2026-10-20 using uv run python integration/repro_windows_ssh/test.py: Windows OpenSSH launched the generated ProxyCommand with an identity path containing spaces, and the remote shell returned windows-ssh-ok. The recorded endpoint was released and the final sessions query reported no active assignments. Existing unrelated assignments are preserved.
  • This repository's Windows/Linux/macOS SSH CI passes on the ported branch. The native Windows SSH suite contains 115 passing tests.

This is a scoped contribution toward native Windows support. It does not claim complete Windows feature parity or reliable cleanup after forced process termination.

@lw-liuwang
lw-liuwang merged commit 1ff2536 into main Oct 20, 2026
6 checks passed
@lw-liuwang
lw-liuwang deleted the codex/windows-ssh-is-model branch October 20, 2026 07:08
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.

1 participant