Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
464d937
[main] Update dependencies from dotnet/xharness (#38524)
dotnet-maestro[bot] Sep 14, 2026
1cd2e15
[Testing] Fix for DisplayAlertAsyncShouldNotCrashWhenPageUnloaded UIT…
TamilarasanSF4853 Sep 15, 2026
e9b9a5f
Use CollectionView2 for test GroupedCollectionViewRemovalsUseCurrentA…
Vignesh-SF3580 Sep 16, 2026
b272273
Limit skill evaluation configuration options (#38572)
PureWeen Sep 16, 2026
b0a532a
[Mac] Fix VoiceOver does not announce initial ComboBox state in Task …
praveenkumarkarunanithi Sep 16, 2026
7f88468
[iOS] ScrollView: Keep the content offset when the scroll view is res…
albyrock87 Sep 16, 2026
beef1b4
[Testing] Fix for ScrollViewInitialOffsetInGridRow UITests failure (#…
HarishKumarSF4517 Sep 17, 2026
e18917e
[Testing] Fix MainThread isolation and integration failure diagnostic…
kubaflo Sep 17, 2026
fce8b3f
Harden maui-copilot reviewer and skill validation with GPT-only model…
kubaflo Sep 17, 2026
49b6206
[iOS/MacCatalyst] Adopt scene lifecycle and AppActions dispatch (#38601)
dalexsoto Sep 18, 2026
76a01cd
Consolidate test-failure review into one skill (#38640)
kubaflo Sep 18, 2026
039c9be
[CI] OneLoc: Resolve MirrorBranch during template expansion (#38650)
missymessa Sep 19, 2026
ae2b441
Add static-only skill validation mode (#38573)
PureWeen Sep 19, 2026
151e160
Fix test-failure review baseline, discovery, and reporting (#38689)
kubaflo Sep 19, 2026
d2afb8e
Reset files to net11.0
github-actions[bot] Sep 19, 2026
c97874c
Fix hosted test-review model compatibility and failure reporting (#38…
kubaflo Sep 20, 2026
328470e
Merge main into net11.0 and resolve forward-port conflicts
kubaflo Sep 20, 2026
2311e0a
Reset files to net11.0
github-actions[bot] Sep 21, 2026
106e29b
Merge regenerated forward-port while preserving conflict resolutions
kubaflo Sep 21, 2026
0bcfa51
Merge latest net11.0 into main forward-port
kubaflo Sep 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"rollForward": false
},
"microsoft.dotnet.xharness.cli": {
"version": "11.0.0-prerelease.26451.1",
"version": "11.0.0-prerelease.26461.1",
"commands": [
"xharness"
],
Expand Down
9 changes: 8 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,14 @@ When referencing or triggering CI pipelines, use these current pipeline names:

### Investigating CI Failures

**🚨 ALWAYS use the `azdo-build-investigator` skill when investigating CI failures or assessing merge readiness.** Its instructions direct you to invoke the `ci-analysis` skill first for the core investigation workflow, then apply MAUI-specific corrections (correct pipeline names, XHarness quirks, binlog guidance).
For `/review tests` and the local `Review-Tests.ps1` runner, use only the
`review-test-failures` skill. It owns failure attribution and the single structured
comment; do not chain other review skills in that lane.

For other CI investigations or merge-readiness assessments, **always use the
`azdo-build-investigator` skill**. Its instructions direct you to invoke the
`ci-analysis` skill first for the core investigation workflow, then apply
MAUI-specific corrections (correct pipeline names, XHarness quirks, binlog guidance).

Do NOT default to manually querying AzDO APIs or rely solely on `gh pr checks` pass/fail counts.

Expand Down
54 changes: 28 additions & 26 deletions .github/docs/maui-ci-facts.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,19 @@ When a fact changes (e.g. a pipeline definition ID), change it HERE only.

# .NET MAUI CI Facts

Authoritative reference for dotnet/maui CI investigation, test-failure
classification, and merge-readiness assessment. Both the interactive
`azdo-build-investigator` skill and the automated `/review tests`
(`review-test-failures`) workflow reason from these same facts.
Authoritative operational reference for dotnet/maui CI investigation. The
`review-test-failures` skill owns the current `/review tests` attribution rubric
and compact, pipeline-grouped comment. It compares all three pipelines with their latest five
completed runs on the PR's exact target branch (`pr.baseRefName`), then relates
failures to the PR diff. Previous PR-branch runs are not the baseline or required
coverage. Target sampling is independent of current PR build availability and is
not cut off at the PR build's queue time; missing or unreadable samples remain explicit.
If no usable current-PR results or build-failure diagnostics exist in any pipeline,
evaluation and target sampling are skipped, with a short `/azp run` request instead.

The deterministic merge-readiness fields documented below remain in the gatherer
for compatibility. They are not the current `/review tests` report policy: a
green base job alone is not causal proof, and missing evidence is reported explicitly.

## Pipelines

Expand Down Expand Up @@ -268,23 +277,14 @@ Messages like `Baseline snapshot not yet created`, missing snapshot paths, or sn
environment-version mismatches are strong **unrelated** evidence — unless the PR adds or
modifies that visual test or the affected snapshot/platform.

The automated `/review tests` lane gathers failed UI result IDs from the public
The gatherer can collect failed UI result IDs from the public
`vstmr.dev.azure.com/.../testresults/resultsbybuild` endpoint, then reads the public
result-detail and attachment APIs. It publishes validated baseline/actual/diff PNGs to
the repository's orphan, asset-only `review-tests-assets-v2` branch. The legacy
`review-tests-assets` branch remains intact so existing commit-pinned image URLs stay
reachable; it is not used for new publications because its inherited repository tree
contains workflow files that `GITHUB_TOKEN` cannot update. A trusted post-step inserts
as many complete expandable comparison panels as fit inside the single test-failure
analysis comment while enforcing gh-aw's URL, mention, and character limits; excess
panels are reported as omitted rather than creating another comment. Visual publishing is
supplementary evidence only: missing images never raise or lower the deterministic
verdict ceiling. Each panel also shows a conservative relationship label derived from
the exact test-and-platform `deterministicAttribution` plus exact changed snapshot/test
scope: `regressed-vs-base` or directly changed visual coverage is Likely PR-caused,
`pre-existing-on-base` or `known-issue` is Likely unrelated, and indeterminate or
unmatched evidence remains Needs human investigation. A same-named snapshot on another
platform and platform or area mismatch alone never change the label.
result-detail and attachment APIs. The simplified workflow/local runner skips
visual enrichment and no longer publishes image panels. Earlier reports used the
asset-only `review-tests-assets-v2` branch (and previously `review-tests-assets`);
those branches and their commit-pinned image URLs remain intact. The legacy
publisher/merger scripts are retained for compatibility, not called by the current
`/review tests` workflow. Missing images do not establish a failure's cause.

## Platform mismatch

Expand Down Expand Up @@ -331,9 +331,10 @@ error XAGRDL0000: Could not GET '...pkgs.dev.azure.com/.../maven/v1/...'

## Merge-readiness criteria

Used by both the interactive investigator (answering "is this PR ready to merge?") and
the automated `/review tests` overall verdict. Assess **only CI/test health** — code
review and approval are separate, human-only decisions.
Retained for the interactive investigator and legacy deterministic gate consumers.
The current `/review tests` skill reports attribution and evidence coverage instead
of these merge-readiness verdicts. Assess **only CI/test health** — code review and
approval are separate, human-only decisions.

| Overall verdict | Use when |
|-----------------|----------|
Expand Down Expand Up @@ -415,9 +416,10 @@ If none of these hold, a failure on a path/platform the PR changes leans PR-caus
that **not every failure is a test** — a red build leg with no extracted test name still
counts as a failure and must be classified, never silently dropped.

The automated `/review tests` lane additionally computes a **deterministic verdict
ceiling** in `Gather-TestFailureContext.ps1` (`gate.verdictCeiling`): the overall verdict
can never be more favorable than what coverage allows. A green verdict
The gatherer's **legacy deterministic verdict ceiling** (`gate.verdictCeiling`)
constrains legacy merge-readiness consumers, not the current skill's attribution
verdict. For those consumers, the overall verdict can never be more favorable than
what coverage allows. A green verdict
(`Ready to merge` / `No failures found`) is forbidden whenever a check is still pending, a
failing check could not be inspected, **or a failed build leg produced no extractable
failure** (`gate.unexplainedFailedLegs > 0` — the backstop that stops a crossgen/NativeAOT
Expand Down
86 changes: 80 additions & 6 deletions .github/docs/pr-review-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ It is intended for Microsoft maintainers and community contributors who want to
| --- | --- | --- | --- |
| `/review` | Repository users with write, maintain, or admin access | Queues the full MAUI Copilot PR review pipeline. | Updates the PR with an `AI Summary` comment. |
| `/review <platform>` | Repository users with write, maintain, or admin access | Queues the full review pipeline for a specific platform: `android`, `ios`, `catalyst`, or `windows`. | Updates the PR with an `AI Summary` comment. |
| `/review tests` | Repository users with write, maintain, or admin access | Reviews current CI/test failures and classifies whether they are likely PR-caused, unrelated, or insufficiently evidenced. | Adds or updates a `Test Failure Review` comment. |
| `/review tests` | Repository users with write, maintain, or admin access | Reviews current CI/test failures and classifies whether they are likely PR-caused, unrelated, or insufficiently evidenced. | Posts one `Tests Failure Analysis` comment and hides older reports. |

Only repository users with write access can trigger these commands. Community contributors should ask a maintainer to run the relevant command for their PR.

Expand Down Expand Up @@ -63,6 +63,8 @@ The trigger is implemented by `.github/workflows/review-trigger.yml`. It:

The workflow intentionally does not handle `/review tests`; that subcommand is reserved for the test-failure review workflow.

GitHub Actions webhook deliveries can occasionally be delayed or dropped during an Actions incident. A deterministic scheduled fallback (`.github/workflows/review-trigger-recovery.yml`) polls recent commands, waits 25 minutes so both bounded trigger jobs have time to finish, rechecks the commenter's current repository permission, and dispatches the same trusted review workflow. The default-branch commit used by the first scheduled run is a permanent lower bound, preventing already-handled commands from being replayed when the fallback is introduced. Processed commands are marked so a delayed webhook cannot trigger a duplicate review.

**Note**: Command comments are minimized (collapsed as "Resolved") after authorization to reduce conversation clutter while preserving the comment history. Unauthorized or malformed command comments remain fully visible.

### Platform inference
Expand Down Expand Up @@ -138,13 +140,34 @@ Because gh-aw slash commands match only the first command token, the workflow li
- change code;
- start the full PR review pipeline.

The workflow uses one skill,
[`review-test-failures`](../skills/review-test-failures/SKILL.md), for both analysis
and comment formatting. The local runner uses that same skill. Both use GPT-6 Astra
(`gpt-6-astra`), as do the offline attribution evaluations and their judge.

It gathers evidence from:

- GitHub PR metadata, labels, changed files, and check rollup;
- GitHub PR metadata, the actual code diff, changed files, and check rollup;
- Azure DevOps build metadata, timelines, and build logs;
- Helix references when available for device tests;
- optional authenticated AzDO data when `AZDO_TOKEN` or local Azure CLI auth is available;
- PR scope, including changed platforms, areas, and test files.
- the latest five completed runs on the PR's target branch for each pipeline.

It always covers `maui-pr`, `maui-pr-devicetests`, and `maui-pr-uitests`. For each,
it compares the current run with the latest five completed runs of the same
pipeline definition on `refs/heads/<pr.baseRefName>` (for example,
`refs/heads/net11.0` for a PR targeting `net11.0`), never the PR source/merge ref.
These are the latest runs at review time, not only runs predating the PR build.
When there is current evidence to evaluate, it queries all three target-branch
windows even if one current PR build is missing or unreadable. Missing or
unreadable historical samples are disclosed when they affect attribution.
An optional build or check input
prioritizes evidence; it does not remove the other pipelines from the report.

Previous PR runs are not required and their absence is not a coverage gap.
The skill connects failure diagnostics to changed code and compares matching
reasons/configurations across all five target samples to distinguish existing defects.
Green device jobs require actual test-result confirmation.

Then it posts a `Test Failure Review` comment that classifies failures as:

Expand All @@ -153,7 +176,36 @@ Then it posts a `Test Failure Review` comment that classifies failures as:
- **Needs human investigation**
- **Insufficient data**

The comment includes status badges, a short summary, a per-failure table, recommended action, and collapsible evidence details.
The workflow posts exactly one concise comment using the original styled layout:
a visible author/commit header, Scope/Commit badges, and two closed
top-level sibling accordions, **CI Analysis** and **Follow-up**. CI Analysis
contains three nested sections: **maui-pr**,
**maui-pr-devicetests**, and **maui-pr-uitests**. Each failure gets its attribution,
a direct test-result/log/Helix link, and one short reason. Passing pipelines get
one line; missing evidence is mentioned only in its pipeline. Sampling inventories
and repeated coverage summaries stay out of the comment; detailed evidence stays
in the context artifact. There is no overall verdict, Verdict badge, or Summary
section; attribution is reported per failure rather than obscured by an aggregate
`Inconclusive` label. Follow-up contains an action only when needed and the
`/review tests` refresh instruction.

If no current-PR results exist, gathering stops before diff, known-issue,
and target-history analysis. It still posts a short **Evaluation skipped** report
asking for `/azp run` (or to wait if CI is already running). The local runner uses
that deterministic report, with the same badges and accordions, without invoking
Copilot. If just one pipeline lacks
results, the others are evaluated and the report requests `/azp run <pipeline>`
for the missing one. Actual build/restore/linker or host failures remain actionable
even when they prevent tests from starting; zero failed tests is not zero results.
Existing runs whose evidence was omitted, inaccessible, or not verified are
reported as **Insufficient data**, with a run link and `/review tests` refresh
guidance, not `No results available` or an unnecessary `/azp run`. Check discovery
deduplicates explicitly by name and URL so all three pipelines survive the
collector's ordered-dictionary representation.

This is failure attribution, not merge approval. The skill does not use the
legacy gatherer's deterministic merge-readiness verdict as a causal conclusion.
The workflow no longer publishes visual asset branches or appends image panels.

### Local usage

Expand All @@ -178,6 +230,17 @@ To post the generated comment:
pwsh .github/scripts/Review-Tests.ps1 -PRNumber 29800 -BuildId 1443464 -PostComment
```

The local runner preserves the same styled, pipeline-grouped report; it does
not wrap or replace the skill's report. It retains the canonical
`<!-- Tests Failure -->` marker and adds a separate hidden local-ownership marker
so subsequent local runs update the local comment, not a workflow-owned report.
`-DryRun` prevents posting even when `-PostComment` is also supplied.
The report process has scoped access to the run's artifact directory, including
when `-OutputDirectory` is outside the checkout. Its default tools can only inspect
the frozen evidence (file readers and `jq`); the runner saves the final response
instead of granting model write access or reusing an earlier report. A missing or
unreadable context is an access problem, not proof that CI has no results.

To gather evidence without invoking Copilot:

```powershell
Expand Down Expand Up @@ -226,7 +289,16 @@ The top-level title is always:
## Tests Failure Analysis
```

The verdict details and "Test Failure Review" label live in badges and in the expanded review session.
The header gives the author and analyzed commit, with two badges showing the
`CI failures` scope and short SHA. Expand **CI Analysis** for the
three pipeline sections with related/unrelated/uncertain failures and direct
evidence links. Expand its sibling **Follow-up** for actions and refresh.
Failure labels use &#x1F534; for **Likely PR-caused**, &#x1F7E2; for
**Likely unrelated**, and &#x1F7E1; for **Needs human investigation**.
Green indicates attribution, not a passing test; yellow indicates unresolved causality.
Missing results produce `/azp run` guidance, not a long evaluation.
This is not merge approval; incomplete evidence remains explicit in its pipeline.
The canonical layout lives in the skill rather than a separate caller template.

## Recommended workflow for maintainers

Expand Down Expand Up @@ -262,7 +334,7 @@ Important safeguards:

| Symptom | Likely cause | What to do |
| --- | --- | --- |
| `/review` does nothing | The commenter does not have write/maintain/admin access, or the comment is not on a PR. | Ask a maintainer to run the command on the PR. |
| `/review` does nothing | The commenter does not have write/maintain/admin access, the comment is not on a PR, or GitHub Actions delayed the webhook. | Authorized commands should be recovered automatically within about 35 minutes. Check GitHub Status if Actions is degraded. |
| `/review` used the wrong platform | Platform labels were missing or ambiguous. | Re-run with an explicit platform, for example `/review ios`. |
| `/review tests` says `Insufficient data` | Build/log/Helix evidence was inaccessible or incomplete. | Re-run later, provide a build ID, or run locally with Azure CLI/AzDO auth. |
| The AI Summary looks stale | New commits or author comments landed after the last review. | Wait for the automatic rerun queue, or ask a maintainer to run `/review` for an immediate review. |
Expand All @@ -272,6 +344,8 @@ Important safeguards:
## Related files

- `.github/workflows/review-trigger.yml` — GitHub comment trigger for `/review`.
- `.github/workflows/review-trigger-recovery.yml` — scheduled fallback for missed `/review` webhooks.
- `.github/scripts/Recover-MissedReviewCommands.ps1` — deterministic recovery and duplicate-prevention logic.
- `eng/pipelines/ci-copilot.yml` — Azure DevOps PR review pipeline.
- `.github/scripts/Review-PR.ps1` — local script orchestrating full PR review phases.
- `.github/scripts/post-ai-summary-comment.ps1` — AI Summary comment formatter.
Expand Down
Loading
Loading