Repository navigation
Harden WinRT golden regression harness and E2E runners - #66
Merged
leileizhang (lei9444) merged 9 commits intoSep 4, 2026
Merged
leileizhang (lei9444) merged 9 commits into
leileizhang (lei9444) merged 9 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot review (PR #3): projected_values_equal returned after the FIRST shared attribute (name/value/path) matched, so an object exposing more than one of them (e.g. both .name and .value) could be treated as equal when only the first matches, weakening the regression protocol checks. Compare every shared attribute and return False if any differ; keep the scalar-equality fallback. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nown kinds Copilot review: the E2E spec schema includes instantiate.kind 'constructor' (py_runner already handles it), but ts_runner only handled 'activate'/'static_factory', leaving obj null and proceeding for 'constructor' or any unexpected kind — which could report a pass with no object. Add the 'constructor' branch (new cls(...args), mirroring py_runner) and throw on unknown kinds. (The current constructor spec is py-only, so no ts behavior changes today; this is defensive.) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…D_MODE in init Copilot review (PR #3): - winrt_regression.rs uses WinRT/Win32 APIs (RoInitialize etc.) and won't compile on non-Windows; add #![cfg(windows)] so cargo test stays usable off-Windows. - init_winrt ignored ALL RoInitialize failures despite the comment saying only the already-initialized case is benign. Now it accepts only RPC_E_CHANGED_MODE (already initialized in a different apartment; S_FALSE is already Ok) and panics on any other HRESULT so a genuine init failure is diagnosable. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…aw literal Copilot review (PR #3): the golden-behavior harness asserted against a raw 0x80028CA0 HRESULT literal. Name it TYPE_E_TYPEMISMATCH locally (GetString on a non-string IPropertyValue) for readability/maintainability.
The earlier ts_runner 'constructor' handling compared instKind against a literal not
in the Instantiate.kind union ('activate' | 'static_factory' | 'none'), which a
type-checked (tsc) run rejects as TS2367 (no overlap). Extend the union to include
'constructor'.
Resolve the stale runner paths in favor of the current tests/e2e layout, balance WinRT apartment initialization, and add focused runner regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Shawn Yuan (shuaiyuanxx)
approved these changes
Sep 4, 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
The core portable WinRT golden harness originally proposed here already landed on
mainthrough #65 (181af5a). This PR now merges currentmainand retains only incremental hardening for that harness and the currenttests/e2e/runners/implementations.IPropertyValue::IID, and nameTYPE_E_TYPEMISMATCH.RoInitializewithRoUninitializethrough an RAII guard, including early returns and panic unwinding.RPC_E_CHANGED_MODEis not accepted.name,value, andpath) before declaring equality, with focused scalar/object regressions.constructorinstantiate kind in the TypeScript runner and reject unknown kinds instead of continuing with a null object, while preserving existing activation, factory, andNotificationDatabehavior.tests/e2e/runners/layout; obsoletetests/runners/files are not restored.Validation
cargo test -p dynwinrt --test winrt_regression— 1 passedcargo test -p dynwinrt— 277 unit tests passed, 1 ignored; integration test passedpython -m pytest tests\e2e\runners\test_py_runner.py -q— 2 passedtsc --noEmit— passedtsx --test tests\e2e\runners\ts_runner.test.ts— 2 passedcargo fmt --all -- --check— passedmain— passed