Skip to content

[ci] /review run-tests: report skipped, selection and run checks as commit statuses - #40627

Merged
kubaflo merged 1 commit into
mainfrom
run-tests-statuses-all
Nov 25, 2026
Merged

kubaflo merged 1 commit into
mainfrom
run-tests-statuses-all

Conversation

@kubaflo

@kubaflo kubaflo commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Description of Change

Follow-up to #40624, which moved the per-job results to commit statuses. The other /review run-tests checks were still check runs, so GitHub filed them under an unrelated workflow of the commit:

Add Dogfooding Comment / maui-pr-uitests (skipped) Triggers (pull_request_target)

They are now commit statuses too, shown under exactly their name:

Status State
maui-pr-uitests (skipped) Triggers success — "Skipped: Triggers UI tests were not selected by /review run-tests"
maui-pr-uitests (test selection) success, or failure when the run could not be queued
maui-pr-uitests (selected run) pending while the build runs, then success / failure / error (canceled)
  • A skipped status that a later run on the same commit selects is updated to "Selected by a later /review …".
  • Comments posted before this change recorded a check run id (<!-- review-run-tests-check: … -->); those keep updating their check run.
  • review-run-tests-dispatch.yml gets statuses: write (the results workflow already has it).

Testing

  • New Pester tests for the selected run status and for publishing only through statuses; 78 pass.
  • The 2 remaining failures (Pipeline templates / gates the device test pipeline on the dispatch request) also fail on main without this change.

…ommit statuses

