Repository navigation
Unify Classic COM contract evidence in JSON registries - #151
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Mixed-language test coverageWorkflow status: ✅ Passed
|
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
shisan (qiutongMS)
approved these changes
Sep 11, 2026
This was referenced Sep 11, 2026
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
Move five evidence families from code-embedded Rust registries into audited, compiled JSON under
tools/dynwinrt-codegen/contracts/classic-com. These records augment WinMD method contracts; they are not OS registration or per-interface native implementations.safearrays.jsonnull-inputs.jsonparameter-directions.jsonborrowed-handles.jsonenumerators.jsonsrc/contract_registry/adapters.raw-method-shape-v1format and integrity hash. Null/direction canonical pre-override hashes are unchanged; borrowed/enumerator declarations additionally pin their complete source shapes. Catalog and generated-descriptor fingerprints remain unchanged.GetRuntimeId,GetEmbeddedFragmentRoots,GetSelection,GetGrabbedItems) into structured, cited nullability contracts. Their receivingSAFEARRAY**cells remain required, mutable and Out. Other outputs remain required. VARTYPE, exact interface-IID checks andSafeArrayDestroybehavior are unchanged.capability.rschanges are limited to that guard and error propagation, not raw descriptor emission.This is an independent PR based on verified
origin/mainate7469c840e6f68310083b23520c6b681601eb276, not stacked on #150. It does not include the sibling generic codegen fixes, migrate borrowed-copy/runtime recipes, native completion, activation policies or other remaining contract families, or change COM/WinRT public APIs. Contract schema/manifest version remains 2; generated binding/support manifest versions are unchanged.Behavior-preservation evidence
Pinned input:
Microsoft.Windows.SDK.Win32Metadata71.0.14-preview, SHA-256B64EE4818A7ED9F9D135038D58C51BD08369184D4D5ED428F20E9DE55DF8121D.Mechanical export/checks compared every migrated record against the original Rust definitions, including IDs, full selectors, source shapes/hashes, directions, ownership, citations and nullability. Baseline/final re-exports were byte-identical. Generation comparison covered 285 declaring/inherited roots, 1,366 safe JS/declaration/extra-file hashes, complete unsafe output/support records, and 4,247 canonical method fingerprints. The combined capture remained byte-identical (
7062301D37375D13C499DF610FDFA2C699B6C41C9A164E0076FD132182187E8C). The one-off capture harness was removed from the source tree.All seven capability-census artifacts, including complete entry/family/kind maps and per-interface dependencies, were byte-identical between baseline and two post-review runs. No census expectations or retained reports were changed.
Safe-incomplete raw metadata/manual/blocked buckets also remain
388/1431/389for x64 and ARM64, and387/1408/413for i686. Capability summary SHA-256 remains90C01DFEED264A8BE50E859CDCC438A763B386B41324279F376BA89D564BAFCC.Validation
npm --prefix bindings\js ci --ignore-scripts --no-audit --no-fundafter the required compiler check reported the missing dependency; no dependency manifests changed.No live device/UI/audio APIs or runtime cleanup E2Es were invoked: this changes evidence storage and validation, not runtime ABI or cleanup implementation. Existing WinRT output and the npm root surface are unchanged.
Adapter directory organization follow-up
Commit
f370c13d062fbbd75ee0ec81f063d57719d7c3f5organizes the compatibility layer without changing contracts. Relative to9402f32, all five moves are 100% identical Git renames:src/src/contract_registry/adapters/com_safe_array_registry.rssafearray.rscom_null_input_registry.rsnull_input.rscom_parameter_direction_registry.rsparameter_direction.rscom_borrowed_handle_registry.rsborrowed_handle.rscom_enumerator_registry.rsenumerator.rsA crate-private
adapters/mod.rsmakes the boundary explicit. The oldlib.rsmodule declarations are removed, all 36 production/test references use the new paths, and no old-name re-export shells or path bridges remain. The shared typed loader/schema/hash/provenance code stays incontract_registry; Raw representations,OnceLockcaches, matching/validation order and diagnostic precedence stay unchanged. No generic abstraction or adapter-boilerplate rewrite was introduced. Metadata-side tests remain children ofcom_metadatato exercise private helpers without broadening production visibility. Unmigratedcom_activation_registry.rsremains separate and untouched.The JSON/schema/manifest files, stable IDs, 24 COM-standard enumerators, four nullable pointees with required receiving cells, safe/unsafe/census gates and support ranges are unchanged. The architecture documentation now distinguishes JSON facts, shared typed validation and Raw compatibility adapters.
Organization-specific validation
With the same pinned metadata and required TypeScript settings above:
37 registry + 113 COM/interop/WinRT snapshot/tsc tests passed without skips. After the moves, the capture was rerun: all 333 re-exported records and all 285 roots (1,366 safe hashes, unsafe/support records, 4,247 method fingerprints) remained byte-identical to the retained baseline. All seven regenerated census artifacts also remained byte-identical, with the same hashes and totals above. Temporary capture source was removed before the final full-repository formatter checks. Repository-wide search found no remaining references to the five old module names.
An independent review limited to the organization delta against
9402f32found no significant issues and independently ran all 10 relocated adapter tests; the metadata regression gates still compile and are discoverable. No live-device or runtime cleanup E2Es were needed for this organization-only follow-up.