Skip to content

[release] Clarify PR routing and repair release preparation - #40049

Merged
kubaflo merged 2 commits into
mainfrom
kubaflo-publication-activation-repair
Nov 8, 2026
Merged

kubaflo merged 2 commits into
mainfrom
kubaflo-publication-activation-repair

Conversation

@kubaflo

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

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

Make PR routing discoverable before contributors or agents start work, and repair trusted release preparation after #39913. This coordinated infrastructure/documentation follow-up targets main, where the release tooling is deployed. It contains the publication repair plus the user-directed routing and protected-housekeeping follow-up, in one PR.

Contributor and agent routing

Expose main for new features, API changes and .NET 12 work, including .NET 12 fixes; use literal net11 for initial .NET 11 servicing review. Add visible guidance to README, the contribution guide and PR template, add root AGENTS.md, and correct the contradictory SDK/branch guidance in Copilot instructions. Resolve current roles from eng/release-rollover.json, not the highest retained netN.0 branch or a copied inflight SR number. The selected branch's global.json remains authoritative for its actual SDK.

After .NET 11 review, only a maintainer retargets to the active inflight lane and merges after CI validates that final base. Agents must not retarget or merge PRs; individual fixes do not land directly in net11. Older servicing and coordinated release/infrastructure/documentation changes retain their designated targets.

Protected post-cut housekeeping

Replace the direct protected-net11 ref update with a draft normalization PR from automation/normalization/<band>-srN, containing the pinned next-cycle CI child. Preserve the exact create-once release cut while waiting for human review and required CI. The normalizer requires Create a merge commit, not squash/rebase, so the pinned child remains in the integration ancestry.

While approval is pending, report waiting-for-normalization-approval, keep the current tracking SR, set nextLanesReady=false, and withhold next-lane activation and forward-flow preparation. The trusted same-repository normalization-merge trigger resumes reconciliation; recovery verifies the pinned source/ancestry and refuses duplicate, mismatched or unmanaged PR routes. Reuse the existing post-cut PR helper for legacy servicing and normalization without granting a bypass, changing protections or auto-merging. Update the related release documentation and the existing business fixture for the literal housekeeping base.

Publication startup repair

The first publication run, at 9fb91b464aabc5d77c87b8c02a98aafe4492d045, concluded startup_failure with zero jobs and zero check runs. Its YAML passes actionlint, but the live repository selected-action policy excludes azure/login@7184910d9eb2b1c5e48f7073824a90609bb9b6d6. It was the only excluded action in the deployed workflow. The existing Azure dispatch documentation documents this same pre-job restriction; no credential or signing failure was established by the run.

Remove the blocked action and exchange GitHub OIDC directly inside the trusted dispatcher, following the existing CI-fix dispatch pattern. Reuse AZDO_TRIGGER_CLIENT_ID and AZDO_TRIGGER_TENANT_ID, mask the temporary tokens, and keep them in-process rather than in an Azure CLI cache or workflow output. Authentication remains lazy: an empty sweep or -PlanOnly does not authenticate or queue builds.

Trusted main checkout, exact human-approved source and internal-mirror checks, create-once dispatch intents, pushPackages=false, and public approval gates are unchanged. The related release documentation now distinguishes workflow activation from federation and signing acceptance.

Validation

  • actionlint -oneline .github/workflows/release-tracking-prs.yml .github/workflows/release-publishing.yml -- passed.
  • git diff --check HEAD~2 HEAD -- passed.
  • Combined existing NextLanes and Publishing business tests using the command below -- 25/25 passed, with no skipped or unrun tests. No pipeline/YAML tests were added.
  • PowerShell AST parsing of both dispatchers, MauiReleaseConfiguration.psm1 and both business fixtures -- passed.
  • Comparing the exact deployed and repaired YAML against the live selected-action policy -- the baseline excludes only azure/login; the repair has no excluded actions.
  • Running Sync-ReleasePublishing.ps1 with -PlanOnly and a local session-artifact output directory -- passed, returning releases=[] and publicPublicationRequested=false.
pwsh -NoProfile -Command 'Import-Module Pester -RequiredVersion 5.9.0; $configuration=New-PesterConfiguration; $configuration.Run.Path=@(".github/scripts/ReleaseNextLanes.Tests.ps1", ".github/scripts/ReleasePublishing.Tests.ps1"); $configuration.Run.Exit=$true; $configuration.TestResult.Enabled=$false; $configuration.Output.Verbosity="Detailed"; Invoke-Pester -Configuration $configuration'