Like the job statuses, the skipped, test selection and selected run check runs
were filed under an unrelated workflow of the commit ("Add Dogfooding Comment /
maui-pr-uitests (skipped) Triggers"). Publish them as commit statuses so they
show as "maui-pr-uitests (skipped) Triggers". Comments from before the switch
keep following their build with the check run they recorded.
Copilot AI balanced review requested due to automatic review settings November 25, 2026 19:25
@kubaflo

kubaflo commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

@dalexsoto stamp

@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 25, 2026 19:25 — with GitHub Actions Inactive
@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 -- 40627

Or

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

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@kubaflo

kubaflo commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

@dalexsoto stamp

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.

🟡 Changes recommended

Superseded builds can overwrite newer failures with pending or success statuses, and array handling prevents skipped contexts from being retired correctly.

2 open issues
What changed in this PR

This PR extends #40624’s commit-status reporting to the remaining /review run-tests checks, so they appear under their own names rather than an unrelated GitHub Actions workflow.

Changes:

  • Publishes skipped tests, test selection, and selected-run progress as commit statuses.
  • Preserves updates to check runs recorded by older comments.
  • Adds status-reporting tests and grants the dispatch workflow statuses: write.
File Description
.github/​workflows/​review-run-tests-dispatch.yml Grants permission to publish commit statuses.
.github/​scripts/​Update-RunTestsResults.ps1 Updates selected-run statuses while preserving legacy check updates.
.github/​scripts/​RunTests.Tests.ps1 Adds status-state mapping and publication checks.
.github/​scripts/​RunTests.Common.ps1 Adds status helpers and updates reporting text.
.github/​scripts/​Invoke-RunTests.ps1 Publishes selection and skipped statuses instead of check runs.

Review effort: Balanced

Comment on lines +165 to +168
} elseif ($result.headSha) {
$status = New-RunTestsRunStatus -Build $result.build -Results $result.results
Publish-RunTestsStatus -Repository $Repository -Sha $result.headSha -Context $status.context -State $status.state `
-Description $status.description -TargetUrl $status.target_url
Comment on lines +386 to +387
foreach ($stale in @(Get-RunTestsStatuses -Repository $Repository -Sha $sha) | Where-Object {
$_.context.StartsWith($script:RunTestsSkippedCheckPrefix) -and $_.context -notin $planned -and $_.description -notlike 'Selected by a later*' }) {
@kubaflo

kubaflo commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

@dalexsoto stamp

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Stamping as requested by @kubaflo; no code review performed.

@kubaflo
kubaflo merged commit 5858133 into main Nov 25, 2026
16 of 18 checks passed
@kubaflo
kubaflo deleted the run-tests-statuses-all branch November 25, 2026 20:52
kubaflo added a commit that referenced this pull request Nov 26, 2026
…log refused dispatches (#40631)

### Description of Change

**Crash (from #40627).** Every `/review run-tests` dispatch since #40627
fails before posting its comment:

```
Invoke-RunTests.ps1:380  … -RunTestsStatuses -Repository $Repository -Sha $sha) | Where-Object {
You cannot call a method on a null-valued expression.
```

`Get-RunTestsStatuses` returns its list as a single object (`return ,
@(…)`), so `@(Get-RunTestsStatuses …)` nested it and `$_.context` was
the whole list. The list is now assigned first, and `context` is read as
a string. Seen on #40439 and #40294.

**net11 dispatches refused (diagnostics).** Since #40629 merged into
`net11`, creating the `run-tests/*` / `run-devicetests/*` branch for
`net11` PRs fails with `Resource not accessible by integration (HTTP
403)` (#40619, #40620, #40621). `main` PRs and `net11` dispatches before
that pushed fine. The log doesn't say what GitHub objects to, so when
the branch can't be created the script now logs the dispatch commit, its
parent, the test-merge and its base, and the files the commit changes.
That shows the cause on the next run.

### Testing

- New Pester test: `Get-RunTestsStatuses` returns a flat list, and
`Invoke-RunTests.ps1` no longer wraps it in `@()`. 77 pass; the 2
failures (`Pipeline templates`, `gates the device test pipeline on the
dispatch request`) also fail on `main` without this change.
- Called `Get-RunTestsStatuses` against a real commit (#40611 head): 7
statuses, filtering works.

Co-authored-by: Copilot CI <copilot-ci@microsoft.com>
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Nov 26, 2026
…ommit statuses (dotnet#40627)

### Description of Change

Follow-up to dotnet#40624, which moved the per-job results to commit statuses.
The other `/review run-tests` checks were still check runs, so GitHub
filed them under an unrelated workflow of the commit:

> Add Dogfooding Comment / maui-pr-uitests (skipped) Triggers
(pull_request_target)

They are now commit statuses too, shown under exactly their name:

| Status | State |
| --- | --- |
| `maui-pr-uitests (skipped) Triggers` | success — "Skipped: Triggers UI
tests were not selected by /review run-tests" |
| `maui-pr-uitests (test selection)` | success, or failure when the run
could not be queued |
| `maui-pr-uitests (selected run)` | pending while the build runs, then
success / failure / error (canceled) |

- A skipped status that a later run on the same commit selects is
updated to "Selected by a later /review …".
- Comments posted before this change recorded a check run id (`<!--
review-run-tests-check: … -->`); those keep updating their check run.
- `review-run-tests-dispatch.yml` gets `statuses: write` (the results
workflow already has it).

### Testing

- New Pester tests for the selected run status and for publishing only
through statuses; 78 pass.
- The 2 remaining failures (`Pipeline templates` / `gates the device
test pipeline on the dispatch request`) also fail on `main` without this
change.

Co-authored-by: Copilot CI <copilot-ci@microsoft.com>
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Nov 26, 2026
…log refused dispatches (dotnet#40631)

### Description of Change

**Crash (from dotnet#40627).** Every `/review run-tests` dispatch since dotnet#40627
fails before posting its comment:

```
Invoke-RunTests.ps1:380  … -RunTestsStatuses -Repository $Repository -Sha $sha) | Where-Object {
You cannot call a method on a null-valued expression.
```

`Get-RunTestsStatuses` returns its list as a single object (`return ,
@(…)`), so `@(Get-RunTestsStatuses …)` nested it and `$_.context` was
the whole list. The list is now assigned first, and `context` is read as
a string. Seen on dotnet#40439 and dotnet#40294.

**net11 dispatches refused (diagnostics).** Since dotnet#40629 merged into
`net11`, creating the `run-tests/*` / `run-devicetests/*` branch for
`net11` PRs fails with `Resource not accessible by integration (HTTP
403)` (dotnet#40619, dotnet#40620, dotnet#40621). `main` PRs and `net11` dispatches before
that pushed fine. The log doesn't say what GitHub objects to, so when
the branch can't be created the script now logs the dispatch commit, its
parent, the test-merge and its base, and the files the commit changes.
That shows the cause on the next run.

### Testing

- New Pester test: `Get-RunTestsStatuses` returns a flat list, and
`Invoke-RunTests.ps1` no longer wraps it in `@()`. 77 pass; the 2
failures (`Pipeline templates`, `gates the device test pipeline on the
dispatch request`) also fail on `main` without this change.
- Called `Get-RunTestsStatuses` against a real commit (dotnet#40611 head): 7
statuses, filtering works.

Co-authored-by: Copilot CI <copilot-ci@microsoft.com>
kubaflo added a commit that referenced this pull request Nov 28, 2026
…otnet test migration to net11 (#40763)

<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

Repository infrastructure only; targets `net11` so its CI, agentic and
release tooling matches `main`.

### Description of Change

Brings the repository-infrastructure merges from `main` (since `net11`
diverged) to `net11`: `/review` run-tests / run-ui-tests /
run-device-tests, MAUI Autopilot, release tooling, signing validation
and related docs. Each commit is a `git cherry-pick -x` of the merged
PR; all applied without conflicts (the `eng/` part of #40545 was already
backported in #40629).

**Included (28 commits):**
- [release] Recover from squash-merged CI normalization PRs (#40566)
- [Release state] Advance 11.0.1xx to SR3 (#40571)
- [ci] /review run-tests, run-ui-tests and run-device-tests; MAI Code 2
as the second model (#40545)
- Document that forward PRs must never use long-lived branches as head
(#40582)
- [ci] /review run-tests: standard /review comment layout; fix MAI Code
2 (#40591)
- [ci] /review run-tests: don't rewrite Result badges of older comments
(#40592)
- [ci] /review run-tests: show each Azure DevOps job as a check on the
PR (#40612)
- Remove standalone /review gate workflow (#40595)
- [ci] Hide /review run-tests command comments once acknowledged
(#40593)
- [ci] /review run-tests: report jobs as commit statuses named after the
pipeline (#40624)
- Remove standalone /review tests failure-analysis lane (#40596)
- [ci] /review run-tests: build PRs only with their target branch's
pipeline (#40628)
- [ci] /review run-tests: report skipped, selection and run checks as
commit statuses (#40627)
- [ci] /review run-tests: fix the dispatch crash on existing statuses;
log refused dispatches (#40631)
- [ci] /review run-tests: let release-branch dispatches be pushed
(#40634)
- [ci] Re-enable signing validation in the official pipeline (#39524)
- Group Dependabot NuGet updates for main and net11 (#40650)
- [ci] Hide dogfood and skill validation comments (#40651)
- Add MAUI Autopilot: /review autopilot drives review → fix → tests on
opted-in PRs (#40668)
- MAUI Autopilot: three-model cross-examined fixes (adds Claude Opus
5.5), Copilot review threads, test failure evidence, clear endings
(#40672)
- [release] Merge candidate into inflight daily without rewriting
history (#40671)
- MAUI Autopilot: three-model triage of failing tests and a
needs-maintainer-decision label (#40707)
- MAUI Autopilot: install the repository .NET SDK so fix rounds can run
unit tests (#40732)
- MAUI Autopilot: a maintainer's /review autopilot always runs (#40738)
- MAUI Autopilot: every /review autopilot handles all earlier review
suggestions; stop no-op issue mentions (#40743)
- MAUI Autopilot: fix fork follow-ups (squash out-of-src commits, proper
endings) and never fail on missing test evidence (#40746)
- MAUI Autopilot: resolve merge conflicts, add UI screenshot baselines
from Azure DevOps, back off on rate limits (#40750)
- Migrate tests from Helix and XHarness to native dotnet test (#40661)
[net11] — conflicts resolved to the net11 tree CI-validated in #40703
(`net11.0` TFM, CoreCLR **and Mono** device-test runtimes, net11 Arcade
SDK); SourceGen tests for .NET 12-only features are not brought over.

**Deliberately excluded:**
- .NET 12 product features and bug fixes (animations, ContentButton,
ScrollAnchorMode, trimming, XSG styles, Label.IsTextSelectable,
Preferences enums, image metadata, QueryProperty, binding/route/XAML
fixes, …).
- #40060 Move main to .NET 12; main-only build-break fixes (#40666,
#40674, #40708, #40720, #40751) and #40663 platform-compatibility
re-enable (product code changes).
- Dependabot bumps (#40639, #40640, #40641, #40643) — `net11` gets its
own grouped Dependabot updates (#40650); localization check-ins.
- #40615 — empty commit upstream.

**Note for reviewers:** #40672 adds `maui-expert-autopilot-opus` (Claude
Opus 5.5). `CopilotPipeline.Tests.ps1` → "contains no Anthropic model
identifiers" fails on it exactly as it does on `main` today. Drop that
workflow here if `net11` should keep that policy test green.

### Validation

**CI (`/azp run` on this PR):**
| Pipeline | Result |
| --- | --- |
| `maui-pr`
[1703708](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1703708)
(build, pack, unit + integration tests on `dotnet test`/MTP) | ✅
succeeded |
| `maui-pr-uitests`
[1703714](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1703714)
| ✅ succeeded |
| `maui-pr-devicetests`
[1703715](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1703715)
| 38/41 jobs ✅ — all Android, iOS, Mac Catalyst (CoreCLR + Mono) pass |

Device-test failures (Windows only):
- `Windows controls packaged/unpackaged`: test host terminates with
`0xDEAD` in the NavigationPage category — the known Windows blocker
listed in #40661; the same two jobs fail on `main` after #40661
([1703728](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1703728))
and on #40703
([1703325](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1703325)).
- `Windows blazorwebview unpackaged`: one test,
`InterceptedResponseWithoutABodyIsServedWithASingleContentTypeHeader(isContentNull:
False)`, timed out after 30 s waiting for CoreWebView2. The same lane
passed on #40703.

GitHub checks: `Validate (PR)` (Release Readiness) fails in
`MauiReleaseConfiguration.Tests.ps1` ("Wrong evaluated label on
candidate/11.0.1xx-sr1"). It is triggered here because #40566 touches
`MauiReleaseConfiguration.psm1`, and #40566 failed the same check on
`main`; it also fails locally on unmodified `net11`. Skill-validation
evals fail on unavailable `COPILOT_PAT_*` tokens and fixture fetches,
the same as on #40661/#40703.

**Local:** `actionlint` on changed workflows (exit 0); YAML and
PowerShell parse of all changed files (no errors). Pester over the
`powershell-script-tests.yml` paths: 26 failures vs 28 on unmodified
`net11`. The only new failure is the Anthropic-model policy test (see
note above), which also fails on `main`.

### Issues Fixed

N/A — repository infrastructure sync.

### Let AI finish this PR

- [ ] **Let the MAUI agent address review feedback and fix remaining
issues on this PR.** Maintainers still decide whether it is merged. For
PRs from forks, the agent opens a follow-up PR that keeps your commits.

---------

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — bd3e2e50 Deployed Nov 25, 2026 by kubaflo via conclusion #3330
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants