Skip to content

Fix CI-fixer empty-queue PowerShell module discovery - #39522

Merged
kubaflo merged 1 commit into
mainfrom
kubaflo-ci-fixer-empty-queue
Oct 22, 2026
Merged

kubaflo merged 1 commit into
mainfrom
kubaflo-ci-fixer-empty-queue

Conversation

@kubaflo

@kubaflo kubaflo commented Oct 21, 2026 •

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

Explicitly import the installed Microsoft.PowerShell.Management and Microsoft.PowerShell.Utility manifests from $PSHOME before the empty-queue helper uses their cmdlets. This avoids relying on automatic module discovery inside the AWF chroot.

The reported run failed at Get-Content even though the queue was authoritatively empty, so the workflow emitted report_incomplete instead of completing with noop. A later scheduled run succeeded with the unchanged helper, showing that the environment failure is intermittent.

This five-line change applies to the shared helper used by both main and net11.0. Strict snapshot validation, metadata persistence before expectation registration, registrar exit-code handling, and success-only noop gating are unchanged. No workflow sources, generated locks, permissions, dependencies, or pipeline tests are changed. This supplements the helper introduced in #39237; no competing open fix was found.

Validation

  • Reproduced the original Get-Content resolution error in a fresh PowerShell process with $PSModuleAutoLoadingPreference = 'None'; the original helper exited 1 without creating completion artifacts. The original helper succeeds with normal automatic loading.
  • With the change, direct invocations succeed with automatic loading disabled for both main/ci-scan and net11.0/ci-scan-net11. Each produces zero-byte coverage, the exact summary header, and exactly one noop expectation.
  • Mismatched branch/label provenance still exits 1 before creating completion artifacts.
  • gh aw compile ci-status-fix ci-status-fix-net11 --no-emit --strict --no-check-update - passed: 2 workflows succeeded, 0 warnings.
  • PowerShell parser validation and git diff --check - passed.
  • Read-only GPT security review - passed; no confirmed vulnerabilities or changed credential/sandbox controls.
  • Actual PowerShell CI run on commit a55a3923b3aaea22ac74a06b1b4d02979d533366: all 23 existing empty-queue/bootstrap cases passed, confirmed from the uploaded NUnit results. The complete suite was 2,624 passed, 3 failed. All three failures are the same pre-existing reviewer-model policy assertions seen in the earlier main-targeting PR run, before this change: two local-reviewer GPT-5.6 pin assertions and the hosted review-tests model assertion. Those unrelated tests and model settings were not changed.

Hosted boundary: the failing reported run and the later successful run were inspected. This patched revision has not been dispatched in the production AWF chroot; local component reproduction and the passing helper CI cases are not a claim of hosted deployment verification. Azure product validation was filtered out by its trigger conditions; the AzDO build query returned no builds for this PR.

Issues Fixed

Fixes #39476

Load the installed Management and Utility manifests directly so empty-queue completion does not depend on automatic module discovery inside AWF chroots.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8f522b9d-4994-414a-a03e-f3d7a9043385
Copilot AI balanced review requested due to automatic review settings October 21, 2026 12:41
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 21, 2026 12:41 — 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 -- 39522

Or

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

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

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.

🔵 Needs a closer look

The environment-specific fix remains unverified in the production AWF chroot and needs human confirmation.

No open issues 🎉

What changed in this PR

Addresses intermittent PowerShell module discovery failures in the shared CI-fixer empty-queue helper for main and net11.0.

Changes:

  • Explicitly imports Management and Utility module manifests from $PSHOME.
  • Preserves existing snapshot validation and completion safeguards.
File Description
.github/​scripts/​Complete-CiFixEmptyQueue.ps1 Loads required modules explicitly before using their cmdlets.

Review effort: Balanced

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

kubaflo commented Oct 21, 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 10fb0b2 into main Oct 22, 2026
13 of 15 checks passed
@kubaflo
kubaflo deleted the kubaflo-ci-fixer-empty-queue branch October 22, 2026 09:59
@github-actions github-actions Bot added this to the .NET 10 SR13 milestone Oct 22, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 22, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — a55a3923 Deployed Oct 21, 2026 by kubaflo via conclusion #2430
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

s/agent-review-in-progress AI review is currently running for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw] CI Failure Fixer (main) reported incomplete result

3 participants