Repository navigation
build(release): compile the Windows relay process-table addon - #20809
Conversation
#16598 added build-windows-process-tree-relay-addon.mjs and the ORCA_REQUIRE_RELAY_NATIVE_ADDONS gate, but wired both into dev-channel-win-build.yml only. release-cut.yml was never touched, and stageWindowsProcessTreeAddon merely logs when the addon is absent, so every stable release has shipped Windows relays without windows-process-tree.node. Confirmed by extracting the installers: v1.4.191 (the first stable carrying the feature), v1.4.198 and v1.4.203 all have no windows-process-tree.node in relay/win32-x64 or relay/win32-arm64. Those hosts have been taking the CIM fallback the whole time — 1247ms and a powershell.exe per scan against 57ms native, on #16598's own ~1490-process measurement host. Mirror the dev-channel steps. Same windows-2022 image, so the MSVC ARM64 cross toolset the arm64 leg needs is already proven there, and the addon build runs before the long packaging step so a missing component fails in seconds with MSB8020 naming it.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Windows release workflow now compiles the process-table relay native addon for x64 and arm64 before building application artifacts. Windows release builds set Merge Risk: ⚪ Minimal · up to The release workflow supplies the required Windows relay addons without changing non-Windows fallback behavior, so no merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description clearly explains the problem, impact, evidence, implementation, and rationale. It does not follow the required template because it omits or does not complete ELI5, Why, Linked Issue with a Fixes reference, Visual Proof or an explicit N/A statement, Testing, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections. Resolution Add the missing template sections. Include an ELI5 explanation, a Why section, a linked issue using the required Fixes # format, Visual Proof with N/A and a reason if no visual change exists, testing steps and platform coverage, AI Disclosure details or the applicable exemption, Review, Agent skill upstream boundary, Notes, and the completed Checklist.
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 |
There was a problem hiding this comment.
Important
The new addon step assumes the checked-out tag contains config/scripts/build-windows-process-tree-relay-addon.mjs. The build job checks out the release tag while the workflow file is resolved from the dispatch ref, and it restores only .github/actions from ${{ github.workflow_sha }} — so a cherry-pick or hotfix tag that predates #16598 now fails the Windows leg with MODULE_NOT_FOUND, where the cut previously succeeded without the addon.
Reviewed changes
- Compile the Windows relay process-table addon in the release cut — adds a
matrix.platform == 'win'step that buildswindows-process-tree.nodefor x64 and arm64 beforepnpm build:release, mirroringdev-channel-win-build.yml. - Gate the Windows relay on the addon — sets
ORCA_REQUIRE_RELAY_NATIVE_ADDONS: x64,arm64on the win leg only, sobuild-relay.mjsthrows if either arch is missing instead of logging the PowerShell fallback.
ℹ️ macOS and Linux clients still deploy an addon-less Windows relay
build:relay emits out/relay/win32-* on every host, but only a Windows runner can compile the addon, and all three electron-builder targets package the whole out/relay tree. The macOS (release-mac-build.yml) and Linux (release-cut) installers therefore still ship resources/relay/win32-* without windows-process-tree.node, and a mac/Linux client that deploys a relay to a Windows SSH host still takes the PowerShell fallback. The addon reaches Windows hosts only from the Windows installer.
Technical details
# Scope: which installers carry the addon
## Affected sites
- `config/electron-builder.config.cjs:102-107` — `commonExtraResources`, used by the mac, linux, and win targets, copies all of `out/relay`.
- `.github/workflows/release-mac-build.yml:116` and `.github/workflows/release-cut.yml:1340` — both run `pnpm build:release` (whose first step is `build:relay`); only the win leg builds the addon.
- `src/main/ssh/ssh-relay-deploy.ts:1655-1674` — the deployed relay is resolved from the client's own `resources/relay/<platform>`.
## Open questions for the human
- Is Windows-client-to-Windows-host the intended scope, or should the mac/Linux legs receive the compiled addon from the Windows leg (e.g. an artifact upload/download) so a mac/Linux client deploying to a Windows host also gets the fast path?️ Nitpicks
src/relay/windows-port-scan.ts:25still says the addon is "built only by dev-channel-win-build.yml, so no release carries it" — no longer true once this lands.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| - name: Build Windows process-table addon for the relay | ||
| if: matrix.platform == 'win' | ||
| shell: bash | ||
| run: | | ||
| node config/scripts/build-windows-process-tree-relay-addon.mjs --arch=x64 | ||
| node config/scripts/build-windows-process-tree-relay-addon.mjs --arch=arm64 |
There was a problem hiding this comment.
This runs against the checked-out tag, not the dispatch ref: build checks out refs/tags/${{ needs.cut.outputs.tag }} and restores only .github/actions from the workflow ref, so a cherry-pick/hotfix tag predating #16598 has no config/scripts/build-windows-process-tree-relay-addon.mjs and the Windows leg dies with MODULE_NOT_FOUND. The golden and skill-sharing jobs already restore their harnesses from ${{ github.workflow_sha }} for exactly this reason.
Technical details
# Old-ref release cuts fail before building
## Affected sites
- `.github/workflows/release-cut.yml:1332-1337` — invokes a script the checked-out tag may not contain.
- `.github/workflows/release-cut.yml:1350` — `ORCA_REQUIRE_RELAY_NATIVE_ADDONS` is set for every win-leg cut, so there is no fallback path.
## Context
- `build` checks out `refs/tags/${{ needs.cut.outputs.tag }}` (line 1191) while the workflow file comes from the dispatch ref. Existing workflow-ref restores: `tests/e2e/*` (841-849), `src/main/skills/*` (955-963), `.github/actions` (1207-1222).
- `inputs.ref` accepts a branch/tag/SHA, and the workflow explicitly supports cherry-pick/hotfix tags.
- The addon also needs the pnpm patch (`config/patches/@vscode__windows-process-tree@0.8.0.patch`, wired through `pnpm-lock.yaml` `patchedDependencies`) at install time, so restoring the script alone onto an old tag would not yield a patched build.
## Required outcome
- Decide the intended behavior for a tag that predates the addon feature: restore the full feature (script, `config/scripts/windows-process-tree-gyp-rebuild.mjs`, patch, and lockfile) before `pnpm install`, or detect its absence and skip both the build and the `ORCA_REQUIRE_RELAY_NATIVE_ADDONS` gate with a notice naming the ref. Today the cut fails with an opaque module-resolution error.The new addon step landed between the ORCA_POSTHOG_WRITE_KEY / BUILD_IDENTITY / DIAGNOSTICS_TOKEN_URL comment block and the Build app step it documents, orphaning it. Move the step above the block and record why it carries no run_attempt guard: Build app is ungated, so a guarded addon step would let a rerun reach the required-addon check with nothing staged.
…ai#20809) * build(release): compile the Windows relay process-table addon stablyai#16598 added build-windows-process-tree-relay-addon.mjs and the ORCA_REQUIRE_RELAY_NATIVE_ADDONS gate, but wired both into dev-channel-win-build.yml only. release-cut.yml was never touched, and stageWindowsProcessTreeAddon merely logs when the addon is absent, so every stable release has shipped Windows relays without windows-process-tree.node. Confirmed by extracting the installers: v1.4.191 (the first stable carrying the feature), v1.4.198 and v1.4.203 all have no windows-process-tree.node in relay/win32-x64 or relay/win32-arm64. Those hosts have been taking the CIM fallback the whole time — 1247ms and a powershell.exe per scan against 57ms native, on stablyai#16598's own ~1490-process measurement host. Mirror the dev-channel steps. Same windows-2022 image, so the MSVC ARM64 cross toolset the arm64 leg needs is already proven there, and the addon build runs before the long packaging step so a missing component fails in seconds with MSB8020 naming it. * build(release): keep the Build app env rationale attached to its step The new addon step landed between the ORCA_POSTHOG_WRITE_KEY / BUILD_IDENTITY / DIAGNOSTICS_TOKEN_URL comment block and the Build app step it documents, orphaning it. Move the step above the block and record why it carries no run_attempt guard: Build app is ungated, so a guarded addon step would let a rerun reach the required-addon check with nothing staged.

