Repository navigation
Add opt-in Windows App SDK auto-initialization for Python and Node.js - #235
Merged
leileizhang (lei9444) merged 2 commits intoOct 30, 2026
Merged
Conversation
Add identity-first Python and Node entrypoints without changing explicit initialization or ordinary imports. Use a shared native identity probe that does not activate WinRT or initialize COM. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
shisan (qiutongMS)
approved these changes
Oct 30, 2026
Mixed-language test coverageWorkflow status: ✅ Passed
|
Run the strict uninitialized-COM regression in a separate integration-test process, outside the unit suite's retained MTA. Prepare the effectful Python module's identity branch before recursive stubtest, restoring the real identity probe before checking all public signatures. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Kai Tao (vanzue)
approved these changes
Oct 30, 2026
shisan (qiutongMS)
approved these changes
Oct 30, 2026
leileizhang (lei9444)
deleted the
lei9444-bootstrap-auto-initialization
branch
October 30, 2026 12:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add opt-in
dynwinrt.auto_initand@microsoft/dynwinrt/auto-initimports. A sharedGetCurrentPackageFullNameprobe checks identity without WinRT activation or COM initialization: packaged processes skip all Bootstrap configuration and DLL work, while identityless processes call the existing no-argument initializer. Probe and initialization errors propagate.Ordinary runtime/generated-package imports stay passive, explicit initialization retains its existing behavior, and applications still own COM setup. Includes packaging, regression coverage, documentation, and a short preview.24 highlight.
Usage
For identityless processes, install a generated bindings package produced with
--winappsdk-versionand--winappsdk-bootstrap-path, and deploy the matching Windows App Runtime. Python discovers the installed provider; Node needs the generated package imported first. Processes with identity need no Bootstrap configuration just to skip.Use dynamic ESM import after preparation; static imports execute before the body. CommonJS uses ordered
require()calls instead. The opt-in import initializes the configured Runtime without identity, or skips Bootstrap with identity; skipping does not verify SDK deployment. Normal module caching applies, and explicitinit_winappsdk(...)/initWinappsdk(...)remain available without an identity-based skip.Validation
Real temporary package-identity processes skipped Bootstrap with missing/conflicting configuration and invalid DLL paths; Bootstrap stayed unloaded and COM stayed uninitialized. Identityless installed-package consumers discovered/registered actual generated SDK bundles, initialized the installed Runtime, and called
RuntimeInfo. Temporary package registration was removed. Local live coverage used Windows x64, CPython 3.12, and Node 24; native ARM64 was not exercised locally.