Skip to content

[ci] Fix hourly release-publishing failures and classify candidate branches as production - #40347

Merged
kubaflo merged 3 commits into
mainfrom
kubaflo-fix-inflight-feed-candidate-builds
Nov 18, 2026
Merged

kubaflo merged 3 commits into
mainfrom
kubaflo-fix-inflight-feed-candidate-builds

Conversation

@kubaflo

@kubaflo kubaflo commented Nov 17, 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!

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

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.

prepare — Release Git operation 'merge-base' failed. The SR1 receipt is still inventoried even though 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: [release] Make SR1 identical to reviewed release staging #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 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

No tracking issue; fixes the hourly failures of the Prepare signed release publication workflow (latest failing run).

The hourly "Prepare signed release publication" run threw on the SR1 receipt:
11.0.10 is already published, but the reconciler re-verified the old prepared
commits against net11 (force-pushed since) and failed `git merge-base`. A lane
whose stable, non-draft GitHub Release is tagged at the exact live release head
with matching eng/Versions.props is now reported as `published` and skipped
before any signing, dispatch or ancestry re-verification.

The nightly-mirror job also failed every hour with TF400813 because the
federated identity is not onboarded to dnceng. It is now opt-in through the
RELEASE_NIGHTLY_MIRROR_ENABLED repository variable; the dnceng dotnet-mirroring
configuration fast-forwards the candidate instead.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 21:31
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 17, 2026 21:31 — 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 -- 40347

Or

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

@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 17, 2026 21:32 — with GitHub Actions Inactive
@azure-pipelines

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The published-release shortcut can incorrectly mark a superseding receipt as published and skip required servicing PR preparation, and the new path lacks regression coverage.

2 open issues
What changed in this PR

This PR updates MAUI’s release-publication automation to avoid reprocessing published servicing lanes and makes nightly mirroring opt-in until the federated identity has the required access.

Changes:

  • Detect stable GitHub Releases whose tags and version metadata match the live release head, then report those lanes as published.
  • Gate nightly mirroring on RELEASE_NIGHTLY_MIRROR_ENABLED.
  • Document mirroring responsibilities, leased synchronization, publication state, and Azure DevOps access prerequisites.
File Description
eng/​scripts/​Sync-ReleasePublishing.ps1 Adds published-release detection and an early exit for matching lanes.
docs/​ReleaseBranchWorkflow.md Explains publication state, mirroring, and history-rewrite implications.
.github/​workflows/​release-publishing.yml Makes the nightly-mirror job opt-in.
.github/​docs/​trigger-azdo-pipeline-setup.md Documents dnceng access requirements and TF400813 troubleshooting.

Review effort: Balanced

Comment thread eng/scripts/Sync-ReleasePublishing.ps1 Resolved
Comment thread eng/scripts/Sync-ReleasePublishing.ps1 Resolved
Resolve the receipt generation's reviewed servicing source before the
published shortcut, so a superseding candidate generation still gets its
servicing PR prepared. Report a lane as published only when the tagged live
release head has exactly the tree of that generation's reviewed servicing
merge; a tree mismatch returns before any GitHub Release lookup.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 21:55
@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 17, 2026
@kubaflo

kubaflo commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

/rebase

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 publishing sweep can abort on a valid later-SR lane while the canonical-state PR is unmerged because verification uses the current SR bound instead of the verified receipt’s SR.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Use the verified receipt SR when validating published lanes

eng/​scripts/​Sync-ReleasePublishing.ps1:104

Sync-ReleaseNextLanes.ps1 can create receipts for later SRs while the separate canonical-state PR remains unmerged. With currentSr = 2, an otherwise valid published SR3 lane reaches this call, but Get-MauiVerifiedPublishedVersion rejects it and aborts the sweep because SR3 exceeds that bound. Pass the already-verified receipt's $Sr instead; the preceding tag filter already requires that exact SR.

2 resolved since last review

Review effort: Balanced

@kubaflo

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@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 — 1 finding

Reviewed commit c443011.

See inline comments for details.