Hosted CI is not fully green

The current-head Pester run reports 2,669 passed and two failed. Both release business fixtures pass there. The failures are the existing Catalyst screenshot-cropping source/patch checks; both reproduce when running those unchanged fixtures against files archived from exact main baseline 9fb91b464aabc5d77c87b8c02a98aafe4492d045. This PR changes neither that test, the harness nor its patch.

The current-head spellcheck run reports the same seven unknown words in three unchanged documents as the exact-main baseline run. No unrelated spelling or harness changes are included. Other required CI remains separate from the local validation and release-deployment gates.

External prerequisites are not certified by this fix

Read-only inspection confirmed both secret names and the default GitHub OIDC subject settings. The actual federation record and the secret-bound identity's internal membership, mirror-read access and queue permissions remain unverified; secret values were not read. A successful public validator that skipped dispatch is not authentication evidence.

Existing internal signing definition1095 and canonical preparation definition1445 match the expected MAUI mirror and YAML paths. Internal main was at public commit 1c4f8b1f68c4a85699be7ce7324725faa451e3f6; its pinned publisher YAML matches the reviewed source and retains no-push and approval gates. Neither the public nor internal SR1 release ref, nor a production release-lane receipt, existed during inspection, so there is no approved cut whose exact mirroring can yet be certified.

Hosted activation remains pending integration. No production release workflow was dispatched because it could mutate release refs or queue signed work. Validation did not synchronize mirrors, change protections or canonical release state, cut release refs, queue signed/preparation builds, or publish/promote packages. The expanded PR includes the protected-housekeeping correction, but executing its production route remains an owner-controlled deployment/acceptance gate.

Issues Fixed

N/A -- coordinated contributor-routing and release-infrastructure follow-up, including the evidenced workflow startup failure linked above.

Relates to #39913.

Remove the policy-blocked azure/login action and exchange the existing GitHub federation token inside the trusted dispatcher only when an approved release requires Azure access. Preserve exact-source signing, no-push preparation and all public approval gates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 8, 2026 11:17
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 8, 2026 11:17 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Nov 8, 2026

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 -- 40049

Or

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

@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 new authentication exchange and failure guards lack isolated test coverage because existing release tests mock Get-ReleaseAzureHeaders, leaving token exchange, masking, and invalid-input handling unverified.

1 open issue
What changed in this PR

Repairs release-publication workflow activation by replacing the policy-blocked azure/login action with a direct, in-process GitHub OIDC exchange. Existing release-source checks and publication approval gates remain unchanged.

Changes:

  • Moves authentication into the dispatcher, masking temporary tokens without using an Azure CLI cache.
  • Passes the existing identity secrets directly to the dispatcher step.
  • Documents lazy authentication and distinguishes workflow activation from federation and signing acceptance.
File Description
eng/​scripts/​Sync-ReleasePublishing.ps1 Replaces CLI token retrieval with direct OIDC federation and token-response validation.
docs/​ReleaseProcess.md Documents authentication timing and token handling.
docs/​ReleaseBranchWorkflow.md Clarifies activation, federation, and internal-access prerequisites.
.github/​workflows/​release-publishing.yml Removes azure/login and supplies identity secrets to the dispatcher.

Review effort: Balanced

