Skip to content

fix: detect noisy Windows ARM64 SSH platforms#7965

Open
siddqamar wants to merge 1 commit into
stablyai:mainfrom
siddqamar:fix/ssh-windows-arm64-platform
Open

fix: detect noisy Windows ARM64 SSH platforms#7965
siddqamar wants to merge 1 commit into
stablyai:mainfrom
siddqamar:fix/ssh-windows-arm64-platform

Conversation

@siddqamar

Copy link
Copy Markdown
Contributor

Summary

  • Fix SSH remote platform detection for Windows ARM64 hosts when PowerShell/OpenSSH emits startup noise before the platform marker.
  • Reproduced the issue by mocking the SSH probe output as #< CLIXML ... Windows ARM64, which previously caused Orca to parse the first noisy fields and return null, leading to the unsupported platform error.
  • Updated detection to scan probe output line by line until it finds a supported OS/architecture marker.
  • Added regression coverage for noisy Windows ARM64 detection.

Screenshots

No visual change.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • Added or updated high-quality tests that would catch regressions

Additional focused test run:

pnpm.cmd vitest run \
  src/main/ssh/ssh-remote-platform.test.ts \
  src/main/ssh/ssh-remote-platform-detection.test.ts \
  src/main/ssh/relay-protocol.test.ts

AI Review Report

Reviewed the fix against #7706 from a maintainer perspective.

  • Checked the exact issue path: ssh:connect fails during remote relay platform detection before deployment.
  • Verified Windows ARM64 support already existed, so the problem was probe output parsing rather than missing platform support.
  • Checked Linux and macOS behavior to ensure existing platform detection remains unchanged.
  • Confirmed the new logic searches the full probe output for a supported platform marker instead of assuming it appears in the first stdout fields.
  • Verified the added regression tests cover PowerShell/CLIXML startup noise and prevent this failure from recurring.

- Scan remote platform probe output line-by-line for supported OS/arch markers.

- Handle PowerShell/OpenSSH first-use CLIXML or banner noise before Windows ARM64.

- Add regression coverage for noisy Windows ARM64 detection.
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b1340181-4b09-4d92-8fa9-ab3fd68f5d5a

📥 Commits

Reviewing files that changed from the base of the PR and between 41edc49 and 211d768.

📒 Files selected for processing (2)
  • src/main/ssh/ssh-remote-platform-detection.test.ts
  • src/main/ssh/ssh-remote-platform-detection.ts

📝 Walkthrough

Walkthrough

This change refactors platform detection parsing in the SSH remote platform detection module. A new shared helper, parseRemotePlatformOutput, replaces the previous ad-hoc field extraction used separately by detectUnamePlatform and detectWindowsPlatform. The helper iterates output line-by-line, extracts fields per line, and attempts to derive a RelayPlatform, returning the first successful match. A new test case was added verifying correct Windows ARM64 detection when PowerShell output contains noise preceding the platform marker.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: fixing noisy Windows ARM64 SSH platform detection.
Description check ✅ Passed The description covers the main template sections and testing details, but it is missing Security Audit and Notes sections.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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