Skip to content

Fix nested OnPlatform and OnIdiom source generation - #39373

Merged
kubaflo merged 1 commit into
net11.0from
test/39341-nested-onplatform-onidiom
Oct 14, 2026
Merged

kubaflo merged 1 commit into
net11.0from
test/39341-nested-onplatform-onidiom

Conversation

@StephaneDelcroix

Copy link
Copy Markdown
Contributor

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

Keep XAML node parent links synchronized when SimplifyOnPlatformVisitor replaces an OnPlatform node with its selected value. This allows nested markup extensions such as OnIdiom to resolve the final target property during Android source generation instead of receiving a null IProvideValueTarget property.

Adds regression coverage for both nesting orders:

  • OnPlatform containing OnIdiom, which reproduced the crash.
  • OnIdiom containing OnPlatform, to preserve the already-working reverse order.

Validation:

  • dotnet test src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj -c Debug --no-restore --filter "FullyQualifiedName~Maui39341" — passed, 8/8.
  • dotnet test src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj -c Debug --no-restore --no-build — 2,138 passed, 8 skipped, 2 unrelated failures in existing decimal-culture tests (TwoWayDecimalBinding_INPC and TwoWayDecimalBinding_VMToUI); both failures reproduce when run independently.

Issues Fixed

Fixes #39341

Keep replacement node parent links synchronized when simplifying OnPlatform expressions so nested markup extensions receive the final target property.

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

Copilot-Session: c95b3039-fd19-4865-94d8-591f6237b063
Copilot AI balanced review requested due to automatic review settings October 14, 2026 07:29
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 39373

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 39373"

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The localized AST fix is consistent across replacement paths and has focused regression coverage.

0 open findings

What changed in this PR

Fixes nested OnPlatform/OnIdiom source generation by maintaining XAML AST parent links after node replacement.

Changes:

  • Reparents property and collection replacements.
  • Adds regression coverage for both nesting orders.
  • Verifies Android generation targets Label.TextProperty.
File Description
SimplifyOnPlatformVisitor.cs Synchronizes replacement-node parent links.
Maui39341OnPlatformOuter.xaml Defines OnPlatform-outer regression case.
Maui39341OnPlatformOuter.xaml.cs Tests behavior and generated target property.
Maui39341OnIdiomOuter.xaml Defines reverse nesting case.
Maui39341OnIdiomOuter.xaml.cs Tests reverse-order behavior and generation.

🧠 Review effort: Balanced

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Oct 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Note

🔍 /review started

AzDO build 15682076 is running for android.

The s/agent-review-in-progress label stays on this PR through the full pipeline. The final AI Summary and outcome labels are posted only after Gate, expert review, and Deep UI tests finish.

github-actions[bot]

This comment was marked as outdated.

@kubaflo

kubaflo commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@kubaflo
kubaflo merged commit ae1ffe3 into net11.0 Oct 14, 2026
132 of 176 checks passed
@kubaflo
kubaflo deleted the test/39341-nested-onplatform-onidiom branch October 14, 2026 13:10
@github-actions github-actions Bot added this to the .NET 11.0-rc2 milestone Oct 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Expert Review

@StephaneDelcroix — expert-review status for commit 2f6d9e3.

Scope source review Commit 2f6d9e3

Status: PR closed. No validated expert review was published.

Merge recommendation: NO. This PR is closed.


🔎 Expert Analysis — click to expand

The /review expert-review workflow could not publish a validated review. This is an automation status notice, not a code or test verdict. The PR is now closed; no inline findings were posted.

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review Summary

@StephaneDelcroix — new AI review results are available based on commit 2f6d9e3.

Gate Passed Confidence Unknown Platform Android


🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix

Gate Result: ✅ PASSED

Platform: ANDROID · Base: net11.0 · Merge base: 79783a07

✅ Fix verified — 1 test(s) reproduce the bug (FAIL without the fix → PASS with it). 1 test(s) pass in both states and are not bug-reproducing; under the "at least one test reproduces the bug and none regress" rule they don't block the gate.

Test Without Fix (expect FAIL) With Fix (expect PASS)
📄 Maui39341OnIdiomOuter Maui39341OnIdiomOuter ❌ PASS — 179s ✅ PASS — 33s
📄 Maui39341OnPlatformOuter Maui39341OnPlatformOuter ✅ FAIL — 29s ✅ PASS — 29s
🔴 Without fix — 📄 Maui39341OnIdiomOuter: PASS ❌ · 179s

