Repository navigation
ci(ssh): Windows SSH-host lanes (inbox + preview OpenSSH) for the pinned relay - #24180
Conversation
|
| // Every slot file the relay loads, the Windows bundled ConPTY pair included, landed beside it. | ||
| for (const file of pinnedRelayAddonFiles(target)) { | ||
| expect(await observer.isFile(`${first.deployed.remoteRelayDir}/${file}`), file).toBe(true) | ||
| } |
There was a problem hiding this comment.
Slot bytes go unchecked The test compares the uploaded
node.exe against its expected SHA-256, but checks the slot files only for existence. A file with incorrect bytes can therefore pass this integrity check if the terminal probe does not use it. Comparing the remote files with the verified local artifacts would make the result meaningful.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Important
One must-fix bug: in inbox mode the provisioning script reuses $name, so both inbox jobs fail before any relay cell runs (details inline).
Reviewed changes
This run read the full 27-file diff (base OrcaWin/node-rt-p2-winhard, head eeee1400).
- Windows SSH-host lane — new
.github/workflows/ssh-windows-hosts.yml(windows-2022/windows-11-arm× inbox/preview OpenSSH) and the PowerShell provisioning harness inconfig/ci/windows-ssh-provider/, driven byssh-relay-windows-host-lane.test.tsagainst a private loopback sshd. - Hostile-host Docker matrix — new
.github/workflows/ssh-hostile-hosts.yml, the cell table and ladder-outcome assertions (ssh-hostile-host-cells.ts), a host-agnostic driver (ssh-hostile-host-test-harness.ts) and the Docker fixture/observer. - Windows session command audit —
ssh-session-command-audit.tsdecodes each deploy command and fails a pinned deploy that emittedAdd-Type. - Runtime refusal reclassification (production) —
ssh-relay-runtime-self-test.tsnow checks the missing-library markers beforeError relocating|symbol not found, so a musl host missinglibstdc++.so.6classifies asmissing_librather thanwrong_libc; the newit.eachrow pins it. - Partial orcad template —
build-orcad-template.mjsgains--targets <subset>for CI jobs that fill only some prebuild slots, andverify-packaged-orcad-template.cjsnarrows its inventory to the same subset while still defaulting to every target for packaging.
ℹ️ A skipped lane is green
ssh-relay-windows-host-lane.test.ts:41 wraps the whole suite in describe.runIf(RUN), and invoke-pinned-relay-cells.ps1:67-71 only inspects the vitest exit code. Running the file without ORCA_RUN_SSH_WINDOWS_HOST=1 yields 1 skipped and exit 0, so a future rename of that env var (or of the recording config) would leave the job green with zero pinned-node.exe assertions. The hostile-host matrix has the same all-skip-to-green shape via its per-cell it.skipIf. Asserting at least one test executed, or requiring the per-cell receipt, would make the lane fail closed.
Technical details
# Windows lane can pass without executing its assertions
## Affected sites
- `src/main/ssh/ssh-relay-windows-host-lane.test.ts:38,41` — `RUN` gate + `describe.runIf`
- `config/ci/windows-ssh-provider/invoke-pinned-relay-cells.ps1:67-71,89` — captures only `$LASTEXITCODE`; the per-cell receipt written at `ssh-relay-windows-host-lane.test.ts:99` is never required
- `src/main/ssh/ssh-relay-hostile-hosts.docker.test.ts:50` — `it.skipIf` per cell
## Required outcome
- A cell that is expected to run and does not (env wiring regression, all cells filtered out, recording config renamed) must fail the job rather than report success.DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| } | ||
|
|
||
| export function parseWindowsHostCellDescriptor(text: string): WindowsHostCellDescriptor { | ||
| const parsed: unknown = JSON.parse(text.replace(/^/u, '')) |
There was a problem hiding this comment.
This regex literal embeds a raw U+FEFF after ^ — an invisible character that matches today but is easy for an editor or formatter to strip, which would silently stop the descriptor BOM being trimmed. Prefer the explicit escape \uFEFF.
There was a problem hiding this comment.
ℹ️ The new commit is a correct fix, but the previously reported inbox
$namereuse is still present, and the self-test added here does not cover it.
Reviewed changes
This run re-reviewed the delta since the prior Pullfrog review (eeee1400 → 2675f0f9, 2 files).
- Private-account list rename —
prove-preview-openssh.ps1renames the account list to$ownedAccountsso it no longer collides with the case-insensitive[int]$Accountsparameter, which had made every Windows host job die before provisioning. - Parameter-shadowing self-test —
test-preview-diagnostics.ps1now parses both provisioning scripts and fails when a script-scope assignment rebinds a typed parameter.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| foreach($script in @($ast,[Management.Automation.Language.Parser]::ParseFile((Join-Path $PSScriptRoot '../invoke-pinned-relay-cells.ps1'),[ref]$null,[ref]$null))){ | ||
| $params=@($script.ParamBlock.Parameters | ForEach-Object {$_.Name.VariablePath.UserPath}) | ||
| $shadows=@($script.FindAll({param($node) $node -is [Management.Automation.Language.AssignmentStatementAst] -and $node.Left -is [Management.Automation.Language.VariableExpressionAst]},$true) | Where-Object { | ||
| $parent=$_.Parent;while($parent -and $parent -isnot [Management.Automation.Language.FunctionDefinitionAst] -and $parent -isnot [Management.Automation.Language.ScriptBlockExpressionAst]){$parent=$parent.Parent} | ||
| -not $parent -and $_.Left.VariablePath.UserPath -in $params | ||
| } | ForEach-Object {$_.Left.VariablePath.UserPath}) | ||
| if($shadows.Count){throw "Script-scope assignment rebinds a typed param: $($shadows -join ', ')"} | ||
| } |
There was a problem hiding this comment.
This self-test only rejects a script-scope assignment that shadows a typed parameter, so it still passes with the reported inbox bug present. prove-preview-openssh.ps1:185 reuses $name (the private account name set at line 46) as the inbox native-input loop variable, leaving $name = 'sftp-server.exe' for the later $sshArgs (line 307), the SFTP preflight (line 348) and the host-cell probe (line 355) — logins that AllowUsers rejects. $name is not a parameter, so nothing here catches it. Either rename the inbox loop variable or broaden the AST check; the inbox lanes stay broken until then.
Technical details
# Self-test scope misses the live `$name` reuse
## Affected sites
- `config/ci/windows-ssh-provider/preview-ssh/prove-preview-openssh.ps1:185` — `foreach($name in @('sshd.exe','ssh.exe','ssh-keygen.exe','sftp.exe','sftp-server.exe'))` clobbers the `$name` set at line 46. In inbox mode the loop ends on `sftp-server.exe`, so `$sshArgs` (line 307), `"[email protected]"` (line 348) and `& $ProductionRouteProbe $name ...` (line 355) all authenticate as `[email protected]`.
- `config/ci/windows-ssh-provider/preview-ssh/test-preview-diagnostics.ps1:6-13` — the new check compares assignment names against `$script.ParamBlock.Parameters` only.
## Required outcome
- Inbox provisioning must authenticate as the created `orca*` account, not `sftp-server.exe`, and a regression must fail the self-test.
## Suggested approach (optional)
- Rename the inbox loop variable (e.g. `$nativeName`); optionally extend the self-test to flag a `foreach` variable that is read after its loop changes role.| $userEnvironment="Registry::HKEY_USERS\$($account.sid)\Environment" | ||
| if(-not (Test-Path -LiteralPath $userEnvironment)){throw 'Private account hive not loaded after its SSH logon'} | ||
| $userPath=(Get-Item -LiteralPath $userEnvironment).GetValue('Path','',[Microsoft.Win32.RegistryValueOptions]::DoNotExpandEnvironmentNames) | ||
| New-ItemProperty -LiteralPath $userEnvironment -Name Path -PropertyType ExpandString -Value ((@($shimDir)+@($userPath -split ';' | Where-Object {$_})) -join ';') -Force | Out-Null |
There was a problem hiding this comment.
Profile hive may be unavailable
If Windows unloads the private account’s profile after the one-shot SSH login exits, its registry hive will no longer be mounted when this check runs. The check then throws before any relay cells run, failing the Windows host job. Keep the profile loaded while setting its PATH, or set it before the login ends.
There was a problem hiding this comment.
Important
The new ACL-based toolchain hiding rests on a per-file property the script never controls, and its only self-check cannot detect the gap (details inline).
Reviewed changes
This run re-reviewed the delta since the prior Pullfrog review (2675f0f9 → d232297f, one file).
- Toolchain hiding moved from PATH to ACLs —
prove-preview-openssh.ps1drops the per-serviceEnvironmentPATH and instead denies the private accounts read+execute on every machine PATH directory holding a hidden tool, on the premise that Win32-OpenSSH rebuilds each session'sPATHfrom the machine and user registry. - Per-user shim PATH — after the account's first SSH logon the shim directory is prepended to
HKEY_USERS\<sid>\Environment\Path, so the logging shims still resolve. - Deny cleanup — the
finallycleanup removes the deny ACEs (icacls /remove:d) before removing the accounts. - SSH-client diagnostic excerpts — a new
Diagnostic-Excerptadds the last failing lines of ssh/sftp stderr and the sshd log tail to the receipt.
The previously reported inbox $name reuse (prove-preview-openssh.ps1:190) is unchanged by this commit and its thread remains open.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| foreach($directory in $hidden){ | ||
| Invoke-Bounded icacls.exe (@($directory.TrimEnd('\'),'/deny')+@($ownedAccounts | ForEach-Object {"*$($_.sid):(OI)(CI)RX"})) 120 | Out-Null | ||
| $deniedToolDirs.Add($directory) |
There was a problem hiding this comment.
The deny is applied to the directory only, so on each executable it lands as an inherited ACE — and Windows orders explicit ACEs before inherited ones, meaning any pre-existing explicit allow on the file wins. SeChangeNotifyPrivilege (granted to Everyone by default) also lets the account open node.exe by exact path even though the directory's Read is denied, and the where node.exe self-check exercises only resolution, so it can pass while execution still succeeds. Note that node has no shim here — the shim loop iterates $HiddenTools while node is only added to the deny computation — so for node.exe the ACL is the sole control, and it is contingent rather than guaranteed.
Technical details
# Directory-scoped deny does not reliably hide executables
## Affected sites
- `config/ci/windows-ssh-provider/preview-ssh/prove-preview-openssh.ps1:291-293` — deny is applied to `$hidden` *directories* with `(OI)(CI)RX`; files receive it as an inherited ACE.
- `config/ci/windows-ssh-provider/preview-ssh/prove-preview-openssh.ps1:342-350` — the only proof is `where node.exe`, i.e. command resolution, not execution.
- `config/ci/windows-ssh-provider/preview-ssh/prove-preview-openssh.ps1:279,287` — `node` is added to the deny computation (`$HiddenTools+@('node')`) but no `node.cmd` shim is written (the shim loop iterates `$HiddenTools`), so for `node.exe` the ACL is the sole control.
## Required outcome
- A private account must be unable to execute any host toolchain binary on the machine PATH, and a regression in that property must fail the run rather than pass via resolution-only probing.
## Suggested approach (optional)
- Apply the deny to each resolved executable (`icacls <file> /deny *<sid>:RX`) so it is an explicit deny on the target object, and add `/T` on cleanup.
- Or assert execution (spawn the tool / open it by exact path) instead of `where`, and cover the other hidden tools as well as `node`.
## References
- Order of ACEs in a DACL: https://learn.microsoft.com/en-us/windows/win32/secauthz/order-of-aces-in-a-dacl
- icacls canonical order: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/icacls
- Automatic propagation ("Directly applied ACEs have precedence over inherited ACEs"): https://learn.microsoft.com/en-us/windows/win32/secauthz/automatic-propagation-of-inheritable-aces
- Bypass traverse checking / `SeChangeNotifyPrivilege`: https://learn.microsoft.com/en-us/windows/win32/secauthz/privilege-constantsThere was a problem hiding this comment.
✅ No new issues found in this delta. It is not an approval: the inbox
$namereuse and the ACL toolchain-hiding gap from the earlier reviews are still open and unchanged.
Reviewed changes
This run re-reviewed the delta since the prior Pullfrog review (d232297f → eb40cb1b, three files across two commits).
- Upload root resolved before the containment check —
sftp-upload.tsadds a fifth-positionrootparameter, resolves it once withrealpath, and recurses through a new internaluploadDirectoryWithinRootso a root named via a symlink, junction, or Windows 8.3 short name (RUNNER~1in TEMP) no longer rejects every entry as escaped. Newsftp-upload.test.tsregression pins the symlink-alias root and fails without the fix. - One
authorized_keysfile per account —prove-preview-openssh.ps1writesauthorized_keys_<account>readable only by that account and pointsAuthorizedKeysFileatauthorized_keys_%u, because inbox sshd 8.1 rejects a keys file any other account can read. - Vitest exit code read from the global scope —
invoke-pinned-relay-cells.ps1reads$global:LASTEXITCODEso the workflow'sGetNewClosurecallback does not compare a stale captured copy.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| if($wmi.beforeGrant -ne '0'){ | ||
| Write-Host "::warning::Standard SSH user cannot launch through WMI Win32_Process.Create ($($wmi.beforeGrant)); Orca's Windows relay launch needs it. Granting the cell accounts Remote Enable on root\cimv2 so the remaining assertions run." | ||
| Grant-CellWmiLaunch @($Context.accounts[0..($Cells.Count-1)] | ForEach-Object {(Get-LocalUser -Name $_.name).SID.Value}) | ||
| $wmi.granted=$true | ||
| $wmi.afterGrant=Test-PrivateWmiLaunch $Context.accounts[0].name | ||
| if($wmi.afterGrant -ne '0'){throw "WMI launch still refused after the grant ($($wmi.afterGrant))"} |
There was a problem hiding this comment.
WMI fallback masks launch failure If a standard SSH account cannot call
Win32_Process.Create, this branch grants it WMI access and then runs the relay cells. The jobs can pass even though Orca's unmodified Windows relay launch would fail for that account, so the CI verdict no longer proves the intended standard-account behavior.
Knowledge Base Used: Remote connectivity and execution
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
ℹ️ No new blockers in this delta — the inbox
$namefix is correct. One question inline about the WMI grant; the earlier ACL and self-test threads remain open.
Reviewed changes
This run re-reviewed the delta since the prior Pullfrog review (eb40cb1b → 059ea5d0, two files).
- Inbox account name no longer clobbered —
prove-preview-openssh.ps1renames the inbox native-input loop variable to$binary, so$namekeeps the private account name for$sshArgs, the SFTP preflight and the production-route probe. This closes the round-1 blocker that would have failed both inbox cells. - WMI relay-launch gap surfaced and granted —
invoke-pinned-relay-cells.ps1probesWin32_Process.Createas a standard SSH user, emits a::warning::and grants the cell accountsWBEM_ENABLE | WBEM_METHOD_EXECUTE | WBEM_REMOTE_ACCESSonroot\cimv2when refused, re-probes, and restores the original namespace SD infinally.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| $wmi=@{beforeGrant=(Test-PrivateWmiLaunch $Context.accounts[0].name);granted=$false} | ||
| if($wmi.beforeGrant -ne '0'){ | ||
| Write-Host "::warning::Standard SSH user cannot launch through WMI Win32_Process.Create ($($wmi.beforeGrant)); Orca's Windows relay launch needs it. Granting the cell accounts Remote Enable on root\cimv2 so the remaining assertions run." | ||
| Grant-CellWmiLaunch @($Context.accounts[0..($Cells.Count-1)] | ForEach-Object {(Get-LocalUser -Name $_.name).SID.Value}) |
There was a problem hiding this comment.
The relay's Windows launch is exactly this Win32_Process.Create call (ssh-relay-deploy.ts:2544) and has no non-WMI fallback, so granting WBEM_REMOTE_ACCESS here means a green lane proves the relay works once an admin has widened root\cimv2, not on the stock host the lane otherwise models. Is the Remote Enable grant an expected, documented part of the Windows SSH-host setup, or should the relay work without it?
Technical details
# The WMI grant makes the lane's stock-host premise conditional
## Affected sites
- `config/ci/windows-ssh-provider/invoke-pinned-relay-cells.ps1:76-83` — probes `Win32_Process.Create` as a standard SSH user; if refused, grants `0x23` on `root\cimv2` for the cell SIDs and re-probes.
- `src/main/ssh/ssh-relay-deploy.ts:2517,2544` — the production Windows launch is `Invoke-CimMethod ... Win32_Process.Create`; there is no non-WMI launch path (the `windows-pipe` tests probe a pipe, they do not launch one).
## Required outcome
- A conscious decision on whether a Windows SSH host must grant the SSH account Remote Enable on `root\cimv2` before Orca can deploy the relay, and if so, where that prerequisite is documented.
## Open questions for the human
- If stock hosts lack the grant, this lane cannot certify the Windows relay on a stock host; is that acceptable as long as the receipt's `standardUserWmiLaunch` records the grant?
- Should the receipt/warning be elevated to a job annotation or summary so a green run is not read as stock-host support?There was a problem hiding this comment.
✅ No new issues found in this delta. Not an approval — the ACL toolchain-hiding gap, the self-test scope gap and the
U+FEFFnit from earlier reviews are still open and unchanged.
Reviewed changes
This run re-reviewed the delta since the prior Pullfrog review (059ea5d0 → 9d57017, two commits).
- Terminal session held open through GC —
assertTerminalEchoesnow returns the multiplexer's disposer instead of closing it, so the first PTY session keeps sending keepalives whileassertGcKeepsInUseRuntimeruns and the relay is not reaped as silent; the probe is re-sent every 15s and the first Windows PowerShell start budget rises from 60s to 90s. - Relay logs captured into receipts —
invoke-pinned-relay-cells.ps1copies each cell account's.orca-remote\relay-*\relay*.logfiles into the receipt root after the vitest run, so a failed cell retains the relay's own close reason.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found in this delta. Not an approval — the ACL toolchain-hiding gap, the self-test scope gap, and the
U+FEFFnit from earlier reviews remain open and unchanged.
Reviewed changes
This run re-reviewed the delta since the prior Pullfrog review (9d57017 → a843084, one commit, two files).
- Peer-ended relay socket detaches before destroy —
relay-reconnect-listener.tsextractsdetachSocketClientand calls it from the socketendhandler beforesocket.destroy(), withhandleSocketClosereusing the same helper (second call is a map-lookup no-op). This removes the window where a relay write failing betweenendandcloseclosed the client aslocal, holding its PTY owner for the full grace instead of the short peer-closed floor. - Regression test —
relay-reconnect-listener-peer-end.test.tscompletes a handshake, ends the client, and asserts the dispatcher receivedpeer-closedby the timeendreturns; verified it fails (detached: []) with the detach removed.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found. Not an approval — the ACL toolchain-hiding gap, the self-test scope gap, the
U+FEFFnit and the WMI-grant question from earlier reviews remain open and unchanged.
Reviewed changes
This run re-reviewed the delta since the prior Pullfrog review (a843084 → 859eb85, one commit, one file).
- Peer-end test now drives a real dispatcher —
relay-reconnect-listener-peer-end.test.tsreplaces itsas unknown as RelayDispatchercast stub with a realRelayDispatcher(() => true), subscribes throughonClientDetached, and disposes the dispatcher inafterEach, so the assertion exercises the dispatcher's own detach and close-cause path instead of a hand-rolled fake. Verified locally: the test passes with theend-handler detach and fails (detached: []) without it.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
92e345a to
2acf5e5
Compare
Copied unchanged from origin/OrcaWin/np-windows-ssh-provider-diagnostic (config/ci/windows-ssh-provider/preview-ssh/ at 1242f3c, commits 78b3857, c24adcc, 069aa7b): a private LocalSystem sshd service on 127.0.0.1 for a dedicated standard user, either the Microsoft-signed Win32-OpenSSH 10.0.0.0p2-Preview ZIP (archive and every binary pinned by sha256) or the inbox OpenSSH.Server capability binaries. The following commits extend it for the pinned-Node relay host lanes.
The Docker matrix drove the relay deploy and inspected the container with inline docker exec calls, so no other host could reuse it. Split it into: - ssh-hostile-host-test-harness.ts: the deploy, ladder observation, terminal echo (per-shell probe), runtime reuse and GC-keeps-in-use assertions, now also capturing every command the deploy sent the host. - ssh-hostile-host-observer.ts: how a driver inspects the host outside SSH; docker exec for containers, the local filesystem for a loopback host. - a legacy_opt_out outcome: the ladder never runs and nothing enters the pinned store, whatever the host-Node path does. Launched cells now also check the runtime's sha256 on the host and that every slot file (the Windows bundled ConPTY pair included) landed in the relay dir.
Phase 2 exit gate, Windows half: the real deployAndLaunchRelay through a real SshConnection against Win32-OpenSSH on 127.0.0.1, on windows-2022 (x64) and windows-11-arm (arm64), for both the inbox OpenSSH.Server capability and the Microsoft-signed 10.0.0.0p2-Preview release (ZIP; archive and each binary pinned by sha256 and Authenticode, as in the imported harness). Builds on the provisioning harness from origin/OrcaWin/np-windows-ssh-provider-diagnostic (previous import commit): - one private standard account per cell, so every cell starts from an empty runtime store; - -HiddenTools: the private sshd service's own Environment carries a PATH without any machine PATH entry holding node/npm/compilers, led by logging .cmd shims; a session probe fails the job if node.exe still resolves; - DefaultShell set per cell by invoke-pinned-relay-cells.ps1 and restored at cleanup (dispatch proven per cell via %COMSPEC%). Cells (src/main/ssh/ssh-windows-host-cells.ts): pinned-cmd (stock sshd), pinned-powershell (DefaultShell = Windows PowerShell) expect rung A on the pinned node.exe with the relay self-test passing, terminal echo, runtime reuse, GC keeping the in-use runtime, stage identity through node.exe and no Add-Type in any decoded session command; legacy-opt-out expects the ladder never to run and an untouched pinned store.
…rData teardown Join-Path throws on a machine PATH entry naming a drive the runner lacks, which would abort provisioning before any cell ran; the toolchain split now probes with [IO.File]::Exists over [IO.Path]::Combine, and the self-test covers an absent drive. The hostile-host harness removes its throwaway userData with removeTreeSync so a transient Windows lock cannot fail the lane's afterAll.
PowerShell variable names are case-insensitive, so $accounts=[List[hashtable]] assigned into the [int]$Accounts parameter and every Windows host job died before provisioning. Rename the list and make the provisioning self-test reject script-scope assignments that shadow a param.
…e service PATH Win32-OpenSSH builds a session's PATH from the machine and user registry values, so the private service's Environment never reached SSH sessions and host node.exe stayed visible. Deny the private accounts the toolchain PATH directories, put the logging shims on each account's own PATH, and record failing sshd and client log lines so a refused login is diagnosable from the receipt.
uploadDirectory compared each entry's realpath against the root as given, so a root reached through a symlink, junction or Windows 8.3 short name (C:\Users\RUNNER~1 in TEMP) rejected every entry as escaped and the pinned runtime upload never started.
… own keys file The cells script read $LASTEXITCODE under the workflow's GetNewClosure callback, which sees a stale captured copy, so failed cells reported exit 0 and the job passed. Read the global value. Inbox sshd 8.1 checks authorized_keys with read_ok=0, refusing a file other accounts can read; use one keys file per account via %u.
…launch gap The inbox binary-verification loop reused $name, so later SSH and SFTP probes logged in as 'sftp-server.exe'. Before the cells run, probe whether a standard SSH user can call WMI Win32_Process.Create (the Windows relay launch path); when refused, warn and grant the cell accounts Remote Enable on root\cimv2 for the run so the remaining assertions execute.
…gh GC The hostile-host driver disposed the first session's multiplexer before the GC and reconnect steps, so a slow Windows GC let the relay reap the silent owner as 'local' and the reconnect then waited out the full owner grace. Keep the session live until the connection closes, as the app does, and resend the terminal probe until the shell evaluates it: ConPTY PowerShell can drop typeahead sent before its first prompt.
…oying it The listener destroyed a socket on 'end' but detached its client only on 'close'. A relay write in that window failed with 'Relay socket is closed', and the dispatcher closed the client as 'local', so its PTY owner kept the full 30s grace instead of the peer-closed floor and a quick reconnect was refused. The Windows host lanes logged this race on the named-pipe endpoint.
…instead of a cast stub The stub was an unchecked 'as unknown as RelayDispatcher' that failed the changed-code casting gate.
859eb85 to
c2ecb2c
Compare
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (23)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe changes add Windows SSH host CI for x64 and ARM64 with inbox and preview OpenSSH, plus scripts and tests for provisioning and relay host cells. They add shared helpers and observer support for hostile-host tests. They also preserve resolved roots during recursive SFTP uploads and detach relay clients when sockets end. Priority: ➖ Normal Merge Risk: 🔵 Low · up to This change adds Windows SSH host CI and makes two small runtime adjustments that appear correct. The remaining concern is a process decision: the Windows lane grants standard users WMI launch access when they lack it. A passing run therefore may not prove the relay works on an unmodified Windows host. Owners should accept or document this before relying on the lane as a release gate. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new tests create privileged machine state, but connections are local and key-authenticated, and repository permissions are read-only. No introduced authentication bypass was identified. Interrupted cleanup still depends on disposable test machines, and Windows-specific disconnect ordering remains incompletely validated. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 39.13% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 17 files. (6 skipped: 6 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
The upload-root realpath fix landed with #24180; this keeps macoshost's case where the root is passed explicitly beneath a symlinked parent.
…a symlinked root (#24179) * test(ssh): upload a root reached through a symlinked parent The upload-root realpath fix landed with #24180; this keeps macoshost's case where the root is passed explicitly beneath a symlinked parent. * ci(ssh): macOS hostile-host lane on a loopback user-level sshd Adds local-sshd cells for darwin-arm64 (macos-14) and darwin-x64 (macos-15-intel): a non-root sshd on 127.0.0.1 logs in as the runner user with SetEnv PATH=<shims>:/usr/bin:/bin:/usr/sbin:/sbin and an empty HOME, so no rc file restores Homebrew. The driver asserts rung A, terminal echo, cached runtime reuse, GC keeping the in-use runtime, no toolchain or xattr calls, and that the SFTP-uploaded Node carries no quarantine and runs as uploaded. Docker cells are unchanged; each machine runs only cells it can host. * test(ssh): fail a hostile-host run that would skip every named or hostable cell A cell named for the wrong OS or arch was silently skipped, so a macOS job on a mismatched runner went green having deployed nothing. Named cells must now be hostable here, and a gated run must select at least one cell. --------- Co-authored-by: m4air <[email protected]>

ELI5
This adds CI tests that use Windows runners (x64 and arm64) as SSH hosts, with both the inbox and the preview OpenSSH servers. Each one checks that Orca's pinned
node.exerelay installs and works with no Node, npm or compiler on the SSH path.What Changed
ssh-windows-hosts.yml: 4 jobs covering {windows-2022, windows-11-arm} × {inbox, preview}. It runs on path-filtered, non-draft PRs and on manual dispatch.OrcaWin/np-windows-ssh-provider-diagnostic(attributed in the commit) and extends it:.cmdstand-ins first.node.exe;conpty.dll;node.exeand the slot files.Why
This covers the Windows part of the Phase 2 exit gate (preview and inbox OpenSSH) on CI runners, without the shared awin machine.
Linked Issue
Part of the Node runtime plan (Phase 2). Stacked on #24149.
Visual Proof
N/A. This is CI only.
Testing
The new pieces have unit tests and parse checks.
Fixed in review: PATH entries on drives that don't exist, and removing temporary folders with the Windows-safe helper.
Green on all 4 jobs (run 36759401774): x64 and arm64, each with inbox and preview OpenSSH.
Fixed along the way:
authorized_keysfor the inbox 8.1 server, and a stale$LASTEXITCODE.endrecorded as a local close.Open decision: standard Windows users can't launch the relay, because WMI
Win32_Process.Createis denied without Remote Enable. The lane grants that for the run and warns. We need to decide whether to keep the grant or fail the lane until the launch path is fixed.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.