Comment on lines +80 to +81
$oidcResponse = Invoke-RestMethod -Method Get -Uri "$requestUrl&audience=api://AzureADTokenExchange" `
-Headers @{ Authorization = "Bearer $requestToken" } -TimeoutSec 60
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 8, 2026 11:24 — with GitHub Actions Inactive
@kubaflo

kubaflo commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

@dalexsoto stamp

Expose main/.NET12 and net11/.NET11 review targets to contributors and agents. Prepare reviewed post-cut CI normalization instead of directly updating the protected integration ref, and resume next lanes only after verified ancestry.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
dalexsoto
dalexsoto previously approved these changes Nov 8, 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.

Copilot AI balanced review requested due to automatic review settings November 8, 2026 12:38
@kubaflo kubaflo changed the title [release] Repair publication activation with direct OIDC [release] Clarify PR routing and repair release preparation Nov 8, 2026

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

Normalization can bypass PR verification and the required human-managed merge, while other dispatcher entrypoints can initiate forward flow before normalization approval.

3 open issues

Review effort: Balanced

Comment on lines +367 to +368
$normalizationPr = Sync-PostCutNormalizationPr -Branch $roles.fixBranch -Plan $plan -Sr $trackingSr
$housekeepingPending = $normalizationPr.status -cne 'merged'
Assert-ConsumedInflightSource -Sr $cycle.integratedSr -Commit $cycle.inflightSourceSha
}
$forward = if ($CompleteRelease -and $results.Count) {
$forward = if ($CompleteRelease -and $results.Count -and !$housekeepingPending) {
@kubaflo

This comment has been minimized.

@kubaflo

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

1 similar comment
@azure-pipelines

This comment has been minimized.

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

MauiBot commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

PR Test Gate

@kubaflo — existing-test verification for commit 2dd2293f.

Result SKIPPED Platform Android Commit 2dd2293f


🧪 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: 2dd2293f.

Without-fix baseline: 9fb91b46.

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Expert Review — 3 findings

Reviewed commit 2dd2293.

See inline comments for details.

$null = Invoke-NextLaneApi @(
"repos/$repository/git/refs/heads/$([Uri]::EscapeDataString($roles.fixBranch))", '--method', 'PATCH',
'-f', "sha=$($completion.normalizationSha)", '-F', 'force=false')
$normalizationPr = Sync-PostCutNormalizationPr -Branch $roles.fixBranch -Plan $plan -Sr $trackingSr

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[major] Logic and Correctness Verification - The normalization PR verifier is skipped after normalization lands. Get-MauiReleaseCompletionPlan returns restoreFixes=false whenever the integration tip contains normalizedSha, bypassing this only call to Sync-PostCutNormalizationPr. For example, merging an edited normalization head descending from the pinned child activates replacement lanes and forward flow without checking the exact prepared head or required two-parent maintainer merge. Direct installation of the child is also accepted. Verify the managed normalization merge independently of restoreFixes and require its verified merge commit in integration ancestry, with explicit handling for legacy direct-update receipts. Add a discriminating resume test for the exact reviewed merge versus an edited head or directly installed child; the current fixture mocks restoreFixes=true.

Assert-ConsumedInflightSource -Sr $cycle.integratedSr -Commit $cycle.inflightSourceSha
}
$forward = if ($CompleteRelease -and $results.Count) {
$forward = if ($CompleteRelease -and $results.Count -and !$housekeepingPending) {

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 - This pause suppresses only the coordinator's forward-flow call. forward-servicing-fixes.yml independently invokes Sync-ServicingForwardPullRequest.ps1 on net11 pushes, daily schedules and manual dispatches. Once main targets a later major, the candidate cut awaiting normalization already has ci.main/non-stable metadata and passes that dispatcher's housekeeping gate, allowing a forward PR to be created or advanced before normalization approval. Enforce the pending-normalization gate in the shared dispatcher so every entrypoint observes the pause. Add a discriminating test with pending normalization and otherwise eligible CI metadata, plus an approved-resume counterpart; existing forward tests cover only label/stability mismatches.

# Exchange in-process: the organization blocks azure/login, and tokens must
# not be persisted in CLI caches, workflow outputs, artifacts, or child builds.
$oidcResponse = Invoke-RestMethod -Method Get -Uri "$requestUrl&audience=api://AzureADTokenExchange" `
-Headers @{ Authorization = "Bearer $requestToken" } -TimeoutSec 60

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 - Every existing publication business test mocks Get-ReleaseAzureHeaders, leaving the replacement OIDC exchange and its new failure guards untested. An incorrect audience/assertion/scope or acceptance of an empty token response would not fail those tests, despite authentication being the repaired publication entrypoint. Add isolated Pester tests with mocked HTTP calls checking exchange fields, one returned headers object, masking of both synthetic tokens, and rejection of missing environment values and null/missing/blank token responses. These tests require neither live federation nor build dispatch.

@kubaflo

kubaflo commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

@dalexsoto stamp

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

@kubaflo
kubaflo merged commit caa0747 into main Nov 8, 2026
168 of 179 checks passed
@kubaflo
kubaflo deleted the kubaflo-publication-activation-repair branch November 8, 2026 15:40
kubaflo added a commit that referenced this pull request Nov 8, 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).

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

<!-- Enter description of the fix in this section -->

**User-directed policy: tags remain manual.** Maintainers create tags
when releasing. Configured servicing progress does not create, move,
require, infer shipping from, retire on, or advance because of tags. The
automatic-tag proposal was withdrawn before publication and is not
included. `main` is the designated trusted source of this
release/reporting infrastructure.

**Changes:**