(no coded error found; showing last 1200 chars)

tnet/maui/fundamentals/data-binding/compiled-bindings for more information. [/home/vsts/work/1/s/src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj]
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.Xaml.UnitTests/Debug/net11.0/Microsoft.Maui.Controls.Xaml.UnitTests.dll (.NETCoreApp,Version=v11.0)
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 11.0.0-rtm.26480.113)
[xUnit.net 00:00:00.40]   Discovering: Microsoft.Maui.Controls.Xaml.UnitTests
[xUnit.net 00:00:04.86]   Discovered:  Microsoft.Maui.Controls.Xaml.UnitTests
[xUnit.net 00:00:04.87]   Starting:    Microsoft.Maui.Controls.Xaml.UnitTests
[xUnit.net 00:00:06.26]   Finished:    Microsoft.Maui.Controls.Xaml.UnitTests
  Passed AndroidSourceGeneratorUsesFinalTargetPropertyForNestedOnPlatform [1 s]
  Passed OnPlatformNestedInOnIdiomUsesFinalTargetProperty(inflator: XamlC) [62 ms]
  Passed OnPlatformNestedInOnIdiomUsesFinalTargetProperty(inflator: SourceGen) [3 ms]
  Passed OnPlatformNestedInOnIdiomUsesFinalTargetProperty(inflator: Runtime) [56 ms]
Test Run Successful.
Total tests: 4
     Passed: 4
 Total time: 6.9474 Seconds
🟢 With fix — 📄 Maui39341OnIdiomOuter: PASS ✅ · 33s
  Determining projects to restore...
  All projects are up-to-date for restore.
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.Xaml.UnitTests/Debug/net11.0/Microsoft.Maui.Controls.Xaml.UnitTests.dll (.NETCoreApp,Version=v11.0)
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.01] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 11.0.0-rtm.26480.113)
[xUnit.net 00:00:00.50]   Discovering: Microsoft.Maui.Controls.Xaml.UnitTests
[xUnit.net 00:00:08.54]   Discovered:  Microsoft.Maui.Controls.Xaml.UnitTests
[xUnit.net 00:00:08.55]   Starting:    Microsoft.Maui.Controls.Xaml.UnitTests
  Passed AndroidSourceGeneratorUsesFinalTargetPropertyForNestedOnPlatform [1 s]
[xUnit.net 00:00:10.35]   Finished:    Microsoft.Maui.Controls.Xaml.UnitTests
  Passed OnPlatformNestedInOnIdiomUsesFinalTargetProperty(inflator: XamlC) [65 ms]
  Passed OnPlatformNestedInOnIdiomUsesFinalTargetProperty(inflator: SourceGen) [3 ms]
  Passed OnPlatformNestedInOnIdiomUsesFinalTargetProperty(inflator: Runtime) [51 ms]
Test Run Successful.
Total tests: 4
     Passed: 4
 Total time: 11.4326 Seconds
🔴 Without fix — 📄 Maui39341OnPlatformOuter: FAIL ✅ · 29s

Error-relevant lines (filtered from the build log):

     at Microsoft.Maui.Controls.Xaml.UnitTests.Maui39341OnPlatformOuter.Tests.AndroidSourceGeneratorUsesFinalTargetPropertyForNestedOnIdiom() in /_/src/Controls/tests/Xaml.UnitTests/Issues/Maui39341OnPlatformOuter.xaml.cs:line 52
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
🟢 With fix — 📄 Maui39341OnPlatformOuter: PASS ✅ · 29s
  Determining projects to restore...
  All projects are up-to-date for restore.
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.Xaml.UnitTests/Debug/net11.0/Microsoft.Maui.Controls.Xaml.UnitTests.dll (.NETCoreApp,Version=v11.0)
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.01] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 11.0.0-rtm.26480.113)
[xUnit.net 00:00:00.56]   Discovering: Microsoft.Maui.Controls.Xaml.UnitTests
[xUnit.net 00:00:08.18]   Discovered:  Microsoft.Maui.Controls.Xaml.UnitTests
[xUnit.net 00:00:08.19]   Starting:    Microsoft.Maui.Controls.Xaml.UnitTests
  Passed OnIdiomNestedInOnPlatformUsesFinalTargetProperty(inflator: XamlC) [112 ms]
  Passed OnIdiomNestedInOnPlatformUsesFinalTargetProperty(inflator: SourceGen) [8 ms]
  Passed OnIdiomNestedInOnPlatformUsesFinalTargetProperty(inflator: Runtime) [102 ms]
