fix(ssh): actionable error when an SSH agent targets a Windows remote (#995)#1129
fix(ssh): actionable error when an SSH agent targets a Windows remote (#995)#1129jSydorowicz21 wants to merge 1 commit into
Conversation
Maestro's SSH command builders are POSIX-only (hardcode /bin/bash), so any agent (incl. copilot-cli) crashes with a cryptic exit 1 on a Windows remote host. Detect the Windows-shell failure signatures in the SSH error-pattern layer and surface an actionable message pointing at #995, instead of a bare crash. POSIX remotes are unaffected (5 new tests). Full Windows-remote command generation is intentionally deferred: it cannot be verified without a live Windows SSH host, and shipping a speculative command into a security-sensitive path is out of scope.
Greptile SummaryThis PR makes Windows SSH remote failures easier to understand. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "fix(ssh): surface actionable error for W..." | Re-trigger Greptile |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughSSH error-pattern matching now recognizes Windows remote host failures that cannot run the POSIX shell command it builds, returns a non-recoverable ChangesWindows remote SSH handling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed due to a network error. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@greptile re-review please |
Summary
Addresses #995. Root cause (high confidence): Maestro's SSH command builders are POSIX-only (they hardcode
/bin/bash --norc --noprofileand POSIX quoting), so any agent (including Copilot CLI) crashes with a crypticexit 1when the SSH remote host is Windows.This PR converts that cryptic crash into a clear, actionable failure.
Changes
command not foundstill maps to its own message).Scope / deferred
Full Windows-remote command generation (cmd.exe vs PowerShell selection, quoting of args/cwd/env, remote PATH and
copilot.exeresolution) is intentionally deferred: it cannot be verified without a live Windows SSH host, and shipping a speculative command into a security-sensitive execution path would be a guess. This PR is the verifiable guardrail; the full fix can follow once a Windows SSH test target is available.Verification
npm run lint(tsc x3): cleanvitest run error-patterns: 130 tests pass (incl. 5 new)eslint+prettier: cleanSummary by CodeRabbit