Skip to content

feat: SSH remote workspace RFC — dry-run bootstrap for ssh:// targets (#2140) | SSH 远程工作区 RFC#2192

Merged
esengine merged 1 commit into
esengine:mainfrom
SivanCola:pr/5-ssh-remote-rfc
May 29, 2026
Merged

feat: SSH remote workspace RFC — dry-run bootstrap for ssh:// targets (#2140) | SSH 远程工作区 RFC#2192
esengine merged 1 commit into
esengine:mainfrom
SivanCola:pr/5-ssh-remote-rfc

Conversation

@SivanCola

Copy link
Copy Markdown
Collaborator

Summary

Adds an SSH remote workspace RFC with a --dry-run bootstrap. The reasonix code ssh://user@host/path --dry-run command parses the SSH URI, checks local SSH availability, and prints planned execution steps without executing any remote commands or making network connections. Without --dry-run, an explicit error message recommends running Reasonix on the remote host with an SSH tunnel for the dashboard. GPU passthrough (#2141) is tracked separately.

概述

新增 SSH 远程工作区 RFC 和 --dry-run 引导。reasonix code ssh://user@host/path --dry-run 命令解析 SSH URI,检查本地 SSH 可用性,打印计划执行步骤,不执行任何远程命令也不建立网络连接。无 --dry-run 时显式报错并建议在远程主机上运行 Reasonix 配合 SSH 隧道访问 dashboard。GPU passthrough (#2141) 单独跟踪。

Key Files

  • src/cli/ssh-remote.ts (new) — parseSshUri(), probeSsh(), generateSshDryRunReport()
  • src/cli/index.ts--dry-run option, SSH URI handling, rejection message
  • tests/ssh-remote.test.ts (new) — URI parsing, report content, probe tests

Depends On / 依赖

This PR is #5 in a 5-PR series:

Test Plan

  • SSH URI parser: full URI, no user, no path, host-only, invalid formats
  • Local SSH probe
  • Dry-run report content: RFC banner, planned steps, recommendations
  • No network side effects
  • SSH binary missing warning

Verification

npm run lint      → 0 errors
npx vitest run tests/ssh-remote.test.ts → 14 passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f520f05495

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/tools/filesystem.ts Outdated
Comment thread src/cli/ssh-remote.ts Outdated
@SivanCola SivanCola changed the title feat: SSH remote workspace RFC — dry-run bootstrap for ssh:// targets (#2140) feat: SSH remote workspace RFC — dry-run bootstrap for ssh:// targets (#2140) | SSH 远程工作区 RFC May 28, 2026
@SivanCola

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6426b6823f

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/cli/ui/edit-tool-gate.ts Outdated
@SivanCola

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6212f5e0ea

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/cli/ssh-remote.ts
@esengine

Copy link
Copy Markdown
Owner

Part of the #2188#2192 stack that currently shows the same cumulative +1740/-39 diff on all five PRs (all based on main but stacked on each other). See my comment on #2188 for the fix — please split into independent single-feature branches off main so each PR contains only its own change. I'll review this one (and especially the file-deleting / RFC ones) properly once it's isolated.

@SivanCola SivanCola force-pushed the pr/5-ssh-remote-rfc branch from 6212f5e to 9ded388 Compare May 29, 2026 03:23

@esengine esengine left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — safe, well-scoped RFC scaffold. ssh:// without --dry-run is explicitly not-implemented and errors with helpful guidance (run on the remote host + SSH tunnel for the dashboard), so no half-built remote execution ships. The dry-run path only parses the URI, probes local ssh via a fixed ssh -V 2>&1 (no interpolation), detects the user via execFileSync('id'/'whoami') (args array, no shell), and console.logs a plan — generateSshDryRunReport builds a printed string (the sq() quoting is display-only, never executed). No user-controlled input reaches a shell. CI green, tests present. Good groundwork for #2140 without the risk. Merging.

@esengine esengine merged commit c3670c9 into esengine:main May 29, 2026
4 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