[xUnit.net 00:00:10.14]   Finished:    Microsoft.Maui.Controls.Xaml.UnitTests
  Passed AndroidSourceGeneratorUsesFinalTargetPropertyForNestedOnIdiom [1 s]
Test Run Successful.
Total tests: 4
     Passed: 4
 Total time: 11.0364 Seconds

⚠️ Failure Details

  • ❌ Maui39341OnIdiomOuter PASSED without fix (should fail) — tests don't catch the bug
📁 Fix files reverted (1 files)
  • src/Controls/src/Xaml/SimplifyOnPlatformVisitor.cs

📋 Pre-Flight — Context & Validation

PR #39373 Pre-Flight

Context

  • PR: Fix nested OnPlatform and OnIdiom source generation
  • Issue: #39341, [XSG] OnIdiom nested inside OnPlatform throws "Cannot determine property to provide the value for" on Android
  • Base: net11.0 at merge base 79783a07
  • Materialized PR commit: 168d3e5d5421c50614463046e6ab3a4633cc2fab
  • Target platform: Android
  • Reported behavior: Android XAML source generation leaves the nested OnIdiomExtension without its final target property after OnPlatform is simplified. At runtime, ProvideValue throws because IProvideValueTarget.TargetProperty is null. XamlC works.
  • Gate: Already passed. Maui39341OnPlatformOuter fails without the production fix and passes with it. Maui39341OnIdiomOuter passes in both states and is retained as reverse-nesting regression coverage. The gate must not be rerun or overwritten.

Existing PR Approach

The PR changes src/Controls/src/Xaml/SimplifyOnPlatformVisitor.cs so every node inserted while simplifying OnPlatform has its Parent updated to the new owner:

  • Direct property replacements use a new SetProperty helper that assigns both Properties[name] and value.Parent.
  • Collection replacements use a new SetCollectionItem helper that assigns both CollectionItems[index] and value.Parent.
  • x:Key transfers use the same property helper.
  • A ValueNode wrapped in a newly synthesized element has its parent set to that element.

This is a broad tree-invariant repair at each mutation site in SimplifyOnPlatformVisitor.

PR Diff

File Change
src/Controls/src/Xaml/SimplifyOnPlatformVisitor.cs +19 / -6
src/Controls/tests/Xaml.UnitTests/Issues/Maui39341OnIdiomOuter.xaml +7
src/Controls/tests/Xaml.UnitTests/Issues/Maui39341OnIdiomOuter.xaml.cs +60
src/Controls/tests/Xaml.UnitTests/Issues/Maui39341OnPlatformOuter.xaml +7
src/Controls/tests/Xaml.UnitTests/Issues/Maui39341OnPlatformOuter.xaml.cs +60

The tests cover both nesting orders across Runtime, XamlC, and SourceGen, plus Android-targeted generated-code assertions that reject a null target property and require Label.TextProperty.

Bounded Try-Fix Inputs

  • Problem: Produce an alternative implementation that fixes Android XSG for {OnPlatform Android={OnIdiom ...}} without repeating the PR's broad mutation-site helper approach.

  • Editable production target: src/Controls/src/Xaml/SimplifyOnPlatformVisitor.cs, subject to the allow-list emitted by EstablishBrokenBaseline.ps1.

  • Read-only regression tests: the four Maui39341OnIdiomOuter / Maui39341OnPlatformOuter XAML and code-behind files added by the PR.

  • Primary plus mandatory regression test command:

    dotnet test src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj -c Debug --no-restore --filter "FullyQualifiedName~Maui39341"

    This runs only the eight targeted tests: the reproducing outer-OnPlatform tests and the reverse-nesting regression tests.

Workspace Constraints

The checkout contains pre-existing, unrelated modifications under .github/scripts/, .github/skills/verify-tests-fail-without-fix/scripts/, and eng/scripts/. They are harness-owned and must not be edited, restored, or cleaned. Each try-fix attempt must use only pwsh .github/scripts/EstablishBrokenBaseline.ps1 and its exact -Restore mode for baseline handling.


