Repository navigation
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 39536Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 39536" |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🔵 Needs a closer look
No blocking code defects were identified, but runtime-sensitive GC behavior warrants human review with independently verified current-head CI results.
No open issues 🎉
What changed in this PR
Ports the test-only fixture correction from #39529 to net11.0, stabilizing Mono GC regression coverage while preserving the shared-helper fix from #39094.
Changes:
- Keeps the later weak-reference target rooted until its first actual liveness snapshot.
- Releases both roots in a non-inlined method, leaving collection to the unchanged asynchronous helper.
- Adds a later-target liveness assertion while preserving earlier-alive and final-death checks.
| File | Description |
|---|---|
src/Core/tests/DeviceTests/AssertionExtensionsTests.cs |
Corrects fixture target lifetimes and strengthens liveness assertions without changing shared helpers or product code. |
Review effort: Balanced
CI failure attributionThe checks are genuinely red, but the changed GC fixture passes wherever it executed. Every observed failing test assertion also fails on the exact Final main-run status, rechecked from the raw Azure timeline: main build 1644556 completed at 2026-10-22 12:04:21Z with 30/31 jobs successful, including 22/22 integration jobs successful. Its one failed job is the unit-test Helix monitor reporting the genuine PR head:
The GC fix itselfDevice build 1644557 has all nine Android Mono full-Core results are 3,079 total / 3,007 passed / 0 failed / 72 skipped / 0 errors. Exact-base device build 1643729 fails the precise Windows packaged Core and Catalyst osx.26 Core did not produce execution evidence. They are not counted as passing. Main CI: a real XAML baseline failure, not a broken reporterMain build 1644556 fails The actual macOS Debug XML has 2,155 total / 2,146 passed / 1 failed / 8 skipped / 0 errors. All four original full consoles contain this same sole failure. All four matching consoles on exact-base main build 1643728 have the same case, assertion, and source location. The monitor correctly reports the failed work items; it is not a transport/upload problem. It has not been retried or bypassed. Device CI: genuine pre-existing assertionsAll nine original Helix jobs were correlated from this build's own submission logs. Both PR and exact-base builds contain 62 expected app work items plus nine administrative items; 57 app XML sets per build are available and have reconciled declaration/record counts. All 49 failing execution instances / 16 distinct cases match the exact base by test identity, exception type, normalized message, and identical stack. Forty-five raw messages are byte-identical; four differ only in generated file URIs or FrameLayout instance IDs. Original messages are preserved. Failure groups:
These failures are not introduced by the one-file GC fixture patch. They are not labeled flaky or hidden by assertion changes/skips. Missing execution and provisioningFour Windows packaged apps fail The Catalyst submission reaches its Azure 60-minute job limit while waiting for osx.26. Its Core work item ends with Windows Pack independently fails before packing/tests when Windows Pack completed/succeeded on that single scoped retry at 2026-10-22 10:17:59Z, on the unchanged PR head and merge SHA. Its actual attempt-2 provisioning log explicitly installs and lists The observation-only Pack watch has ended. There is no further retry, device/unit blanket rerun, source change, approval, merge, or check bypass. The full main run has completed with 30 successful jobs and the one genuine failed unit monitor. The PR is not green: the proven pre-existing XAML and device assertions above remain unresolved. Separate baseline remediationThe GC patch in this PR remains unchanged. Eight separately validated baseline
Each of the seven assertion fixes was reproduced, corrected, reverted to failure, The CollectionView fix propagates the generic handler's existing The MSIX port applies The navigation fix corrects both the fixture's legacy-renderer assumption and The Windows wrapper fix preserves the Windows-owned wrapper slot without Final restored packaged Controls also installed and executed those five exact All originally assigned baseline families now have focused fix PRs. They remain Post-publication checks also exposed two additional unresolved families, not |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/rebase |
Port only the fixture correction from #39529 (f11b889) to net11.0. Retain the later weak target through its first liveness snapshot, release both roots in a non-inlined frame, and preserve the unchanged helper collection and original safety assertions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c33a22b9-b10e-4231-9b6e-2cf2ef8bc415
Use canonical external-cache inputs only for incoming file-URI picker recovery success cases. Keep private capture/content fixtures and production validation unchanged, clean up owned external inputs, and assert private picker URI rejection preserves its source. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e45178d-49ea-4de1-85ae-905502e5811e Cherry-picked-from: 9a12d34 Copilot-Session: c33a22b9-b10e-4231-9b6e-2cf2ef8bc415
Match the base WindowTests registration so the inherited construction-reentry test actually invokes its replacement callback in WindowHandlerTests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 73b5ca16-6343-4a5e-bb44-eaa12e175e88 Cherry-picked-from: 0f554a8 Copilot-Session: c33a22b9-b10e-4231-9b6e-2cf2ef8bc415
Propagate the public-constructor trimming contract through the generic empty-view fixture helper so both legacy and Items2 handler registrations remain activatable. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88507d92-22fd-466c-86de-65cf187bf15b Cherry-picked-from: 73ca647 Copilot-Session: c33a22b9-b10e-4231-9b6e-2cf2ef8bc415
Port the runner shutdown flag and CI facts from #39498 without importing GA history. Keep dependency-process shutdown limited to disposable Helix workers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7c8b0ad3-c2a6-4fef-bd2a-0a06d36b7505 Cherry-picked-from: 7673773 Copilot-Session: c33a22b9-b10e-4231-9b6e-2cf2ef8bc415
63ef260 to
c45f78a
Compare
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
User-directed consolidation of the test-fixture and disposable Helix deployment fixes, targeting net11.0. This is the existing GC port PR expanded with only the selected non-product fixes from #39569, #39571, #39572, and #39573. The current target
7b0ea7800db3f3faccbaecb665d32b7c61eaf932was integrated by a normal merge; no rebase, amended commits, or force push.Exactly six paths; no product-source diff, dependency changes, or pipeline YAML changes:
src/Core/tests/DeviceTests/AssertionExtensionsTests.csf11b88966f41d38b723863d8e40c5e67ea93044f(retained port495b473347)src/Essentials/test/DeviceTests/Tests/Android/MediaPickerRecovery_Tests.cs9a12d346983139149a781615e9c100dcfe51da45src/Controls/tests/DeviceTests/Elements/Shell/ShellHandlerSubclasses.Android.cs0f554a80b700e67ed1f3fbb2b117bf5cfe1eb8d0src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.iOS.cs73ca647cc0d3c12ad726a9ec00696ed18a3d57f7eng/devices/run-windows-devicetests.cmd7673773370d3c142e0c89545f72feda4479babf1.github/docs/maui-ci-facts.mdAll six resulting file blobs are identical to the selected sources. Their original authors, messages, and attribution/evidence are preserved; each added fix commit records its source SHA. The aggregate diff is 98 insertions / 21 deletions against the integrated net11.0 target. No validation/control branches or unrelated GA history are imported.
Product fixes remain separate and are not included, even partially: #39568 (XAML plus its regression tests), #39570 (HybridWebView), #39574 (Navigation plus its tests), and #39577 (ViewHandler/WrapperView plus its tests). Their regression tests are not extracted into this PR. The GA PR #39529 and
release/11.0.1xxremain unchanged. Original assertions, existing skips, native runtime checks, and test oracles are preserved; no sleeps, relaxed tolerances, retries, or skip policies are added. These are not all characterized as flaky tests, and this consolidation does not claim green CI.GC fixture: mechanism and retained prior evidence
The original net11.0 port was based on
216c8045cbfa9d6a00f44ec2dad574ca1b9ec13eand copied only the fixture patch fromf11b88966f41d38b723863d8e40c5e67ea93044fin #39529. No GA packaging/dependency/base history was imported.The old
EarlierReferenceCollectedDuringLaterWaitfixture leaves its later weak target unrooted during the earlier target's bounded collection wait. The later target can already be dead when its getter releases the earlier target; forcing GC inside that getter also competes with the getter's own liveness temporaries. The helper may then perform no collection after the release frame returns.Retain the same actual later target until its first real
IsAlivesnapshot. Snapshot earlier/later liveness in a non-inlined release frame, clear both roots, and let the unchanged helper perform its existing asynchronous collection after that frame returns. Retain the earlier-alive and final-death assertions, and add the later-alive assertion. Subsequent checks still use actual weak liveness.GC component scope: one file,
src/Core/tests/DeviceTests/AssertionExtensionsTests.cs, 25 insertions/13 deletions. File contents and stable patch ID remain identical to #39529 (132ef9846b52df6bf59b7fb29c1317a5c24d31ccand9ce1ab8e4693455de9cabc29865d0ec25bbad81d). #39094's shared-helper aggregation fix is already on net11.0 and remains unchanged. The GC change adds no sleeps, tolerance/retry/limit changes, skips, pipeline/dependency changes, product changes, or unrelated Mac UI work. Target source/history, open net11.0 PR file lists, and recent merged GC/fixture changes were checked for an equivalent port before publishing; none was found.Prior GC-only target-branch validation — original head
495b473347, not combined-head executionPrivate copy of the pinned SDK
11.0.100-rtm.26514.118(product11.0.100), target Android workload 37.2.15, .NET 11.0.0 Mono, task-owned headless API33 ARM64 emulator. Android's resolvedAndroidNETSdkVersionwas checked as37.2.15; this is not a rerun using GA's older 37.2.13 workload. Global SDKs/workloads and original GA evidence/scripts were not modified.A private harness compiles the unchanged target test source and verbatim target GC helper methods with real xUnit 2.9.3 assertions; only Category metadata is shimmed. Each arm has three independent process runs, each executing all nine cases 20 times. Loaded
libmonosgen-2.0.sopositively verifies Mono in every process.useWaitForGC:truefails 20/20All seven retained/null/empty safety cases pass in every arm. The stale-helper negative control confirms that the fixture correction does not mask the original aggregation regression.
The full repository Core.DeviceTests Android Mono application also built using this checkout and target dependencies, with the existing runner's temporary exact-class module-initializer injection. Three fresh XHarness runs each produced a unique actual xUnit XML containing exactly 9 distinct
AssertionExtensionsTestscases: 9 passed / 0 failed / 0 skipped / 0 errors, including both regression variants and both retained-reference orderings. Assembly counts were independently reconciled with all nine records; this is not inferred from XHarness exit zero. No harness/filter file is committed.Commands/results (
Eis this port's preserved local validation artifact directory; the copied scripts contain only port-local paths):Historical hosted net11 CI investigation — original GC-only head
495b473347a058caee083866a564d6c3c1dc5c8d, merge82aa6339f5bf89b026ba97591042dc2962cea56dThe checks are genuinely red, but the changed GC fixture passes wherever it executed. Device build 1644557 has all nine
AssertionExtensionsTestspassing in each of eight actual Core XML sets: Android Mono/CoreCLR; iOS Mono/CoreCLR on both queues; Catalyst osx.15; Windows unpackaged. Android Mono full-Core XML has 3,079 total / 3,007 passed / 0 failed / 72 skipped / 0 errors. Exact-base device build 1643729 fails the preciseEarlierReferenceCollectedDuringLaterWait(useWaitForGC: True)case; this PR passes it and every retained/null/empty safety case.Every one of the device build's 49 failing execution instances / 16 distinct cases also fails in its corresponding configuration on exact net11.0 base
216c8045. Test identity, exception, normalized message and stack all match; 45 raw messages are byte-identical and four differ only in generated file URIs or FrameLayout IDs. Failure groups are Android HybridWebView/Window/MediaPicker recovery, iOS/Catalyst Navigation renderer expectations and CollectionView constructor cases, and Windows unpackaged Label wrapper assertions. Nine original Helix jobs and all 62 expected app items were inventoried; all 57 available app XMLs per build were reconciled. These are real pre-existing assertions, not a shared infrastructure/monitor failure or a reason to weaken this fixture.Four Windows packaged apps fail before tests with
Add-AppxPackage0x80073D02 while WindowsAppRuntime.2 resources are held by WebExperience; exact base has the same four deployment failures on different workers. Catalyst osx.26 Core has no files/XML after Azure's 60-minute submission-job cancellation (-1234), with the same base pattern. No passing/executed GC coverage is claimed for Windows packaged Core or Catalyst osx.26 Core. No device retry or source change was made.Main build 1644556 has a genuine
XNameAreTrimmed(inflator: Runtime)XAML failure (Assert.NotNull,Maui27121.xaml.cs:30) in all four macOS/Windows Debug/Release configurations. All four corresponding full consoles on exact-base main build 1643728 fail identically. The Helix monitor correctly reports these failures; it was not retried or bypassed.Windows Pack independently failed before packing/tests when
cmdline-tools;13.0was rejected withError on ZipFile unknown archive; a same-head Windows Release peer actually installed and listed that exact package successfully. A single diagnostic Pack-only failed-job retry was admitted withforceRetryAllJobs=false, preserving macOS Pack and the genuine failed unit monitor on attempt 1. No retry policy was added to source and no blanket unit/device rerun was started. Its provisioning-recovery outcome is tracked in the PR's investigation comment; it cannot make the whole PR green while the proven pre-existing net11.0 assertions remain.Inherited GA evidence, not net11-branch certification: #39529 records its own five-arm Android37.2.13 controls, native-class repeats, successful main build 1644138 and device build 1644140, and hosted Android x64 Mono full-Core XML (3,065 total / 2,993 pass / 0 fail / 72 skip; all nine fixture cases pass). Those results belong to the GA head, not this PR. The hosted net11 evidence and remaining failures above are separate; no aggregate hosted net11 success is claimed.
GC evidence limits: the local controls above cover Android ARM64 Mono and the exact fixture class; the original-head hosted evidence covers the eight executed Core configurations above, not the two without execution evidence. These prior runs were not repeated on the combined head. No local MacCatalyst, XCTest, desktop UI automation, or screen takeover. No claim of global flake elimination, unrelated product-leak repair, or green CI.
Android picker recovery fixture — #39569
Five successful incoming
file://picker cases supplied paths inside the receiving app's protected private cache.FileSystemUtils.TryGetValidatedPhysicalPathdeliberately rejects those paths, even when readable. Preserve that production validation from #38127. Create canonical external-cache input files only for the successful incoming file-URI cases, track and delete those fixture-owned inputs, and leave private capture/content-URI fixtures and every original result/path/state assertion unchanged.The added
Accepted_Pick_Private_File_Uri_Is_Rejected_Without_Deleting_Sourcecontrol requires rejection, cleared active state, no recovered result, and an intact private source file. No product validation is relaxed.Prior per-fix native evidence, not combined-head execution: full recovery and Android filesystem classes, headless API33 ARM64, pinned SDK 11.0.100 / Android 37.2.15, with real Mono/CoreCLR payloads verified. Each row has three fresh process runs:
All 18 original XMLs reconcile exact class/case identity, theory rows, counts and zero fixture errors. The original 81 recovery plus six filesystem cases become 88 with the new negative control. Source #39569 retains its exact native build/execution commands and full evidence. This is Android API33 ARM64 direct callback/recovery coverage, not real external camera/picker launches, other Android APIs, other platforms, or a full-suite claim.
Android native-Shell Window fixture — #39571
WindowHandlerTests.SetupBuilderreplaces the base setup but omitted its existingReentrantFlyoutPage/ReentrantFlyoutViewHandlermapping. The inherited construction-reentry test therefore selected an ordinary Flyout handler, never invokedOnCreatingPlatformView, and timed out waiting for the replacement root. Add just the omitted registration. Preserve native Shell registrations, the reentry trigger, all original root/toolbar/disconnection/attachment assertions, and the original timeout.Prior per-fix native evidence, not combined-head execution: full repository Controls APKs, API33 ARM64, SDK 11.0.100 / Android 37.2.15; exact derived
WindowHandlerTestsclass. For each of Mono and CoreCLR, baseline/fixed/reinstalled-baseline/reinstalled-fixed arms each ran three times. Every original XML has exactly 33 distinct cases, no skips/errors: baseline and revert 32 pass / 1 exact timeout, fix and restore 33 pass / 0 fail. All 24 fresh PIDs and 792 case records reconcile; the other 32 cases pass throughout. Unchanged baseWindowTestspassed 33/33 separately, not used as a proxy for the derived failure. Source #39571 preserves exact commands, immutable baseline APKs, raw logs/XML and runtime checks. No new emulator run is attributed to consolidation.Grouped CollectionView constructor contract — #39572
Propagate
DynamicallyAccessedMembers(PublicConstructors)ontoVerifyGroupedCollectionViewEmptyViewTracksGroups<THandler>so its genericAddHandler<CollectionView,THandler>()registration retains the handler constructor contract. Original exact-base pre-link/deployed binaries showed legacyItems.CollectionViewHandlerretaining its type but losing both public constructors; activation threwCtorNotLocatedbefore empty/group assertions. The modern Items2 handler retained its constructors.Both legacy/modern facts, inherited navigation-handler fixture executions, normal DI activation, and every original native empty-view/group assertion remain. No product handler, test skip, delay, or oracle is changed.
Prior limited local native evidence, not supported-Xcode combined-head certification: pinned SDK 11.0.100, iOS workload 27.0.12230, Mono 11.0.0, task-owned headless iPhone 11 Pro / iOS18.5. The source owner had Xcode26.6, not required Xcode27, and used the documented
ValidateXcodeVersion=falsecompatibility override plus standard non-WAE builds; existing warnings remained visible. Native executables linkedlibmonosgen-2.0.dylib.All 12 XMLs / 984 class-pair records / 48 target records and constructor metadata were reconciled. Both legacy cases fail identically in baseline/revert and pass all original assertions in candidate/restore; both modern cases always pass, none of the four target records is skipped. Source #39572 retains the exact commands and raw XML hashes.
Its supported-host baseline-only device build 1645782, pinned to unchanged target
7b0ea780, produced full CollectionView-category XML on both queues with 83 total / 73 pass / 2 fail / 8 skip / 0 errors; the two legacy ctor failures reproduce, both modern facts pass. Seven excluded stages were actually skipped. This is not hosted candidate-green evidence. The local green is not Xcode27 candidate certification, CoreCLR/Catalyst validation, or full-category candidate coverage.Disposable Helix Windows deployment — #39573
Set
ForceApplicationShutdown=truein the existing singleAdd-AppxPackageparameter splat. Microsoft's documented contract covers processes using the package or its dependencies, unlike target-only shutdown. Keep it scoped to disposable Helix workers; localwindows.cakedeployment is unchanged. Dependency architecture selection, certificate handling, terminating errors/nonzero failures, Appx diagnostics, cleanup and test execution remain. No broad process killing, sleep, retry, deferred registration or pipeline changes.This is the exact two-file #39573 patch, itself the focused port of #39498; no GA history or #39549 setup-retry work is imported. The CI-facts update records the disposable-worker boundary.
Prior per-fix hosted evidence, not combined-head results: Windows-only device build 1645745 used source head
7673773370d3c142e0c89545f72feda4479babf1/ target7b0ea780, with seven non-Windows stages skipped. All five packaged apps installed and executed; all 52 packaged launcher invocations exited zero. The original 112 XMLs (ten aggregates plus 102 source/category files) reconcile source/aggregate multisets and declarations. Packaged results:Unpackaged suites separately had the same totals; not used as a proxy for packaged execution. All three Label identities/messages/exceptions match original exact-base unpackaged XML. No original baseline packaged assertions can be inferred because those routes failed deployment before tests. #39577's separate product fix addresses the Label mechanism and remains excluded.
No
0x80073D02, missing-result, crash or timeout signature appeared in that source run, but successful deployment on different workers does not prove the original WebExperience lock was present, that Windows terminated that exact process, or that the flag was necessary in that run. No forced-lock experiment or full-suite-green claim. Original pre-test failures and unavailable coverage remain part of the historical evidence, not erased by later successful execution.Actual combined-head checks and remaining limits
On combined head
63ef2602a7b7350595f10236097056991a55550e, against integrated target7b0ea7800db3f3faccbaecb665d32b7c61eaf932, the following checks were run. They are build/compile/format/syntax checks only: none is combined-head native execution or a repeat of the source causal controls.The actual embedded installation PowerShell was extracted and parsed with the existing #39573 syntax check:
Exact selected-source blob comparisons are empty for all six paths. The five component stable patch IDs are unchanged: GC
9ce1ab8e4693455de9cabc29865d0ec25bbad81d; picker827e8c61149331f217828896e5472e8451327ad0; Window7c6f60004d0301644f632111f55e2287d2a23119; CollectionView7516fc4bc239efe75d013a330d411af13655cc75; deployment/docs4d1a2fe75762a55516e43db58a4a33e107d78962.pr-finalizefound no blocking combined-code findings and verified the title/body/six-path diff.Still separate/unresolved: #39568's XAML failure, #39570's HybridWebView cleanup, #39574's Navigation behavior, and #39577's Windows wrapper identity/child cleanup are not fixed here. The original osx.26 Catalyst Core cancellation remains unverified execution. Earlier Windows packaged pre-test gaps are not relabeled as passes. The additional nine Essentials iOS CoreCLR CA1416 errors in build 1645823 and Windows Resizetizer SVG cleanup IOException in builds 1645789/1645874 are outside this six-path scope. The analyzer/compiler difference and the locked-file holding process have not been established; neither is dismissed as infrastructure/flaky, suppressed, or retried here.
CI boundary: prior per-fix native/hosted results above belong to their recorded heads, not this aggregate. Fresh automatic checks for the combined head are tracked separately in the check suite; no combined-head hosted success is claimed. No standalone native queue, watcher, retry, local Apple UI/XCTest/screen takeover, product PR edit, or change to the parent-owned investigation comment was made for consolidation.
Issues Fixed
Fixes #39464 (Helix Windows packaged dependency lock).
Also fixes the test-fixture baseline failures identified in this PR's original investigation: GC lifetime orchestration (equivalent to #39529; prior helper correction #39094), five Android file-URI recovery success inputs, the omitted reentrant Window-handler fixture registration, and grouped CollectionView constructor preservation. Consolidated source PRs: #39569, #39571, #39572, #39573. Product PRs #39568, #39570, #39574, #39577 remain separate.