Repository navigation
Conversation
The agent picks platforms and UI test categories from the PR diff. A trusted safe-output job validates the choice against the pipeline inventory, queues maui-pr-uitests as a pull-request build so Azure Pipelines reports native checks on the PR head, publishes a Skipped check for every platform and category that was not selected, and posts a collapsible summary comment that is updated when the run finishes.
The agent reads the collected context and uses GitHub read tools; it never needs PR code on disk.
The previous expression also enabled the zero-test guard in the default full run, which failed every job whose test step did not produce results. The dispatcher always sets selectedRun for targeted runs.
Untyped template parameters receive the boolean as the string 'False',
which is truthy in a bare ${{ if }}.
…nly selection - Hand the AI proposal to review-run-tests-dispatch.yml. Jobs in the copilot-pat-pool environment get an OIDC subject the Azure DevOps federated credential does not trust; the dispatch workflow runs on main without an environment, like review-trigger.yml. - Queue only after GitHub's test-merge commit is confirmed to merge the selected head, and cancel any build whose source version differs. - Evaluate #if guards per platform to know which categories have enabled tests (including the PR's own changed tests). Drop categories and platforms that would run zero tests, and pass platform-qualified categories (ios:Window) when a category only runs on some platforms. - Pass the sample-build platforms to PowerShell as template-evaluated booleans instead of interpolating parameter text. - Teach the rebalance-ui-test-categories skill the typed parameter form. - Add regression tests for the full-run guard, the qualified matrix filter, the build-script inputs and the skill.
An agent can emit its proposal and then exit non-zero; dispatching both the proposal and the fallback would queue two runs for one command.
The run-tests comment now lists the failing tests with the platforms they failed on, read from the public Azure DevOps test results API. When the maui-pr-uitests check completes again (failed jobs re-run), finished comments for that commit are refreshed too, and the list notes that it may include failures from earlier attempts.
…only nightly job Copy of dotnet#40385 for a /review run-tests trial. Do not merge.
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 40430Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 40430" |
This comment has been minimized.
This comment has been minimized.
Skill Validation Results
❌ Skill Validation Results —
|
Selected UI TestsNo UI tests needed: changes add an official-only CodeQL job and an opt-in build property without changing default UI test builds. ℹ️ The AI found no UI-test-relevant changes, so no ✅ Running — 0 categories on noneNo UI tests run for this PR. ⏭️ Skipped — 77 categories, 4 platformsPlatforms not run: Android, iOS, MacCatalyst, Windows Each skipped platform and category is listed as a Skipped 🤖 Why these tests — AI rationale
Generated by /review run-tests. A targeted run is a fast signal, not full-suite certification. |
This comment has been minimized.
This comment has been minimized.
PR Test Gate |
| runtimeVariant: "CoreCLR" | ||
| useWindowsCV1: true | ||
| skipProvisioning: ${{ parameters.skipProvisioning }} | ||
| - ${{ if and(containsValue(parameters.selectedPlatforms, 'android'), or(eq(length(parameters.selectedCategories), 0), ne(replace(replace(join('', parameters.selectedCategories), 'Material3', ''), 'SafeAreaEdges', ''), ''))) }}: |
There was a problem hiding this comment.
[major] Logic and Correctness Verification - Gate this stage on categories accepted by its own matrix. Selecting Android and Windows with Material3 and Window produces selectedCategories: ['Material3', 'windows:Window']: Android has only the dedicated Material3 lane. This condition nevertheless includes Android CoreCLR because removing Material3 leaves windows:Window, but the Android matrix matches neither entry. The extra job therefore has no CATEGORYGROUP, although ui-tests-steps.yml uses that variable as its filter and requires executed results for selected runs. Determine whether Android has any ordinary-lane categories before emitting this stage.
| $projectPlatforms = @{ 'Shared' = @(Get-RunTestsPlatformIds); 'Android' = @('android'); 'iOS' = @('ios'); 'Mac' = @('maccatalyst'); 'WinUI' = @('windows') } | ||
| $testFiles = @($changed | Where-Object { | ||
| $_.status -ne 'removed' -and $_.path -match '^src/Controls/tests/TestCases\.(Shared|Android|iOS|Mac|WinUI)\.Tests/.+\.cs$' | ||
| } | Select-Object -First 40) |
There was a problem hiding this comment.
[moderate] Logic and Correctness Verification - Do not use a capped changed-test scan as exhaustive evidence for dropping categories. If a PR changes forty earlier UI-test files and then re-enables the existing AppLinks test in Tests/Issues/XFIssue/Issue5470.cs, this cutoff omits its category from changedTestRunnable. AppLinks has no enabled baseline tests, so Resolve-RunTestsSelection drops even a correctly requested AppLinks selection and changes it to none; the newly enabled test is never queued. Process every relevant file, or preserve incomplete discovery so it cannot authorize that veto.
| $values = [regex]::Matches($tests, 'requireExecutedTests:\s*(.+)') | ForEach-Object { $_.Groups[1].Value.Trim() } | Sort-Object -Unique | ||
| $values | Should -Be @('${{ eq(parameters.selectedRun, true) }}') | ||
| } | ||
|
|
There was a problem hiding this comment.
[moderate] Regression Prevention and Test Coverage - The token-presence check does not cover qualified categories in dedicated configuration lanes. With selectedPlatforms: [android, windows] and selectedCategories: ['android:SafeAreaEdges', 'Label'], Label runs but Android SafeAreaEdges does not: the ordinary matrix excludes it and the Pixel 3 XL stage accepts only its unqualified name. Similarly, windows:CollectionView1 matches the ordinary Windows matrix but not CV1's matrix, losing the separate configuration coverage established by #40168. Add cases asserting the dedicated stages and matrix entries for qualified selections, together with unselected negative cases; the current assertion passes despite these omissions.
Warning
Do not merge. Do not review. Temporary trial PR for
/review run-tests(#40305). It will be closed once the trial finishes.This branch is #40305 plus the change from #40385, so
maui-pr-uitestshere uses the new selection parameters. The UI test selection comes from the AI agent's run on the same diff, and the trusted dispatcher queues only the selected categories and platforms. Second round, after the results-comment fixes.