- Discover the configured current servicing cycle and preceding cut from
canonical state and release/candidate branch snapshots, without
consulting the tag catalog. Do not advertise a tag-based shipped
watermark. Historical/unconfigured and Preview/RC tag diagnostics remain
separate.
- SR1 inventories against the first GA branch `release/11.0.1xx`; later
SRs use the preceding `release/<band>-srN`. Validate the source
major/patch range and pin content and baseline to full SHAs. Missing,
newly created or unrelated/moved tags cannot replace these bounds or
hide progress.
- A genuinely missing preceding branch produces an incomplete **UNKNOWN
/ NOT RUN** inventory diagnostic, not a missing-tag blocker or zero
findings. Invalid explicit revisions and wrong versions still fail.
Remove stale inventory exports when no inventory ran.
- Honor human tracker closure for each exact source/baseline snapshot
using existing create-once/race-compensation machinery. New snapshots
can produce new generations, but tags cannot mark them shipped or reopen
them. Include snapshot identity in the semantic hash to preserve
idempotent reporting.
- Ignore automatic stable tag-push milestone processing for the
configured train. Preserve explicit manual tag diagnostics and
historical/Preview/RC behavior separately.
- Keep inventory execution refs pinned while preserving readable branch
coordinates in handoffs. Update related documentation. No tag-automation
credentials, workflow permissions, cut-tag configuration or YAML
snapshot tests are added.

**Strict merge failure is preserved:** #40040 remains the rejected
squash at `net11` `c175df854f99aba8f12a60536c019b06377fea0d`. The exact
two-parent candidate-integration guard is unchanged. This PR does not
reset `net11`, recover that merge, create replacement SR PRs, cut a
release, create/move/delete tags, rotate live lanes or publish packages.

**Retained earlier request:** the canonical-state helper prepares a
draft PR advancing only `currentSr` after verified cut, reviewed
normalization and both replacement lanes. It preserves `nightlyMode`,
never directly writes protected branches or auto-merges, and retains the
owner-reviewed signed-nightly deployment gate. No canonical state is
changed by this PR.

**Validation:**

- `pwsh -NoProfile -File
.github/skills/release-readiness/tests/Test-ReleaseBranchRoles.ps1` —
109 passed, 0 failed. Real-Git fixtures cover missing/unrelated/manual
tags, pinned branch inventories, rotation, invalid source versions and
historical behavior.
- `pwsh -NoProfile -File
.github/skills/release-readiness/tests/Test-ReleaseReadiness.ps1
-SkipE2E` — 2,358 passed, 0 failed.
- `pwsh -NoProfile -File
.github/skills/release-readiness/tests/Test-ReleaseHandoff.ps1` — 94
passed, 0 failed.
- Existing ReleaseNextLanes, ReleasePublishing and Fix-MilestoneDrift
suites using CI-pinned Pester 5.9.0 — 250 passed, 0 failed. The
installed Pester 6 legacy operator-registration errors were avoided by
using the repository's existing CI version, not by changing unrelated
tests.
- Exact pushed head `8bd14f7e009445c4dca495e2dfc2f6f3e6d6c9ed` was
live-verified against GitHub. At post-push verification, remote tag
`11.0.0` was absent: the report still used candidate `4c3fdf39` and
GA-branch snapshot `4e6582f7`, with **409 reported commits matching the
raw Git range exactly**. No tag was recreated and no protected branch
changed.
- Local snapshot-lifecycle rehearsal honors an exact human-closed
generation with no API writes or tag queries. Configured `11.0.0`
tag-push handling is a logged no-op. The actual #40040 source remains
rejected before release writes.
- PowerShell/Bash syntax, actionlint, `git diff --check`, and cSpell on
both changed `docs/` files — passed.

**Hosted checks at this head:** [Release Readiness
validation](https://github.com/dotnet/maui/actions/runs/42520765649)
succeeded, including unit tests, tracker discovery and actual
`net11-sr1` smoke-report generation. Pester reports 2,669 passed / two
unchanged Catalyst Retina failures; those inputs were independently
reproduced on exact base `caa07471` earlier in this investigation.
Documentation reports the same seven spelling findings in three
byte-identical base files; the changed docs pass. No whole-CI-green,
native/signed-build or public-publication certification is claimed.

Maintainer review and merge remain separate. A successful progress
report is not shipping certification.

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

Relates to #39988 and #40040; follows #40049. Does not close adoption or
unblock the deliberately rejected candidate integration.

<!--
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>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Copilot-Session: 15d039f6-e8d8-44a3-be20-cf81720619c7
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