🔬 Code Review — Deep Analysis

Code Review — PR #39373

Verdict

LGTM

Confidence

medium

Independent Assessment

The fix preserves XAML AST parent links whenever SimplifyOnPlatformVisitor replaces an OnPlatform or OnPlatformExtension node with its selected child. Property and collection replacements now update both containment and Parent, including transferred x:Key nodes and ValueNode instances wrapped in synthesized elements.

Because this visitor runs before both XamlC object creation and source-generator value creation, repairing the tree invariant at the mutation point gives nested markup extensions the final target-property context needed by IProvideValueTarget.

Findings

No actionable findings. The required inline-findings artifact contains an empty JSON array.

Failure-Mode Analysis

  • Both nesting orders for OnPlatform and OnIdiom are covered.
  • Both property and collection replacement paths update parent pointers.
  • The x:Key transfer path uses the same invariant-preserving helper.
  • The visitor remains in the correct pipeline phase for both XamlC and source generation.
  • No concrete failure mode was found on a changed line.

Tests and Coverage

The regression tests exercise Maui39341OnIdiomOuter and Maui39341OnPlatformOuter through runtime/XamlC behavior and Android source-generation assertions. The generated-code checks require Label.TextProperty and reject a null target property, directly covering the reported failure mechanism.

The trusted gate passed: the reproducing test fails without the production fix and passes with it.

Prior Review and CI Reconciliation

No unresolved prior error-level finding was found. Required-check evidence for the PR head showed successful completion, with no failing or pending required signal observed.

External Output Contract

Not applicable.

Reviewer Patch

No consolidated reviewer patch is warranted because the expert review found no validated issue to correct.


🛠️ Try-Fix — Analysis & Comparison

Try-Fix Aggregate — PR #39373

Generated: 2026-10-14T10:35:03.264845+00:00

Candidate 1 — PR #39373 (try-fix)

Approach Description

Attempted a mechanism-level alternative: preserve explicit final target-property context on the selected replacement/nested node during OnPlatform simplification, instead of broad parent-pointer rebinding helpers at mutation sites.

Mechanism-Level Difference from PR

  • PR mechanism: generic mutation helpers (SetProperty/SetCollectionItem) enforce value.Parent assignment for all property/collection writes, plus parent assignment when wrapping a value node.
  • Candidate mechanism: semantic target-context preservation on the chosen replacement path so nested markup (OnIdiom) resolves the final target property independently of parent-chain reattachment timing.

Files Changed

  • None (blocked before implementation).

Full Captured Diff

Test Invocation

dotnet test src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj -c Debug --no-restore --filter "FullyQualifiedName~Maui39341"

Test Results

Not executed in this attempt due to mandatory baseline failure.

Captured Test Log

Blocked before implementation/testing.
Reason: EstablishBrokenBaseline.ps1 failed with dirty working directory from pre-existing unrelated tracked modifications, and -Restore reported no baseline state.
Required test command not executed because baseline establishment is mandatory before editing/testing.

Self-Review Count

  • 0 findings (reviewer-findings.json = [])

Result

Blocked

Failure Analysis

EstablishBrokenBaseline.ps1 refused to establish baseline because of pre-existing unrelated tracked changes; -Restore reported no baseline state. Per try-fix baseline boundary rules, implementation/testing could not proceed safely within allow-listed restoration guarantees.


Candidate 2 — PR #39373 (try-fix)

Approach Description

Designed a lifecycle-based alternative: keep SimplifyOnPlatformVisitor bottom-up and, from its final Visit(RootNode, ...) phase, run the existing parent-assignment visitor across the final reachable tree after all OnPlatform replacements have completed. This canonical phase-boundary normalization would make the selected nested OnIdiom node's Parent reflect its actual final owner before SourceGen creates values and resolves IProvideValueTarget.TargetProperty.

The approach was not implemented because the mandatory baseline could not be established.

