Skip to content

[run-tests trial 40385] [ci] Scan C# and Java with CodeQL in a build-only nightly job - #40430

Closed
kubaflo wants to merge 11 commits into
dotnet:mainfrom
kubaflo:run-tests-real-40385
Closed

kubaflo wants to merge 11 commits into
dotnet:mainfrom
kubaflo:run-tests-real-40385

Conversation

@kubaflo

@kubaflo kubaflo commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

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-uitests here 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.

Copilot CI added 11 commits November 16, 2026 21:39
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.
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 19, 2026 11:29 — 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 -- 40430

Or

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

@azure-pipelines

This comment has been minimized.

@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 19, 2026 11:30 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

Skill Validation Results

@kubaflo — new skill validation results are available based on this last commit: cd772f1.
To request a fresh validation after new comments or commits, comment /evaluate-skills.

Overall Failed Static Failed LLM Needs attention Skills 0 Agents 0

❌ Skill Validation Results — cd772f1 · [run-tests trial 40385] [ci] Scan C# and Java with CodeQL in a build-only nightly job · 2026-11-19T11:30:15Z

❌ Static Checks Failed

Skills: 0 | Eval specs linted:

⏭️ LLM Evaluation: Skipped

No changed skills with eval specs found.

🔍 Full results and investigation steps

@kubaflo

kubaflo commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Selected UI Tests

@kubaflo — AI-selected UI tests for commit cd772f1b.

Result NOTHING TO RUN Scope No UI tests Platforms none Categories 0 of 77 Commit cd772f1b

No 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 maui-pr-uitests run was queued.


✅ Running — 0 categories on none

No UI tests run for this PR.

⏭️ Skipped — 77 categories, 4 platforms

Platforms not run: Android, iOS, MacCatalyst, Windows

Each skipped platform and category is listed as a Skipped maui-pr-uitests (skipped) … check on this commit. Use /azp run maui-pr-uitests for the full suite.

🤖 Why these tests — AI rationale
  • eng/Build.props gates package-project builds behind opt-in BuildPackageProjects=true; default builds are unchanged.
  • ci-official.yml affects only official scanning; .github/docs is documentation. No UI code or tests changed, so all UI platforms are omitted.

Generated by /review run-tests. A targeted run is a fast signal, not full-suite certification.

@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 Nov 19, 2026
@MauiBot

MauiBot commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

PR Test Gate

@kubaflo — existing-test verification for commit cd772f1b.

Result SKIPPED Platform Android Commit cd772f1b


🧪 Gate analysis — click to expand

⚠ Skipped. No runnable PR tests were selected. The fix has not been verified by this gate.

No interpretable test-group summary was produced. No additional test execution is inferred.

PR head: cd772f1b.

Without-fix baseline: 5c7a422e.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Nov 19, 2026

@github-actions github-actions Bot 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.

Expert Review — 3 findings

Reviewed commit cd772f1.

See inline comments for details.

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', ''), ''))) }}:

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.

[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)

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.

[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) }}')
}

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.

[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.

@kubaflo kubaflo closed this Nov 19, 2026
@kubaflo
kubaflo deleted the run-tests-real-40385 branch November 19, 2026 16:36

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — cd772f1b Deployed Nov 19, 2026 by kubaflo via conclusion #3128
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.

2 participants