Skip to content

build(release): compile the Windows relay process-table addon - #20809

Merged
nwparker merged 2 commits into
mainfrom
nwparker/release-win-relay-process-table-addon
Sep 15, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/release-win-relay-process-table-addon

Conversation

@nwparker

@nwparker nwparker commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​17 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​17

What

No stable release has ever shipped windows-process-tree.node to a Windows relay host.

#16598 added config/scripts/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 by that commit or any since, and stageWindowsProcessTreeAddon only console.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.exe from three releases and listed resources/relay/win32-*:

Release Date windows-process-tree.node
v1.4.191 (first stable carrying #16598) 2026-08-28 absent
v1.4.198 2026-09-08 absent
v1.4.203 2026-09-15 absent

Absent in both win32-x64 and win32-arm64 in 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.exe spawn 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

  • Same windows-2022 runner image as dev-channel-win-build.yml, so the optional MSVC ARM64 cross toolset the arm64 leg needs is already proven on it.
  • The addon build runs before the long packaging step, so a runner image missing that component fails in seconds with MSB8020 naming it rather than deep into packaging.
  • ORCA_REQUIRE_RELAY_NATIVE_ADDONS is scoped to the win leg via a matrix expression; the other legs get '', which build-relay.mjs filters to an empty required list.

#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.
@coderabbitai

coderabbitai Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: accbdecf-41ca-47c8-8230-e4ac5d5a42fa

📥 Commits

Reviewing files that changed from the base of the PR and between 14d7fe6 and 51235d3.

📒 Files selected for processing (1)
  • .github/workflows/release-cut.yml

📝 Walkthrough

Walkthrough

The Windows release workflow now compiles the process-table relay native addon for x64 and arm64 before building application artifacts. Windows release builds set ORCA_REQUIRE_RELAY_NATIVE_ADDONS to require both addons. Non-Windows release builds leave this variable empty.

Merge Risk: ⚪ Minimal · up to 14d7f

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)

Check name Status Explanation Resolution
Description check ⚠️ Warning 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 wi… 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 Disclosu…
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: compiling the Windows relay process-table addon during release builds.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Full details: Description check

Explanation

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.

  • Fix all pre-merge checks with AI

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.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 builds windows-process-tree.node for x64 and arm64 before pnpm build:release, mirroring dev-channel-win-build.yml.
  • Gate the Windows relay on the addon — sets ORCA_REQUIRE_RELAY_NATIVE_ADDONS: x64,arm64 on the win leg only, so build-relay.mjs throws 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:25 still says the addon is "built only by dev-channel-win-build.yml, so no release carries it" — no longer true once this lands.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread .github/workflows/release-cut.yml Outdated
Comment on lines +1332 to +1337
- 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@nwparker
nwparker merged commit 37394e9 into main Sep 15, 2026
26 of 27 checks passed
ivanvykopal pushed a commit to ivanvykopal/orca that referenced this pull request Sep 20, 2026
…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.
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