Repository navigation
Automate current candidate mirroring for official nightlies - #40312
Conversation
Add a 'candidate' nightlyMode that selects candidate/<band>-sr<currentSr> and make it the checked-in mode, so scheduled official builds come from staged candidate contents instead of inflight and follow currentSr automatically. Candidate *xx-sr refs are scheduled, signed and branded ci.inflight like versioned inflight lanes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…x-inflight-feed-candidate-builds
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 40312Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 40312" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
Candidate handling breaks existing PR validation assertions and allows legacy inflight-only policies to mirror candidates with incorrect nightly package branding.
2 open issues
What changed in this PR
Following #40297, this PR automates mirroring the state-selected public candidate into the internal repository used for official .NET MAUI nightlies, replacing the manual per-release sync.
Changes:
- Adds an independent mirror job using trusted
maintooling, Azure federation, explicit ref leases, and ownership tracking. - Extends shared branding helpers to cover candidate branches while accepting legacy inflight-only metadata.
- Adds read-only PR validation and documents deployment permissions, preserving the existing 05:00 UTC build schedule.
| File | Description |
|---|---|
eng/scripts/Sync-ReleasePublishing.ps1 |
Adds candidate resolution, guarded mirroring, and result reporting. |
eng/scripts/MauiReleaseConfiguration.psm1 |
Adds candidate branding and legacy-condition compatibility. |
docs/ReleaseBranchWorkflow.md |
Documents automated mirroring, permissions, and ownership safeguards. |
.github/workflows/release-publishing.yml |
Adds mirror triggers and isolated PR validation. |
.github/docs/maui-ci-facts.md |
Records mirror behavior and the retained nightly schedule. |
Review effort: Balanced
| function Get-MauiInflightLabelCondition { | ||
| param ([string] $SandboxPrefix) | ||
| $condition = "'`$(BUILD_SOURCEBRANCH)' == 'refs/heads/inflight/current' or `$([System.Text.RegularExpressions.Regex]::IsMatch('`$(BUILD_SOURCEBRANCH)', '^refs/heads/inflight/[1-9][0-9]*\.0\.[1-9][0-9]*xx-sr[1-9][0-9]*`$'))" | ||
| $condition = "'`$(BUILD_SOURCEBRANCH)' == 'refs/heads/inflight/current' or `$([System.Text.RegularExpressions.Regex]::IsMatch('`$(BUILD_SOURCEBRANCH)', '^refs/heads/(inflight|candidate)/[1-9][0-9]*\.0\.[1-9][0-9]*xx-sr[1-9][0-9]*`$'))" |
| if ($version.stable -or $version.label -cne 'ci.main' -or !$version.branchDerivedLabels -or $version.labelSandboxPrefix) { | ||
| throw 'The nightly candidate must retain production CI/non-stable branch-derived branding.' | ||
| } |
This comment has been minimized.
This comment has been minimized.
|
/rebase |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| -Sr $roles.currentSr -Role candidate | ||
| $version = Get-MauiReleaseVersion -Content $content | ||
| if ($version.stable -or $version.label -cne 'ci.main' -or !$version.branchDerivedLabels -or $version.labelSandboxPrefix) { | ||
| throw 'The nightly candidate must retain production CI/non-stable branch-derived branding.' |
There was a problem hiding this comment.
[major] Logic and Correctness Verification - A candidate with the accepted legacy three-label, inflight-only policy passes this guard: the parser reports the unconditional ci.main label and branchDerivedLabels=true, without evaluating the candidate ref. On refs/heads/candidate/(band)-srN that policy selects ci.main rather than ci.inflight, so the exact mirrored commit produces incorrectly branded nightly packages. Get-MauiReleaseVersionContent preserves an existing production three-label policy, and its return value is discarded here. Require candidate-aware ci.inflight branding in the pinned source before mirroring, while retaining legacy parsing for historical callers.
| function Get-MauiInflightLabelCondition { | ||
| param ([string] $SandboxPrefix) | ||
| $condition = "'`$(BUILD_SOURCEBRANCH)' == 'refs/heads/inflight/current' or `$([System.Text.RegularExpressions.Regex]::IsMatch('`$(BUILD_SOURCEBRANCH)', '^refs/heads/inflight/[1-9][0-9]*\.0\.[1-9][0-9]*xx-sr[1-9][0-9]*`$'))" | ||
| $condition = "'`$(BUILD_SOURCEBRANCH)' == 'refs/heads/inflight/current' or `$([System.Text.RegularExpressions.Regex]::IsMatch('`$(BUILD_SOURCEBRANCH)', '^refs/heads/(inflight|candidate)/[1-9][0-9]*\.0\.[1-9][0-9]*xx-sr[1-9][0-9]*`$'))" |
There was a problem hiding this comment.
[major] Backward Compatibility and Migration - This changes historical release-plan identities for retained receipts created from legacy one/two-label metadata. Get-MauiReleaseVersionContent regenerates those labels, so replaying the same pinned inputs now inserts candidate into the condition and changes normalizedSha, subsequent lane SHAs, and the receipt SHA. Get-VerifiedLaneReceipt in Sync-ReleaseNextLanes.ps1 and the retained-receipt sweep in Sync-ReleasePublishing.ps1 reconstruct the plan and reject the formerly valid receipt, blocking reconciliation/publication. Preserve the historical generation policy when replaying existing receipts and introduce the new branding through an explicit migration.
| function Get-MauiInflightLabelCondition { | ||
| param ([string] $SandboxPrefix) | ||
| $condition = "'`$(BUILD_SOURCEBRANCH)' == 'refs/heads/inflight/current' or `$([System.Text.RegularExpressions.Regex]::IsMatch('`$(BUILD_SOURCEBRANCH)', '^refs/heads/inflight/[1-9][0-9]*\.0\.[1-9][0-9]*xx-sr[1-9][0-9]*`$'))" | ||
| $condition = "'`$(BUILD_SOURCEBRANCH)' == 'refs/heads/inflight/current' or `$([System.Text.RegularExpressions.Regex]::IsMatch('`$(BUILD_SOURCEBRANCH)', '^refs/heads/(inflight|candidate)/[1-9][0-9]*\.0\.[1-9][0-9]*xx-sr[1-9][0-9]*`$'))" |
There was a problem hiding this comment.
[moderate] Regression Prevention and Test Coverage - Update the existing package-evaluation assertions with this candidate-branding change. MauiReleaseConfiguration.Tests.ps1:205 still expects ci.main for the generated legacy-policy candidate, and lines 267-269 do the same for the generated central policy; both now evaluate to ci.inflight through the changed helpers. Assert-PackageProperties throws on the mismatch when this suite is reached by release-readiness.yml. Update both candidate expectations and add authorized sandbox-candidate cases, retaining ci.main checks for main, pull refs, and unrelated sandbox scopes.
| } | ||
| if ((Get-NightlyMirrorRef $branch) -cne $commit) { throw 'The internal candidate did not retain the pinned public commit.' } | ||
| # The receipt permits later public rebases, but never overwrites unrelated internal work. | ||
| if ($baselineSha -cne $commit) { |
There was a problem hiding this comment.
[moderate] Logic and Correctness Verification - The candidate and ownership receipt advance in separate pushes. Starting with both at A, interruption after pushing candidate B but before pushing its receipt leaves candidate=B and receipt=A. If the public candidate is then rebased to C before the next hourly run, the ancestry guard rejects B because it differs from A and is not an ancestor of C, even though automation alone wrote B. Subsequent retries remain blocked, leaving the nightly mirror stale until manual repair. Make the two-ref transition atomic where supported, or persist a recoverable ownership checkpoint for a partially applied update.
|
@dalexsoto stamp |
This comment has been minimized.
This comment has been minimized.
| -Sr $roles.currentSr -Role candidate | ||
| $version = Get-MauiReleaseVersion -Content $content | ||
| if ($version.stable -or $version.label -cne 'ci.main' -or !$version.branchDerivedLabels -or $version.labelSandboxPrefix) { | ||
| throw 'The nightly candidate must retain production CI/non-stable branch-derived branding.' |
There was a problem hiding this comment.
[major] Logic and Correctness Verification - A candidate with the accepted legacy three-label, inflight-only policy passes this guard: Get-MauiReleaseVersion returns the unconditional ci.main label and branchDerivedLabels=true, not the label evaluated for the candidate ref. That policy selects ci.main on refs/heads/candidate/11.0.1xx-sr2, so the exact mirrored commit produces ci.main nightly packages instead of ci.inflight. Get-MauiReleaseVersionContent preserves an existing production three-label policy, and its returned content is discarded here. Require candidate-aware ci.inflight branding in the pinned source before mirroring while retaining legacy parsing for historical callers.
| function Get-MauiInflightLabelCondition { | ||
| param ([string] $SandboxPrefix) | ||
| $condition = "'`$(BUILD_SOURCEBRANCH)' == 'refs/heads/inflight/current' or `$([System.Text.RegularExpressions.Regex]::IsMatch('`$(BUILD_SOURCEBRANCH)', '^refs/heads/inflight/[1-9][0-9]*\.0\.[1-9][0-9]*xx-sr[1-9][0-9]*`$'))" | ||
| $condition = "'`$(BUILD_SOURCEBRANCH)' == 'refs/heads/inflight/current' or `$([System.Text.RegularExpressions.Regex]::IsMatch('`$(BUILD_SOURCEBRANCH)', '^refs/heads/(inflight|candidate)/[1-9][0-9]*\.0\.[1-9][0-9]*xx-sr[1-9][0-9]*`$'))" |
There was a problem hiding this comment.
[major] Backward Compatibility and Migration - Retained release receipts generated from legacy one/two-label metadata no longer reproduce. Get-MauiReleaseVersionContent regenerates those labels during New-MauiReleaseNextLanePlan, so replaying the same pinned inputs now inserts candidate into the condition, changing normalizedSha, subsequent lane SHAs and the receipt SHA. Get-VerifiedLaneReceipt in Sync-ReleaseNextLanes.ps1 rejects that previously valid receipt; the retained-receipt sweep in Sync-ReleasePublishing.ps1 also throws before processing subsequent releases, even after currentSr advances. Accepting the old condition in the parser does not preserve generated commit identities. Preserve the historical generation policy for receipt replay and introduce candidate branding through an explicit migration.
| function Get-MauiInflightLabelCondition { | ||
| param ([string] $SandboxPrefix) | ||
| $condition = "'`$(BUILD_SOURCEBRANCH)' == 'refs/heads/inflight/current' or `$([System.Text.RegularExpressions.Regex]::IsMatch('`$(BUILD_SOURCEBRANCH)', '^refs/heads/inflight/[1-9][0-9]*\.0\.[1-9][0-9]*xx-sr[1-9][0-9]*`$'))" | ||
| $condition = "'`$(BUILD_SOURCEBRANCH)' == 'refs/heads/inflight/current' or `$([System.Text.RegularExpressions.Regex]::IsMatch('`$(BUILD_SOURCEBRANCH)', '^refs/heads/(inflight|candidate)/[1-9][0-9]*\.0\.[1-9][0-9]*xx-sr[1-9][0-9]*`$'))" |
There was a problem hiding this comment.
[moderate] Regression Prevention and Test Coverage - The package-evaluation tests still assert the replaced candidate behavior. MauiReleaseConfiguration.Tests.ps1:205 expects ci.main for the generated two-label candidate, and lines 267-269 expect ci.main for the generated central-policy candidate; both now evaluate to ci.inflight. Assert-PackageProperties throws on that mismatch when release-readiness.yml reaches this suite. Update both expectations and exercise the authorized sandbox candidate too, retaining ci.main assertions for main, pull refs, and a different sandbox namespace.
| } | ||
| if ((Get-NightlyMirrorRef $branch) -cne $commit) { throw 'The internal candidate did not retain the pinned public commit.' } | ||
| # The receipt permits later public rebases, but never overwrites unrelated internal work. | ||
| if ($baselineSha -cne $commit) { |
There was a problem hiding this comment.
[moderate] Logic and Correctness Verification - The candidate and ownership ref advance in separate pushes. Starting with both at A, interruption after pushing candidate B but before updating its ownership ref leaves candidate=B and ownership=A. If the public candidate is then rebased to C before the next run, the ancestry guard rejects B because it differs from A and is not an ancestor of C, although automation alone wrote B. Every subsequent retry remains blocked, leaving the nightly mirror stale until manual repair. Make the two-ref transition atomic where supported or retain a recoverable ownership checkpoint for a partially applied update.
| $Result.previousBaselineSha = $baselineSha | ||
| if ($mirrorSha -and $mirrorSha -cne $commit -and $mirrorSha -cne $baselineSha) { | ||
| $null = Invoke-NightlyMirrorGit @('fetch', '--quiet', '--no-tags', '--no-recurse-submodules', | ||
| '--', $mirrorUrl, $mirrorSha) |
There was a problem hiding this comment.
[moderate] Regression Prevention and Test Coverage - The new ownership/ancestry guard has no discriminating regression coverage. validate-nightly uses PlanOnly, which returns before internal refs are read, while ReleasePublishing.Tests.ps1 invokes only the existing publication sweep, never Sync-PublishingNightlyMirror. A non-ancestor mirror equal to its ownership baseline must permit a public rebase, whereas an otherwise identical non-ancestor mirror unequal to that baseline must refuse before pushing. Add isolated fixtures for both cases and for a concurrent ref change rejecting the leased push; the current checks exercise none of these distinct outcomes.
PR Test Gate |
This comment has been minimized.
This comment has been minimized.
Tests Failure Analysis🧪 CI Analysis — click to expand📊 maui-prNo failures found. 🧪 maui-pr-devicetestsWindows; five
🧪 maui-pr-uitestsSame-reason matches below occur on
🧭 Follow-up — actions and refreshNext action: Reproduce yellow cases on
|
…0320) <!-- 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). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is the explicitly coordinated shared build-infrastructure repair against `main`. It is independent of #40312 and does not change any candidate, inflight, or other protected branch. ### Description of Change <!-- Enter description of the fix in this section --> Reuse the **exact runtime-manifest NuGet packages already restored by Pack macOS** in the dependent internal Pack Windows job: - Stage only `microsoft.net.workload.*.manifest-*` `.nupkg` files from the existing isolated `temp/workload` cache into the existing `MacNativeArtifacts` transfer. - Set `RuntimeManifestPackageSource` to that transferred local directory during internal Windows provisioning. `Workloads.csproj` uses this explicit source instead of requesting NuGet.org. - Retain the NuGet.org v3 default for public/local final-runtime restores and the existing configured feeds for prerelease restores. Existing additional sources are preserved. No network-isolation policy, SDK/runtime/package pin, signing, or publication setting changes. A missing local artifact fails explicitly rather than silently falling back to NuGet.org or substituting another package version. **Failure evidence:** official `dotnet-maui` [build 3137912](https://dev.azure.com/dnceng/internal/_build/results?buildId=3137912), at this PR's exact `main` base `df3291c7610d36940be9c640a809824c3d95f842`, fails in Windows **Provision SDK & Workloads**. Raw log 175 reports `NU1301` for `https://api.nuget.org/v3/index.json`, rejected by the CFSClean proxy with HTTP 403. The macOS pack passes. This PR addresses that restore failure, not the build's separate OneLocBuild failure. This complements #40159 rather than reverting its public-CI repair: removing NuGet.org without supplying the exact packages reproduces `NU1102` for all four final `11.0.100` runtime manifests. SDK-bundled manifests are not a safe replacement based on version labels alone: this exact main SDK bundles net10 manifests labeled `11.0.100` referencing `10.0.12`, whereas the requested NuGet packages reference `10.0.15`. The transfer preserves the actual requested package bytes. Searched upstream open and recently merged PRs for the manifest/bootstrap files and `NU1301`, including release/inflight-targeted changes. No duplicate package-transfer fix was found; #40060's next-major migration is a separate change. #### Validation Fix commit: `1370889ea4e9388c99ec82f2ede6291e232335d4`. **The original official Windows restore failure is empirically fixed.** [dotnet-maui build 3138084](https://dev.azure.com/dnceng/internal/_build/results?buildId=3138084) (`20261116.5`) runs this exact fix SHA on the isolated internal ref `validation/official-manifest-restore-1370889ea4`, with the normal official CFSClean policy unchanged. Raw logs retrieved with `az devops invoke` confirm the complete artifact producer/consumer path: | Official step | Raw evidence | Result | | --- | --- | --- | | Stage Runtime Manifest Packages | [Log 68](https://dev.azure.com/dnceng/internal/_apis/build/builds/3138084/logs/68?api-version=7.1) | Passed; copied exactly four unchanged `11.0.100` runtime `.nupkg` files. | | Windows Download Mac Native Binaries | [Log 134](https://dev.azure.com/dnceng/internal/_apis/build/builds/3138084/logs/134?api-version=7.1) | Passed; downloaded `MacNativeArtifacts` into `artifacts/bin`. | | Windows Provision SDK & Workloads | [Log 135](https://dev.azure.com/dnceng/internal/_apis/build/builds/3138084/logs/135?api-version=7.1) | Passed; `Workloads.csproj` restored in **825 ms**, then `Build succeeded`, **0 warnings / 0 errors** at `2026-11-17T01:01:36Z`. | **Public Windows provisioning is preserved.** Replacement [maui-pr build 1684648](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1684648), at PR merge SHA `2d5ee4ee327eb719af851be2309d55d68b7a938f`, replaces canceled build 1684642. All four Windows **Provision SDK & Build BuildTasks** tasks passed: raw logs [114](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1684648/logs/114?api-version=7.1), [115](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1684648/logs/115?api-version=7.1), [116](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1684648/logs/116?api-version=7.1), and [117](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1684648/logs/117?api-version=7.1). Log 114 restored `Workloads.csproj` in **980 ms**; each task's SDK and BuildTasks builds completed with **0 warnings / 0 errors**. The existing **Pester scripts check is red on both this head and its exact main base**. Compared the complete `pester-results.xml` artifacts from [PR run 43988419959](https://github.com/dotnet/maui/actions/runs/43988419959) (`1370889ea4e9388c99ec82f2ede6291e232335d4`) and [baseline run 43966407306](https://github.com/dotnet/maui/actions/runs/43966407306) (`df3291c7610d36940be9c640a809824c3d95f842`): both report **2,671 cases and the same 15 failing test identities**, with **zero new or removed failures**. This does not claim Pester is green. Both full Azure pipelines were still running when this evidence was recorded. No protected main/candidate ref was moved. This feature validation run is not evidence of candidate deployment, complete signing success, or customer publication. Local fixed-path checks used the repository's exact SDK payload, `11.0.100-rtm.26514.118` / SDK commit `a586537b38`, and fresh restore directories. `$EVIDENCE` denotes an isolated session evidence directory; the transferred package directory is `artifacts/bin/runtime-manifests`. ```sh # Baseline: failed as expected, NU1102 for the four final runtime manifests. dotnet restore src/DotNet/Dependencies/Workloads.csproj --configfile NuGet.config --no-http-cache --force -p:RestoreAdditionalProjectSources= -p:RestorePackagesPath="$EVIDENCE/baseline-approved-packages/" -p:BaseIntermediateOutputPath="$EVIDENCE/baseline-approved-obj/" --verbosity minimal # Fixed: passed, all nine exact package downloads, zero warnings/errors. DOTNET_ROOT="$PWD/.dotnet" RuntimeManifestPackageSource="$PWD/artifacts/bin/runtime-manifests" NUGET_HTTP_CACHE_PATH="$EVIDENCE/fixed-restore-http/" ./.dotnet/dotnet restore src/DotNet/Dependencies/Workloads.csproj --configfile NuGet.config --no-http-cache --force --packages "$EVIDENCE/fixed-restore-packages/" -p:BaseIntermediateOutputPath="$EVIDENCE/fixed-restore-obj/" --verbosity diagnostic # Real manifest-provisioning target: passed, including child restore and manifest copy. DOTNET_ROOT="$PWD/.dotnet" RuntimeManifestPackageSource="$PWD/artifacts/bin/runtime-manifests" NUGET_HTTP_CACHE_PATH="$EVIDENCE/provision-http/" ./.dotnet/dotnet msbuild src/DotNet/DotNet.csproj -t:_AcquireWorkloadManifests -p:InstallDotNet=false -p:InstallWorkloadPacks=false -p:Configuration=Release -nologo -verbosity:minimal # Available prerelease fixture: passed using configured feeds only, without an artifact override. DOTNET_ROOT="$PWD/.dotnet" NUGET_HTTP_CACHE_PATH="$EVIDENCE/prerelease-http/" ./.dotnet/dotnet restore src/DotNet/Dependencies/Workloads.csproj --configfile NuGet.config --no-http-cache --force --packages "$EVIDENCE/prerelease-packages/" -p:BaseIntermediateOutputPath="$EVIDENCE/prerelease-obj/" -p:MicrosoftNETCoreAppRefPackageVersion=11.0.0-rtm.26480.113 --verbosity minimal # Configuration syntax/whitespace: all passed. ruby -ryaml -e 'YAML.parse_file(ARGV[0]); puts "YAML syntax passed"' eng/pipelines/arcade/stage-pack.yml xmllint --noout src/DotNet/Dependencies/Workloads.csproj git diff --check ``` Inspected the successful restore graph: NuGet.org is absent. All four final runtime `.nupkg.metadata` files name the local artifact source, all four staged packages are byte-identical to their freshly restored originals, and the real provisioning target installs the unchanged current `11.0.0` and previous `10.0.15` pack references. The complete nine-package download requirement set is identical before and after the fix. A separate missing-directory restore fails as expected with explicit `NU1301`. MSBuild evaluation confirms unchanged stable/prerelease defaults and preservation of pre-existing additional sources. **Local transport limitation:** this Mac cannot establish TLS to NuGet.org v3. The local package-staging fixture was acquired using the already-documented NuGet.org v2 restore override; no alternate endpoint is committed or used for the Windows fix. The committed macOS/public default remains v3. Windows runtime/MSI/signing execution is unavailable locally; the official raw-log evidence above independently confirms the complete manifest artifact producer/consumer and Windows provisioning path. No pipeline/configuration tests were added. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Repairs the official Windows runtime-manifest restoration failure demonstrated above. No product issue is closed. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…anches as production (#40347) <!-- 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). Release infrastructure: the scheduled **Prepare signed release publication** workflow always runs from `main`. For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. ### Description of Change Both jobs of **Prepare signed release publication** (`release-publishing.yml`) fail every hour on `main`, e.g. [run 44173043719](https://github.com/dotnet/maui/actions/runs/44173043719). **`prepare` — `Release Git operation 'merge-base' failed`.** The SR1 receipt is still inventoried even though [11.0.10](https://github.com/dotnet/maui/releases/tag/11.0.10) was published on 2026-11-11 at the live `release/11.0.1xx-sr1` head (`5e4acac29f`). The reconciler had no terminal state, so it kept re-proving SR1's prepared commits against later history. Those ancestry checks no longer hold: - the release was cut without the receipt's candidate merge as an ancestor - `net11` has been force-pushed since `Sync-ReleasePublishing.ps1` now reports such a lane as `published` and skips it. A lane qualifies only when all of these hold: - servicing preparation for the **current receipt generation** is complete: `Get-PublishingReleaseSource` returns its approved, reviewed servicing merge, and staging matches that merge - the live release head has **exactly the same tree** as that reviewed servicing merge. Ancestry is not required: #40119 made SR1's head (`5e4acac29f`) tree-identical to the reviewed merge (`78d72f943e`) without descending from it - a stable, non-draft, non-prerelease GitHub Release for that SR exists - its tag (annotated tags peeled) points at the **exact live release head** - `eng/Versions.props` at that commit verifies against the tag via the existing `Get-MauiVerifiedPublishedVersion` The check runs after servicing preparation, so a superseding receipt generation still gets its servicing PR and an older tag can never mark it published. It runs before any signing, dispatch, Azure call or completion-plan ancestry re-verification. A tree mismatch returns before any GitHub Release lookup. A hotfix that moves the release head breaks the tag equality, so the lane falls back to the normal path. Sandbox runs are unaffected. **`mirror-nightly` — `TF400813 … is not authorized to access this resource`.** The federated identity from #40312 is not onboarded to the `dnceng` organization. The job is now opt-in through the `RELEASE_NIGHTLY_MIRROR_ENABLED` repository variable (unset, so it is off). The candidate instead reaches the internal `dotnet-maui` mirror through the dnceng `dotnet-mirroring` configuration as an optional fast-forward branch pattern. That configuration change is in dotnet-mirroring PR 68907 and needs dnceng approval. **Branch classification — `Branch 'candidate/11.0.1xx-sr2' is not classified as a production branch`.** Candidate nightlies now publish to the production `.NET 11.0.1xx SDK` channel (official build 20261117.6, BAR 341936, promoted to dotnet11), but `.azuredevops/policies/branchClassification.yml` did not list `candidate/*`, so Arcade's production-channel validation warned during that promotion. The warning is audit-only today; enforcement would block candidate publication. `candidate/*` is now in the production ruleset. Arcade matches `<prefix>/*` by prefix, so future candidate SRs are covered. The classification service reads this file from the internal mirror's `main`, so it applies once this merges and mirrors. **Docs.** `docs/ReleaseBranchWorkflow.md` and `.github/docs/trigger-azdo-pipeline-setup.md` now document: - who mirrors the candidate - the leased internal sync needed after any public rebase or force-push of a mirrored branch - the `published` state - the effect of force-pushing `net11` on unpublished lanes - the `dnceng` onboarding prerequisite and TF400813 - why `candidate/*` is classified as production No SDK, package, feed, channel or pipeline-trigger changes. Separately, `main` (11.x) builds still reach the dotnet10 feed through the Maestro default channel `dotnet/maui @ main → .NET 10.0.1xx SDK`. That mapping lives outside this repository; draft maestro-configuration PR 68926 removes it. #### Validation | Command | Result | | --- | --- | | `pwsh ./eng/scripts/Sync-ReleasePublishing.ps1 -PlanOnly -OutputDirectory <dir>` on `origin/main` (`99a7a0605f`) | ❌ exit 1, `Release Git operation 'merge-base' failed:` (reproduces the hourly failure); SR1 stuck at `waiting-for-manual-release-cut` | | Same command on this branch (`77ad1192e3`) | ✅ exit 0; `release/11.0.1xx-sr1` → `published`, tag `11.0.10`, live head `5e4acac29f253a7e969c2bf0f6479eb110783be2`; `sourceSha` and `stagingSha` are the reviewed servicing merge `78d72f943e` (same tree `5ca0fd0c97`); `publicPublicationApprovalRequired: false` | | The script's own `Get-PublishedReleaseLane`, extracted from its AST, with SR1's live head against source `78d72f943e`, then against the different-content candidate merge `01c74ef93c` (tree `12652ed7f6`) | ✅ `78d72f943e` → published; `01c74ef93c` → not published, with 0 GitHub API calls | | `pwsh ./eng/scripts/Sync-ReleasePublishing.ps1 -SyncNightlyMirror -PlanOnly -OutputDirectory <dir>` (the PR `validate-nightly` job), on `77ad1192e3` | ✅ exit 0; `planned`, `candidate/11.0.1xx-sr2` @ `888db82bd5` | | `[Management.Automation.Language.Parser]::ParseFile` on `Sync-ReleasePublishing.ps1` and `MauiReleaseConfiguration.psm1` | ✅ no errors | | `python3` `yaml.safe_load` on `.azuredevops/policies/branchClassification.yml` | ✅ parses; `production`: `main`, `release/*`, `internal/release/*`, `net11.0`, `net10.0`, `net9.0`, `inflight/current`, `candidate/*` | | `Invoke-Pester .github/scripts/ReleasePublishing.Tests.ps1` |⚠️ 6/6 fail **identically on `origin/main` and this branch** (same tests and messages); all 6 are among `main`'s pre-existing CI failures below (stale harness, not touched here) | | CI **Pester scripts** (`PowerShell Script Tests` run [44204374876](https://github.com/dotnet/maui/actions/runs/44204374876) at `77ad1192e3`): `pester-results` artifact compared with a `main` run's |⚠️ fails on both: 2671 cases, 15 failures, identical failing tests (0 new, 0 removed) | | `npx cspell@8 --config ./eng/automation/cspell/cSpell.json docs/ReleaseBranchWorkflow.md .github/docs/trigger-azdo-pipeline-setup.md --no-progress` | ✅ 0 issues in 2 files | | CI **Docs: Spellcheck** |⚠️ 13 unknown words, all in 4 docs this PR doesn't touch (`WebAuthenticator.md`, `WorkloadMsi.md`, `NuGetPackageSkills.md`, `Passkeys.md`) | | `actionlint .github/workflows/release-publishing.yml` | ✅ | | `git diff --check origin/main...HEAD` | ✅ | With only the SR1 receipt retained, the non-plan-only `prepare` now ends after the `published` lane without an Azure token. SR2's signed dispatch will still need the `dnceng` onboarding when its release is cut. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> No tracking issue; fixes the hourly failures of the `Prepare signed release publication` workflow ([latest failing run](https://github.com/dotnet/maui/actions/runs/44173043719)). <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
) <!-- 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). `main` is where `docs/ReleaseBranchWorkflow.md` and the release automation it describes live; #40297, #40312 and #40347 also targeted `main`. For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. ### Description of Change Official nightlies build from the internal mirror of the current candidate lane, `candidate/11.0.1xx-sr2`. Candidate lanes are rebased on GitHub, and fast-forward mirroring can't follow a force push. The internal `candidate/11.0.1xx-sr2` is stuck at `b45b3b4`, a published GitHub tip from 2026-11-18, while GitHub has force-pushed it three times since and is at `7b4e8e5`, so nightlies build stale sources. The internal dnceng `dotnet-mirroring` PR 68907 mirrors the MAUI candidate lanes, and PR 69136 adds an opt-in `followRewrites` list that opts in only those lanes. When the public tip of a listed fast-forward branch no longer descends from the internal tip, the mirror resets the internal branch to the public tip with a leased push. It does this only when the GitHub repository activity shows that the internal tip was once a published tip of the same branch, so no internal-only commit can be dropped. Otherwise it still files the mirroring issue. The `net11` review lane and the `inflight/<band>-srN` staging lanes aren't mirrored, because nightlies build only from the candidate. `docs/ReleaseBranchWorkflow.md` said the mirroring "never force-pushes" and that every public rebase needs a maintainer's leased internal sync. It now requires the `followRewrites` opt-in for the candidate lanes, keeps the manual leased sync only for tips that can't be verified, and states which lanes aren't mirrored. This is a documentation-only change (`git diff --check` is clean). The behavior it describes takes effect once those `dotnet-mirroring` PRs are merged and deployed. ### Issues Fixed None. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…net#40532) <!-- 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). `main` is where `docs/ReleaseBranchWorkflow.md` and the release automation it describes live; dotnet#40297, dotnet#40312 and dotnet#40347 also targeted `main`. For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. ### Description of Change Official nightlies build from the internal mirror of the current candidate lane, `candidate/11.0.1xx-sr2`. Candidate lanes are rebased on GitHub, and fast-forward mirroring can't follow a force push. The internal `candidate/11.0.1xx-sr2` is stuck at `b45b3b4`, a published GitHub tip from 2026-11-18, while GitHub has force-pushed it three times since and is at `7b4e8e5`, so nightlies build stale sources. The internal dnceng `dotnet-mirroring` PR 68907 mirrors the MAUI candidate lanes, and PR 69136 adds an opt-in `followRewrites` list that opts in only those lanes. When the public tip of a listed fast-forward branch no longer descends from the internal tip, the mirror resets the internal branch to the public tip with a leased push. It does this only when the GitHub repository activity shows that the internal tip was once a published tip of the same branch, so no internal-only commit can be dropped. Otherwise it still files the mirroring issue. The `net11` review lane and the `inflight/<band>-srN` staging lanes aren't mirrored, because nightlies build only from the candidate. `docs/ReleaseBranchWorkflow.md` said the mirroring "never force-pushes" and that every public rebase needs a maintainer's leased internal sync. It now requires the `followRewrites` opt-in for the candidate lanes, keeps the manual leased sync only for tips that can't be verified, and states which lanes aren't mirrored. This is a documentation-only change (`git diff --check` is clean). The behavior it describes takes effect once those `dotnet-mirroring` PRs are merged and deployed. ### Issues Fixed None. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…net#40532) <!-- 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). `main` is where `docs/ReleaseBranchWorkflow.md` and the release automation it describes live; dotnet#40297, dotnet#40312 and dotnet#40347 also targeted `main`. For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. ### Description of Change Official nightlies build from the internal mirror of the current candidate lane, `candidate/11.0.1xx-sr2`. Candidate lanes are rebased on GitHub, and fast-forward mirroring can't follow a force push. The internal `candidate/11.0.1xx-sr2` is stuck at `b45b3b4`, a published GitHub tip from 2026-11-18, while GitHub has force-pushed it three times since and is at `7b4e8e5`, so nightlies build stale sources. The internal dnceng `dotnet-mirroring` PR 68907 mirrors the MAUI candidate lanes, and PR 69136 adds an opt-in `followRewrites` list that opts in only those lanes. When the public tip of a listed fast-forward branch no longer descends from the internal tip, the mirror resets the internal branch to the public tip with a leased push. It does this only when the GitHub repository activity shows that the internal tip was once a published tip of the same branch, so no internal-only commit can be dropped. Otherwise it still files the mirroring issue. The `net11` review lane and the `inflight/<band>-srN` staging lanes aren't mirrored, because nightlies build only from the candidate. `docs/ReleaseBranchWorkflow.md` said the mirroring "never force-pushes" and that every public rebase needs a maintainer's leased internal sync. It now requires the `followRewrites` opt-in for the candidate lanes, keeps the manual leased sync only for tips that can't be verified, and states which lanes aren't mirrored. This is a documentation-only change (`git diff --check` is clean). The behavior it describes takes effect once those `dotnet-mirroring` PRs are merged and deployed. ### Issues Fixed None. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…0312) <!-- 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). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is release infrastructure on `main`, following dotnet#40297. No servicing branches are modified by this PR. ### Description of Change <!-- Enter description of the fix in this section --> Remove the manual internal-mirror step when the nightly candidate changes or is rebased: - Add an independent nightly-mirror job to the existing **Prepare signed release publication** workflow. It runs hourly, after successful release tracking, and after canonical state/tooling changes on `main`. - Resolve the selected candidate from `eng/release-rollover.json`; mirror its pinned public SHA into the existing internal `dotnet-maui` repository. Future SR numbers need no workflow edits. - Reuse the existing in-process Azure federation. Only trusted `main` scripts execute with credentials; candidate content is fetched as Git data. No new PAT is introduced. - Use explicit ref leases and an internal `automation/nightly-mirror/candidate/*` ownership ref. New branches and fast-forwards can be adopted; rebases can replace only the last verified automated mirror. Unexpected internal work or ref races fail explicitly. - Keep the candidate's existing **05:00 UTC** official pipeline 1095 schedule, avoiding a second competing build trigger. Keep release publication independent of mirror-job success. - Preserve candidate `ci.inflight` policy in the shared release-version helpers while accepting the older inflight-only conditions. - Add isolated read-only PR syntax/planning validation; PR validation cannot obtain the production OIDC identity and uses a separate concurrency group. Validation performed: - `actionlint -oneline .github/workflows/release-publishing.yml` — passed. - `git diff --check` — passed. - PowerShell parser checks for both changed scripts — passed. - `pwsh -NoProfile -File eng/scripts/Sync-ReleasePublishing.ps1 -SyncNightlyMirror -PlanOnly -OutputDirectory <session-artifact-directory>` — passed; selected `candidate/11.0.1xx-sr2` at `56e48fb536eb6245e392f7182e39522692fb7619`. - Executed the new mirror function against the real internal repository using the existing Azure CLI login: verified that exact candidate SHA, created the ownership ref, and repeated successfully without changes. - Parsed real version metadata from the pre-change main, merged main and current candidate commits successfully, preserving compatibility with the older branding conditions. - Actual [read-only workflow CI](https://github.com/dotnet/maui/actions/runs/43965637182) — passed; `validate-nightly` succeeded, while credentialed `mirror-nightly` and release `prepare` were correctly skipped for the PR. - Existing script suite: [PR run](https://github.com/dotnet/maui/actions/runs/43965637106) and [manually dispatched exact-main baseline](https://github.com/dotnet/maui/actions/runs/43966407306) at `df3291c7610d36940be9c640a809824c3d95f842` each report 2,671 cases and the same 15 failures. Compared both complete NUnit failure inventories, including multiplicity: no added or removed failure identities. - [Docs spellcheck](https://github.com/dotnet/maui/actions/runs/43965637009) fails in four files unchanged from the exact main base; none of its reported words are in this PR's documentation changes. Deployment: the existing federated identity needs Git read/contribute/create-branch and force-push access for the internal candidate and its ownership ref. The local live check used the existing Azure CLI identity; it does not certify the federated identity's Git grants. Automatic production execution starts after this PR lands on `main`. The initial official candidate run is https://dev.azure.com/dnceng/internal/_build/results?buildId=3137915 ; its signed publication is tracked separately and is not claimed complete here. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> N/A — release engineering automation; follow-up to dotnet#40297. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…tnet#40320) <!-- 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). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. This is the explicitly coordinated shared build-infrastructure repair against `main`. It is independent of dotnet#40312 and does not change any candidate, inflight, or other protected branch. ### Description of Change <!-- Enter description of the fix in this section --> Reuse the **exact runtime-manifest NuGet packages already restored by Pack macOS** in the dependent internal Pack Windows job: - Stage only `microsoft.net.workload.*.manifest-*` `.nupkg` files from the existing isolated `temp/workload` cache into the existing `MacNativeArtifacts` transfer. - Set `RuntimeManifestPackageSource` to that transferred local directory during internal Windows provisioning. `Workloads.csproj` uses this explicit source instead of requesting NuGet.org. - Retain the NuGet.org v3 default for public/local final-runtime restores and the existing configured feeds for prerelease restores. Existing additional sources are preserved. No network-isolation policy, SDK/runtime/package pin, signing, or publication setting changes. A missing local artifact fails explicitly rather than silently falling back to NuGet.org or substituting another package version. **Failure evidence:** official `dotnet-maui` [build 3137912](https://dev.azure.com/dnceng/internal/_build/results?buildId=3137912), at this PR's exact `main` base `df3291c7610d36940be9c640a809824c3d95f842`, fails in Windows **Provision SDK & Workloads**. Raw log 175 reports `NU1301` for `https://api.nuget.org/v3/index.json`, rejected by the CFSClean proxy with HTTP 403. The macOS pack passes. This PR addresses that restore failure, not the build's separate OneLocBuild failure. This complements dotnet#40159 rather than reverting its public-CI repair: removing NuGet.org without supplying the exact packages reproduces `NU1102` for all four final `11.0.100` runtime manifests. SDK-bundled manifests are not a safe replacement based on version labels alone: this exact main SDK bundles net10 manifests labeled `11.0.100` referencing `10.0.12`, whereas the requested NuGet packages reference `10.0.15`. The transfer preserves the actual requested package bytes. Searched upstream open and recently merged PRs for the manifest/bootstrap files and `NU1301`, including release/inflight-targeted changes. No duplicate package-transfer fix was found; dotnet#40060's next-major migration is a separate change. #### Validation Fix commit: `1370889ea4e9388c99ec82f2ede6291e232335d4`. **The original official Windows restore failure is empirically fixed.** [dotnet-maui build 3138084](https://dev.azure.com/dnceng/internal/_build/results?buildId=3138084) (`20261116.5`) runs this exact fix SHA on the isolated internal ref `validation/official-manifest-restore-1370889ea4`, with the normal official CFSClean policy unchanged. Raw logs retrieved with `az devops invoke` confirm the complete artifact producer/consumer path: | Official step | Raw evidence | Result | | --- | --- | --- | | Stage Runtime Manifest Packages | [Log 68](https://dev.azure.com/dnceng/internal/_apis/build/builds/3138084/logs/68?api-version=7.1) | Passed; copied exactly four unchanged `11.0.100` runtime `.nupkg` files. | | Windows Download Mac Native Binaries | [Log 134](https://dev.azure.com/dnceng/internal/_apis/build/builds/3138084/logs/134?api-version=7.1) | Passed; downloaded `MacNativeArtifacts` into `artifacts/bin`. | | Windows Provision SDK & Workloads | [Log 135](https://dev.azure.com/dnceng/internal/_apis/build/builds/3138084/logs/135?api-version=7.1) | Passed; `Workloads.csproj` restored in **825 ms**, then `Build succeeded`, **0 warnings / 0 errors** at `2026-11-17T01:01:36Z`. | **Public Windows provisioning is preserved.** Replacement [maui-pr build 1684648](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1684648), at PR merge SHA `2d5ee4ee327eb719af851be2309d55d68b7a938f`, replaces canceled build 1684642. All four Windows **Provision SDK & Build BuildTasks** tasks passed: raw logs [114](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1684648/logs/114?api-version=7.1), [115](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1684648/logs/115?api-version=7.1), [116](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1684648/logs/116?api-version=7.1), and [117](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1684648/logs/117?api-version=7.1). Log 114 restored `Workloads.csproj` in **980 ms**; each task's SDK and BuildTasks builds completed with **0 warnings / 0 errors**. The existing **Pester scripts check is red on both this head and its exact main base**. Compared the complete `pester-results.xml` artifacts from [PR run 43988419959](https://github.com/dotnet/maui/actions/runs/43988419959) (`1370889ea4e9388c99ec82f2ede6291e232335d4`) and [baseline run 43966407306](https://github.com/dotnet/maui/actions/runs/43966407306) (`df3291c7610d36940be9c640a809824c3d95f842`): both report **2,671 cases and the same 15 failing test identities**, with **zero new or removed failures**. This does not claim Pester is green. Both full Azure pipelines were still running when this evidence was recorded. No protected main/candidate ref was moved. This feature validation run is not evidence of candidate deployment, complete signing success, or customer publication. Local fixed-path checks used the repository's exact SDK payload, `11.0.100-rtm.26514.118` / SDK commit `a586537b38`, and fresh restore directories. `$EVIDENCE` denotes an isolated session evidence directory; the transferred package directory is `artifacts/bin/runtime-manifests`. ```sh # Baseline: failed as expected, NU1102 for the four final runtime manifests. dotnet restore src/DotNet/Dependencies/Workloads.csproj --configfile NuGet.config --no-http-cache --force -p:RestoreAdditionalProjectSources= -p:RestorePackagesPath="$EVIDENCE/baseline-approved-packages/" -p:BaseIntermediateOutputPath="$EVIDENCE/baseline-approved-obj/" --verbosity minimal # Fixed: passed, all nine exact package downloads, zero warnings/errors. DOTNET_ROOT="$PWD/.dotnet" RuntimeManifestPackageSource="$PWD/artifacts/bin/runtime-manifests" NUGET_HTTP_CACHE_PATH="$EVIDENCE/fixed-restore-http/" ./.dotnet/dotnet restore src/DotNet/Dependencies/Workloads.csproj --configfile NuGet.config --no-http-cache --force --packages "$EVIDENCE/fixed-restore-packages/" -p:BaseIntermediateOutputPath="$EVIDENCE/fixed-restore-obj/" --verbosity diagnostic # Real manifest-provisioning target: passed, including child restore and manifest copy. DOTNET_ROOT="$PWD/.dotnet" RuntimeManifestPackageSource="$PWD/artifacts/bin/runtime-manifests" NUGET_HTTP_CACHE_PATH="$EVIDENCE/provision-http/" ./.dotnet/dotnet msbuild src/DotNet/DotNet.csproj -t:_AcquireWorkloadManifests -p:InstallDotNet=false -p:InstallWorkloadPacks=false -p:Configuration=Release -nologo -verbosity:minimal # Available prerelease fixture: passed using configured feeds only, without an artifact override. DOTNET_ROOT="$PWD/.dotnet" NUGET_HTTP_CACHE_PATH="$EVIDENCE/prerelease-http/" ./.dotnet/dotnet restore src/DotNet/Dependencies/Workloads.csproj --configfile NuGet.config --no-http-cache --force --packages "$EVIDENCE/prerelease-packages/" -p:BaseIntermediateOutputPath="$EVIDENCE/prerelease-obj/" -p:MicrosoftNETCoreAppRefPackageVersion=11.0.0-rtm.26480.113 --verbosity minimal # Configuration syntax/whitespace: all passed. ruby -ryaml -e 'YAML.parse_file(ARGV[0]); puts "YAML syntax passed"' eng/pipelines/arcade/stage-pack.yml xmllint --noout src/DotNet/Dependencies/Workloads.csproj git diff --check ``` Inspected the successful restore graph: NuGet.org is absent. All four final runtime `.nupkg.metadata` files name the local artifact source, all four staged packages are byte-identical to their freshly restored originals, and the real provisioning target installs the unchanged current `11.0.0` and previous `10.0.15` pack references. The complete nine-package download requirement set is identical before and after the fix. A separate missing-directory restore fails as expected with explicit `NU1301`. MSBuild evaluation confirms unchanged stable/prerelease defaults and preservation of pre-existing additional sources. **Local transport limitation:** this Mac cannot establish TLS to NuGet.org v3. The local package-staging fixture was acquired using the already-documented NuGet.org v2 restore override; no alternate endpoint is committed or used for the Windows fix. The committed macOS/public default remains v3. Windows runtime/MSI/signing execution is unavailable locally; the official raw-log evidence above independently confirms the complete manifest artifact producer/consumer and Windows provisioning path. No pipeline/configuration tests were added. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Repairs the official Windows runtime-manifest restoration failure demonstrated above. No product issue is closed. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…anches as production (dotnet#40347) <!-- 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). Release infrastructure: the scheduled **Prepare signed release publication** workflow always runs from `main`. For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. ### Description of Change Both jobs of **Prepare signed release publication** (`release-publishing.yml`) fail every hour on `main`, e.g. [run 44173043719](https://github.com/dotnet/maui/actions/runs/44173043719). **`prepare` — `Release Git operation 'merge-base' failed`.** The SR1 receipt is still inventoried even though [11.0.10](https://github.com/dotnet/maui/releases/tag/11.0.10) was published on 2026-11-11 at the live `release/11.0.1xx-sr1` head (`5e4acac29f`). The reconciler had no terminal state, so it kept re-proving SR1's prepared commits against later history. Those ancestry checks no longer hold: - the release was cut without the receipt's candidate merge as an ancestor - `net11` has been force-pushed since `Sync-ReleasePublishing.ps1` now reports such a lane as `published` and skips it. A lane qualifies only when all of these hold: - servicing preparation for the **current receipt generation** is complete: `Get-PublishingReleaseSource` returns its approved, reviewed servicing merge, and staging matches that merge - the live release head has **exactly the same tree** as that reviewed servicing merge. Ancestry is not required: dotnet#40119 made SR1's head (`5e4acac29f`) tree-identical to the reviewed merge (`78d72f943e`) without descending from it - a stable, non-draft, non-prerelease GitHub Release for that SR exists - its tag (annotated tags peeled) points at the **exact live release head** - `eng/Versions.props` at that commit verifies against the tag via the existing `Get-MauiVerifiedPublishedVersion` The check runs after servicing preparation, so a superseding receipt generation still gets its servicing PR and an older tag can never mark it published. It runs before any signing, dispatch, Azure call or completion-plan ancestry re-verification. A tree mismatch returns before any GitHub Release lookup. A hotfix that moves the release head breaks the tag equality, so the lane falls back to the normal path. Sandbox runs are unaffected. **`mirror-nightly` — `TF400813 … is not authorized to access this resource`.** The federated identity from dotnet#40312 is not onboarded to the `dnceng` organization. The job is now opt-in through the `RELEASE_NIGHTLY_MIRROR_ENABLED` repository variable (unset, so it is off). The candidate instead reaches the internal `dotnet-maui` mirror through the dnceng `dotnet-mirroring` configuration as an optional fast-forward branch pattern. That configuration change is in dotnet-mirroring PR 68907 and needs dnceng approval. **Branch classification — `Branch 'candidate/11.0.1xx-sr2' is not classified as a production branch`.** Candidate nightlies now publish to the production `.NET 11.0.1xx SDK` channel (official build 20261117.6, BAR 341936, promoted to dotnet11), but `.azuredevops/policies/branchClassification.yml` did not list `candidate/*`, so Arcade's production-channel validation warned during that promotion. The warning is audit-only today; enforcement would block candidate publication. `candidate/*` is now in the production ruleset. Arcade matches `<prefix>/*` by prefix, so future candidate SRs are covered. The classification service reads this file from the internal mirror's `main`, so it applies once this merges and mirrors. **Docs.** `docs/ReleaseBranchWorkflow.md` and `.github/docs/trigger-azdo-pipeline-setup.md` now document: - who mirrors the candidate - the leased internal sync needed after any public rebase or force-push of a mirrored branch - the `published` state - the effect of force-pushing `net11` on unpublished lanes - the `dnceng` onboarding prerequisite and TF400813 - why `candidate/*` is classified as production No SDK, package, feed, channel or pipeline-trigger changes. Separately, `main` (11.x) builds still reach the dotnet10 feed through the Maestro default channel `dotnet/maui @ main → .NET 10.0.1xx SDK`. That mapping lives outside this repository; draft maestro-configuration PR 68926 removes it. #### Validation | Command | Result | | --- | --- | | `pwsh ./eng/scripts/Sync-ReleasePublishing.ps1 -PlanOnly -OutputDirectory <dir>` on `origin/main` (`99a7a0605f`) | ❌ exit 1, `Release Git operation 'merge-base' failed:` (reproduces the hourly failure); SR1 stuck at `waiting-for-manual-release-cut` | | Same command on this branch (`77ad1192e3`) | ✅ exit 0; `release/11.0.1xx-sr1` → `published`, tag `11.0.10`, live head `5e4acac29f253a7e969c2bf0f6479eb110783be2`; `sourceSha` and `stagingSha` are the reviewed servicing merge `78d72f943e` (same tree `5ca0fd0c97`); `publicPublicationApprovalRequired: false` | | The script's own `Get-PublishedReleaseLane`, extracted from its AST, with SR1's live head against source `78d72f943e`, then against the different-content candidate merge `01c74ef93c` (tree `12652ed7f6`) | ✅ `78d72f943e` → published; `01c74ef93c` → not published, with 0 GitHub API calls | | `pwsh ./eng/scripts/Sync-ReleasePublishing.ps1 -SyncNightlyMirror -PlanOnly -OutputDirectory <dir>` (the PR `validate-nightly` job), on `77ad1192e3` | ✅ exit 0; `planned`, `candidate/11.0.1xx-sr2` @ `888db82bd5` | | `[Management.Automation.Language.Parser]::ParseFile` on `Sync-ReleasePublishing.ps1` and `MauiReleaseConfiguration.psm1` | ✅ no errors | | `python3` `yaml.safe_load` on `.azuredevops/policies/branchClassification.yml` | ✅ parses; `production`: `main`, `release/*`, `internal/release/*`, `net11.0`, `net10.0`, `net9.0`, `inflight/current`, `candidate/*` | | `Invoke-Pester .github/scripts/ReleasePublishing.Tests.ps1` |⚠️ 6/6 fail **identically on `origin/main` and this branch** (same tests and messages); all 6 are among `main`'s pre-existing CI failures below (stale harness, not touched here) | | CI **Pester scripts** (`PowerShell Script Tests` run [44204374876](https://github.com/dotnet/maui/actions/runs/44204374876) at `77ad1192e3`): `pester-results` artifact compared with a `main` run's |⚠️ fails on both: 2671 cases, 15 failures, identical failing tests (0 new, 0 removed) | | `npx cspell@8 --config ./eng/automation/cspell/cSpell.json docs/ReleaseBranchWorkflow.md .github/docs/trigger-azdo-pipeline-setup.md --no-progress` | ✅ 0 issues in 2 files | | CI **Docs: Spellcheck** |⚠️ 13 unknown words, all in 4 docs this PR doesn't touch (`WebAuthenticator.md`, `WorkloadMsi.md`, `NuGetPackageSkills.md`, `Passkeys.md`) | | `actionlint .github/workflows/release-publishing.yml` | ✅ | | `git diff --check origin/main...HEAD` | ✅ | With only the SR1 receipt retained, the non-plan-only `prepare` now ends after the `published` lane without an Azure token. SR2's signed dispatch will still need the `dnceng` onboarding when its release is cut. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> No tracking issue; fixes the hourly failures of the `Prepare signed release publication` workflow ([latest failing run](https://github.com/dotnet/maui/actions/runs/44173043719)). <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…net#40532) <!-- 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). `main` is where `docs/ReleaseBranchWorkflow.md` and the release automation it describes live; dotnet#40297, dotnet#40312 and dotnet#40347 also targeted `main`. For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. ### Description of Change Official nightlies build from the internal mirror of the current candidate lane, `candidate/11.0.1xx-sr2`. Candidate lanes are rebased on GitHub, and fast-forward mirroring can't follow a force push. The internal `candidate/11.0.1xx-sr2` is stuck at `b45b3b4`, a published GitHub tip from 2026-11-18, while GitHub has force-pushed it three times since and is at `7b4e8e5`, so nightlies build stale sources. The internal dnceng `dotnet-mirroring` PR 68907 mirrors the MAUI candidate lanes, and PR 69136 adds an opt-in `followRewrites` list that opts in only those lanes. When the public tip of a listed fast-forward branch no longer descends from the internal tip, the mirror resets the internal branch to the public tip with a leased push. It does this only when the GitHub repository activity shows that the internal tip was once a published tip of the same branch, so no internal-only commit can be dropped. Otherwise it still files the mirroring issue. The `net11` review lane and the `inflight/<band>-srN` staging lanes aren't mirrored, because nightlies build only from the candidate. `docs/ReleaseBranchWorkflow.md` said the mirroring "never force-pushes" and that every public rebase needs a maintainer's leased internal sync. It now requires the `followRewrites` opt-in for the candidate lanes, keeps the manual leased sync only for tips that can't be verified, and states which lanes aren't mirrored. This is a documentation-only change (`git diff --check` is clean). The behavior it describes takes effect once those `dotnet-mirroring` PRs are merged and deployed. ### Issues Fixed None. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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!
Target Branch
mainnet11, for reviewFor .NET 11 fixes, only a maintainer retargets the approved PR to the active
inflight lane and merges it after CI validates that final base. Do not merge
individual fixes directly into
net11; agents must not retarget or merge.This is release infrastructure on
main, following #40297. No servicing branches are modified by this PR.Description of Change
Remove the manual internal-mirror step when the nightly candidate changes or is rebased:
main.eng/release-rollover.json; mirror its pinned public SHA into the existing internaldotnet-mauirepository. Future SR numbers need no workflow edits.mainscripts execute with credentials; candidate content is fetched as Git data. No new PAT is introduced.automation/nightly-mirror/candidate/*ownership ref. New branches and fast-forwards can be adopted; rebases can replace only the last verified automated mirror. Unexpected internal work or ref races fail explicitly.ci.inflightpolicy in the shared release-version helpers while accepting the older inflight-only conditions.Validation performed:
actionlint -oneline .github/workflows/release-publishing.yml— passed.git diff --check— passed.pwsh -NoProfile -File eng/scripts/Sync-ReleasePublishing.ps1 -SyncNightlyMirror -PlanOnly -OutputDirectory <session-artifact-directory>— passed; selectedcandidate/11.0.1xx-sr2at56e48fb536eb6245e392f7182e39522692fb7619.validate-nightlysucceeded, while credentialedmirror-nightlyand releasepreparewere correctly skipped for the PR.df3291c7610d36940be9c640a809824c3d95f842each report 2,671 cases and the same 15 failures. Compared both complete NUnit failure inventories, including multiplicity: no added or removed failure identities.Deployment: the existing federated identity needs Git read/contribute/create-branch and force-push access for the internal candidate and its ownership ref. The local live check used the existing Azure CLI identity; it does not certify the federated identity's Git grants. Automatic production execution starts after this PR lands on
main.The initial official candidate run is https://dev.azure.com/dnceng/internal/_build/results?buildId=3137915 ; its signed publication is tracked separately and is not claimed complete here.
Issues Fixed
N/A — release engineering automation; follow-up to #40297.