$entry.status = 'waiting-for-manual-release-cut'
if (!$release.Count) { continue }
if ($release.Count -eq 1) {
$published = Get-PublishedReleaseLane -Sr $sr -LiveCommit $release[0].sha -SourceCommit $commit

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 - No committed test exercises this new terminal branch. ReleasePublishing.Tests.ps1 never supplies release/tag evidence or asserts published, and validate-nightly exits through -SyncNightlyMirror before this sweep. Add a hermetic regression case for the original failure: a stable tag at a tree-identical but non-descendant live head, with rewritten integration history, must skip completion ancestry/Azure work and still process a later receipt. Include annotated-tag peeling and discriminating negatives for a moved release head and a superseding generation with different content or pending servicing review; those must not become published. The existing version-helper tests and reported live checks do not provide repeatable coverage of this control flow.

@MauiBot

This comment has been minimized.

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

kubaflo commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

@dalexsoto stamp

Candidate nightlies (candidate/<band>-srN) now publish to the production
.NET 11.0.1xx SDK channel, but the branch classification policy still
listed only main, release/*, internal/release/*, netN.0 and
inflight/current. Arcade's production-channel validation therefore
reported "Branch 'candidate/11.0.1xx-sr2' is not classified as a
production branch" during promotion of official build 20261117.6
(BAR 341936). It is an audit-only warning today, but enforcement would
block candidate nightly publication.

Add candidate/* to the production ruleset. Arcade matches '<prefix>/*'
patterns by prefix, so every future candidate SR is covered.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 18, 2026 00:01
@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 18, 2026
@kubaflo

kubaflo commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

/rebase

@kubaflo

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

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

External dotnet-mirroring deployment and internal candidate classification are outside this review snapshot, leaving release owners to verify exact-SHA candidate mirroring and signed nightly publishing.

No open issues 🎉

Review effort: Balanced

@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 — 2 findings

Reviewed commit 77ad119.

See inline comments for details.

Previously reported findings were not duplicated.

if ($object.type -cne 'commit' -or $object.sha -cne $LiveCommit) { continue }
$content = Get-MauiReleaseFile -RepositoryPath $RepositoryPath -Commit $LiveCommit -Path 'eng/Versions.props'
$verified = Get-MauiVerifiedPublishedVersion -Release $published -VersionContent $content `
-ReleaseBand $roles.releaseBand -CurrentSr $roles.currentSr -TagCommit $LiveCommit

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 - A valid published receipt can abort the entire sweep while the canonical-state PR remains unmerged. Sync-ReleaseNextLanes.ps1 advances tracking and creates later-SR receipts before separately proposing the currentSr update. With currentSr still 2, a verified SR3 receipt whose reviewed servicing tree matches the live head and stable tag 11.0.30 reaches this call, but Get-MauiVerifiedPublishedVersion throws because SR3 exceeds CurrentSr; later receipts are not processed. Use the already-verified receipt's $Sr as the bound here; the preceding tag filter already requires that exact SR.

@kubaflo kubaflo changed the title [ci] Stop hourly release-publishing failures for published SR lanes [ci] Fix hourly release-publishing failures and classify candidate branches as production Nov 18, 2026

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

@MauiBot

MauiBot commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

PR Test Gate

@kubaflo — existing-test verification for commit 77ad1192.

Result SKIPPED Platform Android Commit 77ad1192


🧪 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: 77ad1192.

Without-fix baseline: 99a7a060.

@kubaflo

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Tests Failure Analysis

@kubaflo — test-failure analysis for commit 77ad119.

Scope CI failures Commit 77ad119


🧪 CI Analysis — click to expand
📊 maui-pr
  • 🟡 Needs human investigation — iOS ARM64 RunOniOS_Previous_BlazorDebug: builds successfully, fails running; inspect simulator output. All five target samples have truncated timelines, not causal evidence.

🧪 maui-pr-devicetests

🧪 maui-pr-uitests

The following target matches reproduce the stated failures in unchanged runtime/test paths:

Target sampling is partial; unmatched does not mean newly introduced.


🧭 Follow-up — actions and refresh

Next action: Inspect simulator/Helix termination and Android hang/upload logs; compare unresolved Mac snapshots against the parent on identical setup.

Maintainers: comment /review tests to refresh this report.

@kubaflo
kubaflo merged commit 331056d into main Nov 18, 2026
170 of 188 checks passed
@kubaflo
kubaflo deleted the kubaflo-fix-inflight-feed-candidate-builds branch November 18, 2026 10:48
@kubaflo kubaflo mentioned this pull request Nov 18, 2026
1 task
kubaflo added a commit that referenced this pull request Nov 23, 2026
)

<!-- 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>
devanathan-vaithiyanathan pushed a commit to devanathan-vaithiyanathan/maui that referenced this pull request Nov 24, 2026
…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>
HarishwaranVijayakumar pushed a commit to HarishwaranVijayakumar/maui that referenced this pull request Nov 24, 2026
…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>
@kubaflo kubaflo added this to the .NET 11 SR2 milestone Nov 24, 2026
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Nov 26, 2026
…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>
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Nov 26, 2026
…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>
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.

4 participants