Skip to content

ci: discover the installed MSVC instance for examples - #1220

Merged
loonghao merged 7 commits into
mainfrom
fix/msvc-discover-instance-20261012
Oct 13, 2026
Merged

loonghao merged 7 commits into
mainfrom
fix/msvc-discover-instance-20261012

Conversation

@loonghao

@loonghao loonghao commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Repair the Windows example toolchain contract and validate the complete example chain without changing VX tool pins or the external project's dependencies.

  • Initialize VX's existing MSVC Provider, then discover a shared VS17 instance with vswhere instead of assuming its edition or path. VS17 is the common supported range of the current VX Provider and node-pty's node-gyp; this does not imply the runner lacks VS18.
  • Verify x64 Spectre libraries under the selected instance. If components are missing, modify only that instance, record the installer exit code, and accept 0/3010 only after the libraries are verified. Bind CMake and node-gyp to the same instance.
  • Preserve explicit VS18 discovery/generator support for future compatible consumers, and fail clearly for unsupported versions.
  • Pin AionUi to reviewed upstream commit 6744099b279b991c17e31c243f0920477bd31cb6 and use the existing VX Bun pin with bun install --frozen-lockfile. Do not rewrite workspace protocols, resolutions, manifests, or lockfiles.
  • Source-build AionUi's locked better-sqlite3 for VX's Node ABI, serialize npm lifecycle scripts through Bun's shared dependency links, and validate an actual in-memory database query.
  • Check every required native exit code immediately, retain diagnostics, and prevent downstream commands or false success messages after failure.
  • Require Pester's aggregate result to pass with at least one executed passing test. Test discovery, setup, assertion, empty-run, and all-skipped failures through real child PowerShell processes.

Exact-head validation

Head: 55f5f16fe95aff8ea6dc352634de42f23eb26893

  • All 53 checks are terminal: 36 successful and 17 conditional skips.
  • Full CI succeeds. Linux: 4,289 passed / 128 skipped; macOS: 4,292 passed / 128 skipped; Windows: 4,313 passed / 130 skipped. Linux and macOS needed no retries. Windows' existing test_where_alias_imagemagick passed on its second attempt; this flaky-test caveat is retained rather than treated as a first-attempt pass.
  • Windows Pester: 34 passed, zero failed/skipped/not-run. Six gate fixtures run the workflow's extracted gate, not a duplicate condition: normal tests return 0; discovery errors, BeforeAll errors, assertion failures, no tests, and all-skipped tests return 1. Native install/rebuild/query failures independently preserve exit codes 31/32/33 and stop subsequent commands.
  • Real Windows examples all succeed. VS17.14.37710 at the discovered BuildTools path is verified; the actual Spectre installer returns 0. fmt, node-pty, dotnet, Bun 1.3.8 frozen installation, both sequential SQLite 12.8.0 source builds, and the database query pass. CMake and node-gyp use the same selected instance. The final source/lockfile cleanliness check also passes.
  • Existing Python script tests: 137/137 pass locally; git diff --check passes. No local PowerShell or Rust build is claimed. PowerShell and native Windows acceptance come from the jobs above.
  • Independent read-only review found the Pester discovery-error gap; the final gate change and its six real-process regressions close that finding. No remaining source-review blocker was found.

The AionUi acceptance is a native-module toolchain smoke test using Node, not a full Electron packaging test.

Diagnosis and regression evidence

  • Original scheduled failure: Spectre setup failed before any example; its actual installer exit code was not recorded.
  • Initial integration: selecting VS18 let fmt build, but node-gyp selected VS17 without its Spectre libraries. The final shared-instance selection addresses that mismatch.
  • Frozen-install integration: the corrected Bun install passed, then concurrent SQLite rebuilds hit Windows EBUSY; exit code 1 was correctly preserved. The final foreground lifecycle option serializes those builds, as confirmed by the successful real logs above.

References

Check each native exit code immediately, preserve output in the build log,
and exercise install/rebuild/module failures with a real native cmd shim.
Merge the verified main fixes without altering dependencies.
Fetch the reviewed upstream revision without editing its manifests or lock.
Use the existing VX Bun pin and frozen install, source-build better-sqlite3,
and validate a real SQLite query with Node. Preserve native failure checks.
@loonghao
loonghao marked this pull request as ready for review October 13, 2026 11:10
@loonghao
loonghao merged commit 0d199fa into main Oct 13, 2026
56 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