Explicit Differences from the PR and Candidate 1

  • PR mechanism avoided: the PR uses broad mutation helpers in SimplifyOnPlatformVisitor to set value.Parent during every property replacement, collection replacement, x:Key transfer, and wrapper insertion. Candidate 2 would not repair individual mutation sites; it would rebuild parent links once from final tree containment at the visitor phase boundary.
  • Candidate 1 mechanism avoided: Candidate 1 proposed preserving explicit semantic final target-property context on the selected replacement path. Candidate 2 would carry no target-property metadata and add no selected-path context; downstream resolution would use the ordinary structural lookup after the final tree has been normalized.
  • Cause-to-effect distinction: mutation-site repair tries to maintain an invariant continuously, while explicit target context bypasses the broken structural chain. Candidate 2 allows simplification to finish, then derives the structural chain canonically from the final reachable graph, so the stale pre-replacement parent is replaced before value creation.

Files Changed

  • None. Baseline failure occurred before any tracked file was edited.

Full Captured Diff

The diff is empty because Candidate 2 made no attempt-created tracked changes. The known unrelated pre-existing workspace changes are not candidate changes and were left untouched.

Baseline Result

The mandatory command was run and captured in try-fix/attempt-2/baseline.log:

pwsh .github/scripts/EstablishBrokenBaseline.ps1

It failed because the workspace already contained the warned-about unrelated tracked changes under .github/scripts/, .github/skills/verify-tests-fail-without-fix/scripts/, and eng/scripts/. No .github/.baseline-state.json was created, so there was no RevertedFiles allow-list.

Exact Test Invocation and Results

Required bounded command:

dotnet test src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj -c Debug --no-restore --filter "FullyQualifiedName~Maui39341"

Result: Not executed. The contract requires a successful baseline and allow-list before implementation or testing. test-output.log records the blocked state and the exact unexecuted command. No full suite or gate verification was run.

Inline MAUI Expert Self-Review

  • Findings count: 0 (reviewer-findings.json = [])
  • Review scope: Overarching principles; always-active Logic and Correctness, Regression Prevention, and Complexity Reduction; routed XAML & Bindings and Trimming/AOT guidance.
  • Reason: There was no Candidate 2 code diff to review. No findings were invented for the unrelated pre-existing workspace changes.

Result

Blocked

Failure Analysis

EstablishBrokenBaseline.ps1 rejected the dirty working directory before detecting or reverting PR fix files. Because it created no baseline state, editing src/Controls/src/Xaml/SimplifyOnPlatformVisitor.cs would have violated the baseline allow-list and script-only restoration contract. The unrelated tracked changes were not edited, restored, stashed, or cleaned. The proposed lifecycle mechanism therefore remains unimplemented and untested; no pass is claimed.

The mandatory restore command was then run exactly:

pwsh .github/scripts/EstablishBrokenBaseline.ps1 -Restore

It reported No baseline state found and Restored False, which is the expected restore outcome for this verified no-state, no-attempt-edit blocked path.

Artifact Location

CustomAgentLogsTmp/PRState/39373/PRAgent/try-fix/attempt-2


📝 PR Finalize — Recommended Title & Description

Assessment: ✏️ Recommend updating — the description is accurate and complete, but the title should add the Android platform and XAML component prefixes required for a searchable squash-commit headline.

Recommended title

[Android] XAML: Fix nested OnPlatform and OnIdiom source generation

Recommended description

### Description of Change

Keep XAML node parent links synchronized when `SimplifyOnPlatformVisitor` replaces an `OnPlatform` node with its selected value. This allows nested markup extensions such as `OnIdiom` to resolve the final target property during Android source generation instead of receiving a null `IProvideValueTarget` property.

Adds regression coverage for both nesting orders:

- `OnPlatform` containing `OnIdiom`, which reproduced the crash.
- `OnIdiom` containing `OnPlatform`, to preserve the already-working reverse order.

Validation:

- `dotnet test src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj -c Debug --no-restore --filter "FullyQualifiedName~Maui39341"` — passed, 8/8.
- `dotnet test src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj -c Debug --no-restore --no-build` — 2,138 passed, 8 skipped, 2 unrelated failures in existing decimal-culture tests (`TwoWayDecimalBinding_INPC` and `TwoWayDecimalBinding_VMToUI`); both failures reproduce when run independently.

### Issues Fixed

Fixes #39341

🏁 Report — Final Recommendation

✅ Final Recommendation: APPROVE

Winner: pr