What
No stable release has ever shipped
windows-process-tree.nodeto a Windows relay host.#16598 added
config/scripts/build-windows-process-tree-relay-addon.mjsand theORCA_REQUIRE_RELAY_NATIVE_ADDONSgate, but wired both intodev-channel-win-build.ymlonly.release-cut.ymlwas never touched by that commit or any since, andstageWindowsProcessTreeAddononlyconsole.logs when the addon is missing — so the release build has silently produced relays without it since the feature landed.This mirrors the two dev-channel steps into the release build job.
Evidence
Extracted
orca-windows-setup.exefrom three releases and listedresources/relay/win32-*:windows-process-tree.nodeAbsent in both
win32-x64andwin32-arm64in all three. Also confirmed against an installed 1.4.201.Impact
Perf only, and not a regression — the fast path was never delivered, so hosts have always taken the CIM fallback that #16598 measured at 1247ms and a
powershell.exespawn per scan, against 57ms native on a ~1490-process Windows SSH host. No emergency release needed; this can ride the next scheduled cut.Why this shape
windows-2022runner image asdev-channel-win-build.yml, so the optional MSVC ARM64 cross toolset the arm64 leg needs is already proven on it.ORCA_REQUIRE_RELAY_NATIVE_ADDONSis scoped to the win leg via a matrix expression; the other legs get'', whichbuild-relay.mjsfilters to an empty required list.