Skip to content

fix(windows): keep windows-process-tree gyp paths absolute under pnpm - #16688

Merged
nwparker merged 2 commits into
mainfrom
nwparker/fix-windows-process-tree-gyp-path
Aug 26, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/fix-windows-process-tree-gyp-path

Conversation

@nwparker

@nwparker nwparker commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​38 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​38
Prod 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​76 $\color{#cf222e}{\Huge{\mathbf{−}}}$​24 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​52

ELI5

Hourly Windows builds have been red since we started compiling the process-table addon for the relay. node-gyp was looking for a helper file using a relative path that points outside the repo under pnpm, so the compile died before packaging even started. This makes that path absolute, the same way we already did for node-pty.

What Changed

  • Patch @vscode/windows-process-tree binding.gyp to use require.resolve('node-addon-api/node_addon_api.gyp') instead of require('node-addon-api').targets.
  • Refuse to compile the relay addon if that hunk is missing.
  • Pin the absolute path in a unit test and document the third patch hunk.

Why

require('node-addon-api').targets returns a path relative to cwd. On the Windows runner, node-gyp evaluates that from the pnpm store realpath, then loads the relative path from the node_modules/@vscode/windows-process-tree symlink. The result:

gyp: ..\..\..\..\[email protected]\node_modules\node-addon-api\node_addon_api.gyp not found
(cwd: D:\a\orca\orca\node_modules\@vscode\windows-process-tree)

Every Windows hourly since #16598 has failed at Build Windows process-table addon for the relay. Mac hourlies that looked green were skipping the Windows leg because main had not moved.

node-pty already carries this same require.resolve patch for the same pnpm/Windows reason.

Linked Issue

https://github.com/stablyai/orca/actions/runs/33017768410

Visual Proof

N/A — native-addon compile path for CI; no UI or interaction change.

Testing

  • Automated tests added/updated, or explained why not below
  • I manually tested these changes locally

pnpm exec vitest run --config config/vitest.config.ts config/scripts/windows-process-tree-gyp-path.test.mjs passes. The compile itself only runs on Windows; CI's build-hourly-win / Windows packaging jobs are the real proof.

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Windows-only native compile. SSH relays are the reason this addon is built in the hourly Windows job; the desktop app rebuilds it the same way.

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Hourly Windows builds have failed since #16598 at
`build-windows-process-tree-relay-addon`: `require('node-addon-api').targets`
is cwd-relative, so node-gyp evaluates it from the pnpm store realpath and
then loads it from the `node_modules` symlink. That resolves
`node_addon_api.gyp` outside the repo.

Use `require.resolve` for an absolute path, matching the node-pty patch.
@coderabbitai

coderabbitai Bot commented Aug 26, 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 Plus

Run ID: 09e20952-d964-40ce-b39f-62cbb910a4e5

📥 Commits

Reviewing files that changed from the base of the PR and between fe6ac15 and c7d653b.

📒 Files selected for processing (1)
  • src/renderer/src/i18n/locales/ja.json

Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The Windows process-tree patch now resolves the node-addon-api GYP file with require.resolve, removes Spectre mitigation settings, and enumerates processes without a 1024-process limit. The relay build script validates the absolute GYP path. New tests verify the patch and resolved path. Documentation describes the additional patch hunk and validation rule. Japanese skill labels now use “Agent” terminology.

Merge Risk: ⚪ Minimal · up to c7d65

This localized change makes the Windows native-addon build path absolute under pnpm and adds focused coverage; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is detailed and covers the change, rationale, testing, visual proof, and checklist. However, the Linked Issue section contains an Actions run URL instead of an issue reference. Replace the Actions run URL with the issue link or issue number that this pull request addresses, using the required format such as Fixes #123``.
Linked Issues check ⚠️ Warning The changes do not implement linked issue #39, which requires an “Add repo” action in the sidebar repo filter dropdown using addRepo(). Implement the “Add repo” dropdown action and its required behavior, or link this pull request to the issue that defines the Windows native-addon compilation fix.
Out of Scope Changes check ⚠️ Warning The Windows native-addon changes and Japanese localization updates are unrelated to linked issue #39, which covers the sidebar repo filter dropdown. Remove the unrelated Windows and Japanese localization changes, or correct the linked issue to match the actual scope of this pull request.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the primary Windows pnpm GYP-path fix.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 …
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)

  • 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.