The submitted PR is the strongest candidate. It implements a focused tree-invariant repair, has a trusted passing regression gate, and received an expert LGTM with no blocking errors, discussion items, or inline findings. pr-plus-reviewer is intentionally identical because the reviewer found nothing to improve, so the raw PR wins the tie without requiring any unsubmitted change.

Comparative Ranking

Rank Candidate Implementation Regression evidence Expert assessment Decision
1 pr Repairs Parent links at every affected mutation site in SimplifyOnPlatformVisitor Trusted Gate passed: reproducer fails without the fix and passes with it; both nesting orders are covered LGTM, medium confidence, no findings Winner
2 pr-plus-reviewer No reviewer delta; candidate files are byte-for-byte equivalent to pr Inherits the same trusted passing Gate because no candidate code changed No patch warranted Equivalent but adds no improvement
3 try-fix-1 Proposed selected-path target-property context, but produced no code Blocked before the required test command; no pass claimed No diff to review Lower evidence
4 try-fix-2 Proposed a final-tree parent normalization pass, but produced no code Blocked before the required test command; no pass claimed No diff to review Lower evidence

No candidate recorded a regression-test failure. The decisive distinction is that pr passed the trusted regression gate, while both try-fix alternatives remained unimplemented and untested; they therefore cannot outrank a validated fix.

Why the PR Fix Wins

  • It fixes the demonstrated root cause rather than special-casing OnIdiom: replacement nodes receive the Parent of their actual final property or collection owner.
  • The invariant is applied consistently to direct property replacement, default collection-value replacement, collection-item replacement, transferred x:Key nodes, and synthesized wrapper elements.
  • Tests cover both {OnPlatform ... {OnIdiom ...}} and {OnIdiom ... {OnPlatform ...}} across runtime/XamlC behavior and Android source generation.
  • Generated-code assertions directly require Label.TextProperty and reject a null target property, so coverage measures the failure mechanism rather than only checking that generation completes.
  • The expert reviewer found no actionable correctness, lifecycle, regression, or maintainability issue. inline-findings.json is [].

Candidate Refinement Outcome

The required sandbox resolved to /home/vsts/work/_temp/pr-39373-pr-plus-reviewer at immutable baseline edd91eaf87e5e9aa6bb0139c46f60a1cb3aa4694. Its baseline diff check passed. Because the expert review produced no feedback, no source edit or test rerun was appropriate:

  • reviewer.patch is empty.
  • candidate.patch contains the complete submitted PR diff against 79783a07a7b042f5b5ec2b568c03e56089315a1d.
  • The targeted command was not rerun because doing so would duplicate the trusted Gate verification expressly excluded by the task.

Residual Uncertainty

Confidence remains medium, matching the expert review. The focused gate is authoritative for the reported regression, but this comparison did not rerun a full XAML suite. The PR description records two unrelated decimal-culture failures in its prior full-suite run; neither affects the targeted passing result or supplies evidence against this fix.


📱 UI Tests — Button,Label,Layout

Detected UI test categories: Button,Label,Layout

✅ Deep UI tests — 227 passed, 0 failed, 4 skipped across 2 categories on platform-pool agent (replaces in-process counts above). The deep UI run for 1 category (Layout) exceeded the per-category time budget (a very long-running category or a slow build/deploy) and was stopped before finishing. This is an infrastructure/timeout issue, not a code problem; re-run the review, and if a category consistently needs more time the per-category budget can be raised (DEEP_UITEST_CATEGORY_CAP_MIN / DEEP_UITEST_HARDSTOP_MIN). See the build-output.log in the drop-deep-uitests artifact.

🧪 UI Test Execution Results (deep, platform pool)

Category Tests Snapshot diffs
Button 104/106 (2 skipped) ✓ —
Label 123/125 (2 skipped) ✓ —
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)

🧭 Next Steps — review latest findings

No alternative fix was selected for this run. Review the session findings and CI results before merging.

@MauiBot MauiBot added s/agent-approved AI agent recommends approval - PR fix is correct and optimal s/agent-gate-passed AI verified tests catch the bug (fail without fix, pass with fix) s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Oct 14, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 2f6d9e35 Deployed Oct 14, 2026 by StephaneDelcroix via conclusion #2343
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

s/agent-approved AI agent recommends approval - PR fix is correct and optimal s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-gate-passed AI verified tests catch the bug (fail without fix, pass with fix) s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants