Skip to content

Promote additional Classic COM interfaces to safe generation - #136

Merged
leileizhang (lei9444) merged 3 commits into
mainfrom
feature/com-safe-promotion-main
Sep 4, 2026
Merged

leileizhang (lei9444) merged 3 commits into
mainfrom
feature/com-safe-promotion-main

Conversation

@lei9444

Copy link
Copy Markdown
Contributor

Summary

  • promote additional Classic COM interfaces only when exact output ownership, parameter direction, null-input, count, and conditional-output evidence completes the full inherited interface
  • add exact registries for CoTaskMem/COM ownership outputs, parameter direction, and null inputs, with schema-validated metadata fingerprints and citations
  • generate safe IWbemServices conditional output methods while retaining IAudioClientUnsafe for caller-managed contracts
  • preserve canonical COM module paths, WinRT/root isolation, fail-closed generation, and current raw unsafe behavior
  • update the deterministic compact capability census and CI baselines from 5,567 to 5,681 safe-complete interfaces

Validation

  • cargo test -p dynwinrt-codegen
  • cargo test -p dynwinrt -p jswinrt_rs
  • cargo check -p jswinrt_rs --target i686-pc-windows-msvc
  • npm run build
  • npm test (WinUI timing case passed after an idle isolated rerun)
  • npm run test:generated-unsafe
  • Classic COM E2E: 17/17
  • two complete census runs were byte-identical; retained compact artifacts report 5,681 / 7,929

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9ef7fa55-eb2a-4360-bd17-05feae50fadb
@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Mixed-language test coverage

Workflow status: ✅ Passed

Layer Lines Functions Branches/regions
Rust, including native .pyd/.node 84.83% 79.96% 84.38% regions
Generated Python projections 70.5% n/a 21.71% branches
JavaScript aggregate 21.47% 20.64% 54.23% branches
JavaScript runtime 24.76% 14.28% 7.14% branches
Generated WinRT projections 25.8% 19.3% 54.74% branches
Generated Classic COM projections 14.83% 24.65% 54.38% branches

View workflow run and download full HTML/LCOV/XML reports

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9ef7fa55-eb2a-4360-bd17-05feae50fadb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9ef7fa55-eb2a-4360-bd17-05feae50fadb
@lei9444

Copy link
Copy Markdown
Contributor Author

Follow-up on the DeleteObject release regression:

  • DynWinRTValue.release() now clears pointer/provenance only after DeleteObject returns success; failure preserves the owner and returns an error. Drop remains best-effort.
  • I attempted the proposed selected-object live test with a brush, pen, and bitmap in a memory DC. GetCurrentObject confirmed each object was selected, but this Windows build returned TRUE from DeleteObject for all three, so that test is not portable enough to commit.
  • The regression now has two complementary checks: a real DeleteObject(FALSE) call verifies the production return-value branch preserves generic ownership, and a forced FALSE at the syscall-result boundary verifies the same real HBITMAP owner can retry and then be released by the actual DeleteObject call. The earlier hook that returned an error before the result branch has been removed.

Commit: d9e5666.

@lei9444
leileizhang (lei9444) merged commit 6daf081 into main Sep 4, 2026
24 checks passed
@lei9444
leileizhang (lei9444) deleted the feature/com-safe-promotion-main branch September 4, 2026 08:59
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.

2 participants