[net12][ci] Remove Mono coverage - #39052
kotlarmilos wants to merge 2 commits into
Conversation
Contributes to dotnet/runtime#134397. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9170c669-e132-46bb-8258-e448425535d6
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 39052Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 39052" |
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Removing the Mono lanes unintentionally leaves Android Material3 and SafeAreaEdges UI suites without any pipeline coverage.
Review effort: Balanced
Findings: 1
What changed in this PR
Removes Mono-based UI and device-test pipeline coverage while retaining CoreCLR Android, NativeAOT iOS, and Windows lanes.
Changes:
- Removes Mono UI-test stages across Android, iOS, and Mac Catalyst.
- Removes Mono device-test jobs and Helix stages.
- Retains CoreCLR Android and Windows coverage.
| File | Description |
|---|---|
eng/pipelines/common/ui-tests.yml |
Removes Mono UI-test build and execution stages. |
eng/pipelines/common/device-tests.yml |
Limits device tests to CoreCLR Android and Windows. |
eng/pipelines/arcade/stage-device-tests.yml |
Removes Mono Helix build and test stages. |
This comment has been minimized.
This comment has been minimized.
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
Note 🔍
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
kubaflo
left a comment
There was a problem hiding this comment.
Should this pr target net11 only - or maybe we want it in net10 too?
|
Ideally this should target .NET 12. When is the snap planned? |
This comment has been minimized.
This comment has been minimized.
|
Note 🔍
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9170c669-e132-46bb-8258-e448425535d6
This comment has been minimized.
This comment has been minimized.
|
/azp run |
|
Note 🔍
|
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
Converting to draft until we have net12 branch |
MauiBot
left a comment
There was a problem hiding this comment.
AI Review Summary
@kotlarmilos — new AI review results are available based on commit
9ee11dc.
🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix
Gate Result: ⚠️ SKIPPED
No tests were detected in this PR.
Recommendation: Add tests to verify the fix using the write-tests-agent.
📋 Pre-Flight — Context & Validation
PR #39052 Pre-Flight
Context
- Title:
[net12][ci] Remove Mono coverage - State: Open, draft
- Base:
dotnet/maui:main - PR head:
kotlarmilos:dev/kotlarmilos/mono-pack-removalat9ee11dc26d4e9a68ff99b50c18bd83c69f6fdf3c - Materialized review commit:
a8e81b9dec - Requested platform: Android
- Gate: Skipped because no tests were detected. Do not rerun the gate or modify
gate/content.md. - Linked work:
dotnet/runtime#134397removes selected .NET 12 Mono runtime and cross-AOT packs and explicitly says the MAUI consumer change belongs onnet12.0, notmain.
Current PR Approach
The current four-file diff has 9 additions and 522 deletions:
eng/pipelines/arcade/stage-device-tests.yml- Deletes Mono device-test build and Helix stages.
- Retains Android CoreCLR and Windows device-test stages.
eng/pipelines/common/device-tests.yml- Removes iOS and Mac Catalyst from the default platform list.
- Deletes Mono Android, iOS, and Mac Catalyst jobs.
- Retains Android CoreCLR and Windows jobs.
eng/pipelines/common/ui-tests.yml- Deletes Mono host and Mono Android/iOS/macOS stages.
- Retains the general Android CoreCLR matrix, optional iOS NativeAOT, and Windows.
- Ports the dedicated Android Material3 and SafeAreaEdges lanes to CoreCLR.
eng/pipelines/common/ui-tests-steps.yml- Adds download support for
ui-tests-samples-material3-coreclr.
- Adds download support for
git diff --check origin/main...HEAD passes.
Resolved Prior Regression
The first revision dropped Android Material3 and SafeAreaEdges coverage. Commit
9ee11dc26d4e9a68ff99b50c18bd83c69f6fdf3c now preserves both:
- Material3 has a separate CoreCLR host, consumes
ui-tests-samples-material3-coreclr, and runs theMaterial3filter. - SafeAreaEdges runs on CoreCLR at API 36 using
pixel_3_xland remains excluded
from the general Android CoreCLR matrix.
An alternative must preserve this corrected behavior and must not repeat the
obsolete wholesale-deletion approach from the first revision.
Remaining Problem to Fix
The Mono-lane removal is a .NET 12 consumer migration, but #39052 still targets
main. The checked-out main baseline uses the .NET 10 SDK
(10.0.113-servicing.26454.107). Applying the deletion unconditionally there
removes current runtime coverage from the wrong product branch. The preferred
repository-level correction is to retarget the PR to net12.0; that operation
is PR metadata, not a source edit. A code candidate is valid only if it
demonstrably preserves existing non-.NET-12 behavior while enabling the
.NET-12 removal without silently making the migration inert. If that cannot be
done entirely within the baseline allow-list, the attempt must report
Blocked rather than edit unrelated files or manufacture a passing result.
Try-Fix Boundary
Each attempt must:
- Invoke the
try-fixskill exactly once and run all of its baseline,
inline-self-review, artifact, and script-only restore steps. - Modify only paths in
.github/.baseline-state.jsonRevertedFiles; if the
required caller or PR metadata is outside that set, reportBlocked. - Use a mechanism different from the submitted unconditional deletion and from
every earlier candidate recorded in the aggregate. - Preserve Android CoreCLR device coverage.
- Preserve the corrected Material3 CoreCLR build/artifact/filter path.
- Preserve SafeAreaEdges CoreCLR API 36/Pixel 3 XL/filter coverage and its
exclusion from the general Android matrix. - Avoid restoring dependencies on .NET 12 Mono runtime/cross-AOT packs in the
.NET 12 path. - Perform no more than one implementation/test pass and one focused
correction/retest. - Never run the gate, a full test suite, a device suite, or a UI suite.
Bounded Validation
No repository test was detected for these Azure Pipelines templates. The one
allowed targeted test command is an attempt-local PowerShell structural
validator saved beneath that attempt's $OUTPUT_DIR, followed by no more than
one correction/retest:
pwsh -NoLogo -NoProfile -File "$OUTPUT_DIR/validate.ps1"
The validator must run git diff --check and assert the candidate's claimed
branch/TFM scoping mechanism. For any implemented candidate it must also assert:
- non-.NET-12/default-main behavior is not stripped of required current lanes;
- the .NET 12 path removes or replaces the selected Mono dependencies;
- Android CoreCLR device coverage remains;
- Material3 has a CoreCLR build, consumes
ui-tests-samples-material3-coreclr, and runs theMaterial3filter; - SafeAreaEdges runs as CoreCLR on API 36/Pixel 3 XL with the
SafeAreaEdgesfilter; - the general Android CoreCLR matrix still excludes SafeAreaEdges.
Static checks cannot prove Azure Pipelines runtime expansion; results must state
that limitation. If the attempt is blocked before implementation, create the
required empty diff/test artifacts and explain why the test command was not
applicable.
🔬 Code Review — Deep Analysis
Expert Code Review — PR #39052
Independent Assessment
What this changes: Removes the Mono device-test and UI-test lanes, retains Android device and UI coverage on CoreCLR, and keeps the existing Windows and optional iOS NativeAOT lanes. The submitted fix also wires the Android Material3 and SafeAreaEdges UI-test lanes to matching CoreCLR build artifacts.
Inferred motivation: .NET 12 no longer needs the duplicated Mono coverage, so the pipeline should preserve supported coverage while eliminating obsolete runtime jobs.
Reconciliation with PR Narrative
The implementation agrees with the stated goal of removing Mono coverage, but the description understates the important migration work: Android Material3 and SafeAreaEdges are explicitly moved to CoreCLR, while iOS and MacCatalyst Mono device/UI coverage is removed.
Prior Review Reconciliation
| Prior ❌ Error Finding | Source | Status | Evidence |
|---|---|---|---|
| Removing the Mono build left Android Material3 and SafeAreaEdges without usable artifacts | Prior Copilot/MauiBot review comments | ✅ Fixed | ui-tests.yml now builds and runs both lanes with runtimeVariant: "CoreCLR"; ui-tests-steps.yml downloads ui-tests-samples-material3-coreclr; SafeAreaEdges depends on build_ui_tests_coreclr. |
The earlier net12 retargeting note remains a branch/process discussion, not a concrete defect in the submitted lines.
Blast Radius Assessment
- Runs for all instances: The templates affect every consuming device/UI pipeline, but the retained jobs are selected by existing platform and runtime conditions.
- Startup impact: Not applicable; this changes CI pipeline topology and artifact routing.
- Static/shared state: None.
- Coverage impact: Mono Android, iOS, and MacCatalyst lanes are removed. Android CoreCLR, Windows, and optional iOS NativeAOT coverage remain.
CI and Gate Status
- Gate:
⚠️ SKIPPED — no tests detected in this PR. - Required checks: GitHub CLI authentication was unavailable; anonymous check-run evidence for PR head
9ee11dc26d4e9a68ff99b50c18bd83c69f6fdf3cshowed checks still in progress. - Classification: Pending/undetermined; confidence is capped at low and the review cannot return LGTM yet.
Findings
No actionable file-line findings remain in the current submitted diff. The required inline-findings.json therefore contains an empty JSON array.
Failure-Mode Probing
- Material3 after removing Mono: The build publishes
ui-tests-samples-material3-coreclr, and the matching test job downloads that artifact underruntimeVariant=CoreCLRplususeMaterial3=true. - SafeAreaEdges after removing Mono: The common Android matrix still excludes the category, while the dedicated API 36 Pixel 3 XL stage now depends on the CoreCLR build and passes
runtimeVariant: "CoreCLR". - Template compatibility: Existing callers remain compatible. Some removed-platform pool parameters are now unused, but they do not break template expansion.
External Output Contract
Not applicable.
Verdict: NEEDS_DISCUSSION
Confidence: low
Summary: The submitted implementation is internally consistent and resolves the previously reported Android CoreCLR artifact gaps. No reviewer code patch is warranted; only completion of pending CI and the separate branch-targeting discussion prevent an LGTM verdict.
🛠️ Try-Fix — Analysis & Comparison
PR #39052 Try-Fix Aggregate
Candidate 1 — TFM-scoped Mono-lane conditions
Model: gpt-5.3-codex
Result: Fail
Approach: Preserve the existing Mono stage/job definitions for non-.NET-12
invocations and gate them with net12.0 conditions, rather than deleting them
unconditionally from shared templates. Android CoreCLR remains active, and the
current head's Material3 and SafeAreaEdges CoreCLR replacements are retained.
Prior approach avoided: The submitted PR unconditionally deletes the Mono
lanes from shared templates, so the .NET 12 migration also strips current-main
coverage. Candidate 1 keeps those definitions available outside net12.0 and
skips them only for the intended TFM.
Mechanism-level difference: TargetFrameworkVersion /
targetFrameworkVersion.tfm conditions control device stages and jobs, while a
new UI-template targetFrameworkVersion parameter controls Mono UI stages.
Consequently, non-.NET-12 expansion retains existing lanes and .NET 12 expansion
omits them without removing Android CoreCLR coverage.
Files changed during attempt:
eng/pipelines/arcade/stage-device-tests.ymleng/pipelines/common/device-tests.ymleng/pipelines/common/ui-tests.ymleng/pipelines/common/ui-tests-steps.yml
Meaningful diff:
- Adds
net12.0conditions to Mono device-test build/run stages. - Adds TFM conditions to common device-test platform jobs.
- Adds a
targetFrameworkVersionUI-template parameter and gates Mono UI stages. - Keeps the Material3 host/test path on CoreCLR and downloads
ui-tests-samples-material3-coreclr. - Keeps SafeAreaEdges on the API 36 Pixel 3 XL CoreCLR path and excluded from
the general Android matrix.
The exact captured patch is in:
CustomAgentLogsTmp/PRState/39052/PRAgent/try-fix-1/content.mdCustomAgentLogsTmp/PRState/39052/PRAgent/try-fix/attempt-1/fix.diff
Validation command:
pwsh -NoLogo -NoProfile -File "$OUTPUT_DIR/validate.ps1"
Attempt-local validation result: Pass. git diff --check and the scoped structural
assertions passed for TFM scoping, non-.NET-12 lane preservation, Android
CoreCLR device coverage, Material3 CoreCLR build/artifact/filter coverage, and
SafeAreaEdges CoreCLR API 36 Pixel 3 XL/filter coverage with general-matrix
exclusion.
Integration verification: Fail. Neither eng/pipelines/ui-tests.yml nor
eng/pipelines/ci-uitests.yml passes the new targetFrameworkVersion
parameter. Its net10.0 default therefore keeps all gated Mono UI stages active
on net12.0, making the intended UI migration inert.
Self-review: Clean, 0 findings.
Failure analysis: The device-template TFM conditions are wired to existing
parameters, but the new UI parameter has no authoritative caller wiring.
Correcting that requires tracked caller edits outside the baseline allow-list.
The candidate was not reopened or retested; its captured diff and original test
output remain intact.
Restoration: pwsh .github/scripts/EstablishBrokenBaseline.ps1 -Restore
completed with Restored True.
Candidate 2 — Explicit caller-owned migration switch
Model: gpt-5.6-sol
Result: Blocked
Approach evaluated: Preserve the Mono definitions in the shared templates
and introduce an explicit boolean policy switch that authoritative pipeline
callers set for their product branch. Current main callers would retain Mono
coverage, while net12.0 callers would disable it.
Prior approaches avoided: Candidate 2 avoided both the submitted PR's
unconditional deletion and Candidate 1's in-template net12.0 TFM comparisons.
Its proposed mechanism makes branch/product orchestration own the policy rather
than inferring it inside shared templates.
Mechanism-level difference and block: The required authoritative callers
are outside .github/.baseline-state.json RevertedFiles, which allows edits
only to the four PR files. Implementing the switch only in those templates
cannot choose a safe default: default-on makes the .NET 12 migration inert,
while default-off removes current-main coverage. Branch-variable inference was
rejected because Azure Pipelines exposes different source/target values for PR
and push builds and those values are not uniformly available during template
expansion. The safe correction is to retarget #39052 to net12.0, which is PR
metadata rather than an allowed source edit.
Files changed during attempt: None.
Exact captured diff: Empty. The zero-byte patch is at:
CustomAgentLogsTmp/PRState/39052/PRAgent/try-fix-2/content.mdCustomAgentLogsTmp/PRState/39052/PRAgent/try-fix/attempt-2/fix.diff
Prescribed validation command:
pwsh -NoLogo -NoProfile -File "$OUTPUT_DIR/validate.ps1"
Validation result: Not run because the attempt was blocked before
implementation. No validate.ps1 was created; test-output.log is empty. No
gate, full suite, device test, or UI test ran.
Failure analysis: A distinct explicit-policy design requires coordinated
caller edits outside the baseline allow-list. Restricting it to the shared
templates would either preserve Mono on .NET 12 or remove it from current
main, so a passing static assertion would be misleading.
Self-review: Clean, 0 findings; final diff was empty.
Restoration: pwsh .github/scripts/EstablishBrokenBaseline.ps1 -Restore
completed with Restored True.
Comparison
| Candidate | Mechanism | Result | Key tradeoff |
|---|---|---|---|
| 1 | Gate retained Mono lanes by net12.0 TFM parameters/conditions |
Fail | The new UI TFM parameter is not supplied by either authoritative caller, so Mono UI remains active on net12.0. |
| 2 | Explicit caller-owned migration switch | Blocked | Cleaner ownership than branch/TFM inference, but cannot be activated end-to-end within the baseline allow-list. |
No candidate is viable within the four-file baseline boundary. Candidate 1 is
implemented but incomplete; Candidate 2 correctly identifies that safe policy
wiring requires out-of-bound callers. The required action is to retarget #39052
to net12.0, as specified by dotnet/runtime#134397, rather than adding
branch-version policy to shared templates on main.
📝 PR Finalize — Recommended Title & Description
Assessment: ✏️ Recommend updating — the current description is accurate but too vague to explain which Mono lanes are removed, which coverage remains, or the Android CoreCLR migration included in the submitted diff.
Recommended title
[.NET 12] CI: Remove Mono device and UI test coverage
Recommended description
## Description
This PR removes Mono coverage from the shared device-test and UI-test pipeline templates:
- Removes the Mono Android, iOS, and Mac Catalyst device-test lanes.
- Removes the Mono Android, iOS, and macOS UI-test lanes.
- Retains Android device and UI coverage on CoreCLR, including the dedicated Material3 and SafeAreaEdges lanes.
- Retains Windows coverage and the optional iOS NativeAOT UI-test lane.
Contributes to dotnet/runtime#134397.
> [!NOTE]
> Prepared with GitHub Copilot.
🏁 Report — Final Recommendation
⚠️ Final Recommendation: REQUEST CHANGES
Winner: pr
The raw submitted PR is the strongest source candidate. Its current revision removes the intended Mono lanes while preserving Android CoreCLR device/UI coverage, Material3's CoreCLR artifact path, the dedicated SafeAreaEdges API 36 Pixel 3 XL lane, Windows coverage, and the optional iOS NativeAOT path. The expert review found no remaining actionable file-line defect.
This is not an approval recommendation. The change is a .NET 12 consumer migration but #39052 still targets main; the linked dotnet/runtime#134397 explicitly places the MAUI consumer change on net12.0. In addition, the trusted Gate was skipped because no tests were detected and current check-run evidence is pending, so the approval preconditions are not met.
Candidate Comparison
| Rank | Candidate | Result | Validation evidence | Assessment |
|---|---|---|---|---|
| 1 | pr |
Winner; source fix is sound, metadata/CI action still required | Exact diff passes git diff --check; expert template/artifact trace found no actionable defect; Gate skipped; CI pending |
Only viable implementation. Retarget the PR to net12.0 and wait for the intended branch CI before approval. |
| 2 | pr-plus-reviewer |
Equivalent to pr |
Sandbox identity and immutable baseline verified; reviewer.patch is empty |
The reviewer found no source improvement to apply, so this candidate adds no value over the raw PR and cannot displace it. |
| 3 | try-fix-2 |
Blocked | No implementation and no validation run | Correctly identifies an explicit caller-owned switch as safer than branch inference, but required caller files are outside the allowed boundary. It is not a usable candidate. |
| 4 | try-fix-1 |
Fail | Attempt-local structural validator passed, but end-to-end caller integration verification failed | The new UI targetFrameworkVersion defaults to net10.0, and neither authoritative UI caller supplies it. Mono UI lanes therefore remain active on net12.0, making the migration inert. This known integration regression ranks it below the non-failing candidates. |
Expert Review
- Verdict:
NEEDS_DISCUSSION - Confidence: Low because required CI is pending/undetermined and the Gate did not run.
- Inline findings: None;
inline-findings.jsoncontains[]. - Resolved prior error: The earlier Material3/SafeAreaEdges coverage loss is fixed in the submitted PR HEAD.
- Reviewer refinement: No patch warranted.
Why the Alternatives Lose
try-fix-1 tries to preserve current-main Mono coverage through TFM conditions, but its UI policy never reaches the shared template from either authoritative caller. Its local validator tested the template in isolation and missed that integration contract. try-fix-2 recognizes the correct ownership boundary but cannot implement its explicit switch within the four-file allow-list. Neither is safer or more complete than retargeting the already-correct submitted source diff.
Required Before Approval
- Retarget #39052 from
maintonet12.0, as required by dotnet/runtime#134397. - Confirm the retargeted PR's required CI completes successfully. The skipped Gate and pending checks cannot be treated as passing validation.
No additional reviewer source patch is recommended.
🧭 Next Steps — review latest findings
No alternative fix was selected for this run. Review the session findings and CI results before merging.
This comment has been minimized.
This comment has been minimized.
Tests Failure Analysis
🧪 CI Analysis — click to expand📊 maui-prNo failures found. 🧪 maui-pr-devicetestsNo failures found. 🧪 maui-pr-uitests
🧭 Follow-up — actions and refreshNext action: Restore complete diagnostics; compare failing cases at identical runtime/setup and inspect Shell crash logs.
|

Description
This PR removes Mono coverage.
Contributes to dotnet/runtime#134397.
Note
Prepared with GitHub Copilot.