#16682 merged with a failing localization catalog: ja used エージェント
in three new skill-filter strings, and repair-locale-catalog rewrites
those to Agent. Match the rest of ja.json so static analysis can pass.
@nwparker
nwparker requested a review from brennanb2025 as a code owner August 26, 2026 22:56
@nwparker

Copy link
Copy Markdown
Contributor Author

Pushed a second commit: #16682 merged with a failing verify:localization-catalog (ja skill-filter strings used エージェント where the catalog rewrites to Agent). Static analysis is required for verify, so those three strings now match the rest of ja.json.

The gyp-path fix is unchanged.

@nwparker
nwparker merged commit 0096e47 into main Aug 26, 2026
51 checks passed
@nwparker
nwparker deleted the nwparker/fix-windows-process-tree-gyp-path branch August 26, 2026 23:15
dallascrilley pushed a commit to dallascrilley/orca that referenced this pull request Aug 27, 2026
…stablyai#16688)

* fix(windows): keep windows-process-tree gyp paths absolute under pnpm

Hourly Windows builds have failed since stablyai#16598 at
`build-windows-process-tree-relay-addon`: `require('node-addon-api').targets`
is cwd-relative, so node-gyp evaluates it from the pnpm store realpath and
then loads it from the `node_modules` symlink. That resolves
`node_addon_api.gyp` outside the repo.

Use `require.resolve` for an absolute path, matching the node-pty patch.

* i18n: keep ja skill-filter labels on the catalog's Agent brand

stablyai#16682 merged with a failing localization catalog: ja used エージェント
in three new skill-filter strings, and repair-locale-catalog rewrites
those to Agent. Match the rest of ja.json so static analysis can pass.
rahuljangirworks pushed a commit to rahuljangirworks/veer that referenced this pull request Aug 27, 2026
…stablyai#16688)

* fix(windows): keep windows-process-tree gyp paths absolute under pnpm

Hourly Windows builds have failed since stablyai#16598 at
`build-windows-process-tree-relay-addon`: `require('node-addon-api').targets`
is cwd-relative, so node-gyp evaluates it from the pnpm store realpath and
then loads it from the `node_modules` symlink. That resolves
`node_addon_api.gyp` outside the repo.

Use `require.resolve` for an absolute path, matching the node-pty patch.

* i18n: keep ja skill-filter labels on the catalog's Agent brand

stablyai#16682 merged with a failing localization catalog: ja used エージェント
in three new skill-filter strings, and repair-locale-catalog rewrites
those to Agent. Match the rest of ja.json so static analysis can pass.
paidaxingyo666 pushed a commit to paidaxingyo666/Manta that referenced this pull request Aug 28, 2026
…stablyai#16688)

* fix(windows): keep windows-process-tree gyp paths absolute under pnpm

Hourly Windows builds have failed since stablyai#16598 at
`build-windows-process-tree-relay-addon`: `require('node-addon-api').targets`
is cwd-relative, so node-gyp evaluates it from the pnpm store realpath and
then loads it from the `node_modules` symlink. That resolves
`node_addon_api.gyp` outside the repo.

Use `require.resolve` for an absolute path, matching the node-pty patch.

* i18n: keep ja skill-filter labels on the catalog's Agent brand

stablyai#16682 merged with a failing localization catalog: ja used エージェント
in three new skill-filter strings, and repair-locale-catalog rewrites
those to Agent. Match the rest of ja.json so static analysis can pass.

(cherry picked from commit 0096e47)
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…stablyai#16688)

* fix(windows): keep windows-process-tree gyp paths absolute under pnpm

Hourly Windows builds have failed since stablyai#16598 at
`build-windows-process-tree-relay-addon`: `require('node-addon-api').targets`
is cwd-relative, so node-gyp evaluates it from the pnpm store realpath and
then loads it from the `node_modules` symlink. That resolves
`node_addon_api.gyp` outside the repo.

Use `require.resolve` for an absolute path, matching the node-pty patch.

* i18n: keep ja skill-filter labels on the catalog's Agent brand

stablyai#16682 merged with a failing localization catalog: ja used エージェント
in three new skill-filter strings, and repair-locale-catalog rewrites
those to Agent. Match the rest of ja.json so static analysis can pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant