Skip to content

Prepare Windows natives with scoped compiler settings and measure servicing - #28881

Merged
nwparker merged 4 commits into
mainfrom
nwparker/ci-windows-native-qualification
Oct 15, 2026
Merged

nwparker merged 4 commits into
mainfrom
nwparker/ci-windows-native-qualification

Conversation

@nwparker

@nwparker nwparker commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​654 $\color{#cf222e}{\Huge{\mathbf{−}}}$​14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​640
Prod 16 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1236 $\color{#cf222e}{\Huge{\mathbf{−}}}$​37 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1199

ELI5

Rebased onto main after #28879 merged. The three Windows commits are unchanged by the rebase; fresh hosted checks qualify the new head.

Windows CI prepares its compiler once when native Node modules need rebuilding. It also records where ARM Windows spends time installing inbox OpenSSH, so a controlled comparison can identify the slow stage. Hosted measurements will decide whether either approach improves total runner time.

What Changed

  • Probe the existing native modules first. On Windows Node rebuilds, discover Visual Studio with installed Microsoft tools and pass the validated developer environment only to the existing native-preparation child. Preserve explicit compiler choices and normal discovery when setup is unavailable; real rebuild failures still fail CI.
  • Keep compiler changes out of later Electron and Rust steps. Include both setup scripts in native fingerprints and package/server routing.
  • Warm the ARM server launcher through the existing action and matching consumer key; retain the x64 desktop launcher and hook cache.
  • Record inbox capability query/install stages, durations, initial state before installation, install results, restart requirements, terminating failures, and separate DISM logs.
  • Add a manually dispatched same-source Windows compiler comparison with counterbalanced cold builds, same-build warm checks, and a forced setup-failure fallback in isolated installs. Count setup inside preparation time and retain command/hash receipts without raw developer-environment output.
  • Add manual ARM-only overlap/serial comparisons with distinct cancellation groups. Ordinary PRs retain all four Windows SSH lanes, overlapping preparation, guards, wait barrier, and deadlines.

Why

Repeated compiler discovery and ARM capability preparation are measured sources of delay. Reusing the existing preparation, process-host, launcher action, and provisioning boundaries addresses those stages while retaining native and private SSH checks. Scoped compiler settings avoid affecting later ABI or target changes. The diagnostics establish whether serial servicing improves total occupancy before changing the normal overlap policy.

Linked Issue

N/A — internal CI maintenance.

Visual Proof

N/A — no product layout or interaction changes.

Testing

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

On macOS, all 209 focused native/routing/workflow contracts, full root typecheck, changed-code quality, focused lint/format, and portable PowerShell diagnostics passed. Independent reviews checked compiler selection and failure propagation, exact cache inputs, platform routing, receipt durability, normal lane selection, and unchanged provisioning guards. Actionlint passed with its unsupported existing background/wait extensions removed in a validation copy.

The benchmark also passes 13 dedicated contracts; all 69 combined benchmark/compiler/workflow cases, focused quality, format, and workflow syntax checks pass. It uses the same four native addons and original final ownership/CreationTime probes. Its warm mode means reuse within the same build, so hosted restored-cache and ABI qualification remain separate.

Current revision 1e33ee56e7ae adds a scoped first-party policy for the six reviewed compiler-capture callers. It permits only the fixed capture runner, restricts VsDevCmd.bat to discovery metadata, requires the expected @orca/process-host executor, and rejects raw child-process loads/calls and package-bin programs. It also covers computed and shorthand program properties. The legacy allowlist remains shrink-only. The focused policy, predicate, guard, quality, full typecheck and commit-hook checks pass.

Rebased onto main 39815a086fec; fresh hosted checks are running for 1e33ee56e7ae. Both frozen-source ARM overlap and serial experiments completed successfully. Their receipts and cache conditions are being compared; no servicing speedup is qualified yet.

Actual Windows cold/warm compiler execution, Node-to-Electron ABI changes, x64-to-ARM target changes, and launcher cache reuse remain pending. Setup may add time before falling back; no speedup is claimed. Controlled ARM servicing comparisons must use the same frozen source, image, runtimes, cells and cache outcomes, start with capability state NotPresent, and pass both private SSH cells. Compare inclusive whole-job occupancy; overlapping stage durations cannot be added together.

Review

No local review blockers found. No compiler values are published to GITHUB_ENV. No new interpreter spawning, PowerShell compilation, weakened native probes, shortened deadlines, replacement of inbox coverage with preview, or runner-capacity increase is introduced.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • 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)

@nwparker
nwparker force-pushed the nwparker/ci-windows-native-qualification branch from 158abe9 to 428c0b7 Compare October 14, 2026 23:40
@nwparker
nwparker changed the base branch from nwparker/ci-runner-occupancy to main October 15, 2026 00:15
@nwparker
nwparker requested a review from Jinwoo-H as a code owner October 15, 2026 00:15
@nwparker
nwparker force-pushed the nwparker/ci-windows-native-qualification branch from 428c0b7 to c3a2270 Compare October 15, 2026 00:15
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6805679b-bee1-47f5-b73b-5295bfdb9302
📥 Commits

Reviewing files that changed from the base of the PR and between c3a2270 and 1e33ee5.

📒 Files selected for processing: 3
  • config/scripts/windows-cmd-shim-spawn-boundary.test.mjs
  • config/scripts/windows-native-batch-reference-policy.test.ts
  • config/scripts/windows-native-batch-reference-policy.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

📝 Walkthrough

The changes add Windows native toolchain initialization for Node runtime preparation and include its inputs in cache and change-scope workflows. A manual benchmark workflow compares control, candidate, and fallback preparation runs while recording process and environment data. The Windows SSH workflow adds ARM inbox-only dispatches and overlap or serial preparation modes. Capability query and install operations now record status, timing, errors, and operation-specific logs.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 1e33e

The changes add a test-time policy check for Windows native batch references. No concrete merge-blocking risk was found in the supplied changes.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 12 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
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.
Title check Passed The title clearly summarizes the primary changes: scoped Windows compiler preparation and servicing measurement.
Description check Passed The description covers the required sections, explains the changes and rationale, documents testing, records limitations, and completes the checklist. The issue is marked N/A with an internal-maintena…
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@nwparker
nwparker merged commit f23fa8c into main Oct 15, 2026
55 checks passed
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