Repository navigation
Conversation
Signed-off-by: Бат-Орших <34618353+orshih6@users.noreply.github.com>
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. This PR stays in draft until every box above is ticked. Hygiene✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Platform discovery ran
cmd /c echo %OS%and required the answer to be exactlyWindows_NT. With Microsoft's OpenSSH server, the barecmdform answersWindows_NT"(one extra quote). The check failed, theunamefallback got a localized cmd error, andrequireRemotePlatformthrew a plainError. The catch-all inprobe()only builds hints fromSshRunnerError, so the user got502 probe_failedwith no hint.Changes:
WINDOWS_OS_PROBEis nowcmd.exe /c echo %OS%. This is the form the reporter confirmed works.isWindowsOsAnswer()trims the answer and ignores one leading or trailing quote. All threeWindows_NTcomparisons inremote-platform.tsnow use it. Theunamefallback is unchanged.RemotePlatformError, a subclass ofErrorwith the same messages.probe()uses its bounded message as the hint, so a detection failure no longer looks like an SSH outage.structure/remote-link.mdnow use the new probe literal.Tests:
isWindowsOsAnswer. It acceptsWindows_NT,Windows_NT\r\nandWindows_NT"\r\n, and rejects unrelated output./api/link/probesucceeds when cmd answersWindows_NT"\r\n. When platform detection fails (localizedunamerefusal), it returns 502 with the hintRemote platform could not be determined.bun teston the link argv, explicit-route, confirm-pin, enrollment, enrollment-operation, management-routes, cleanup, child-ops and sync-fanout test files: 380 pass, 0 fail.bun x tsc --noEmitis clean. I did not run the fullbun run test, because the machine is small.Not changed:
Link management request failed (502).errorCodeBodyalready keepscodeandhinton the error, but changing what the CLI prints is a separate decision.Fixes #8972
This change was prepared with an AI coding agent (Claude) and reviewed by me before submitting. I'm happy to make any changes you'd like.
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit