Skip to content

[release] Decouple servicing progress from manual tags - #40057

Merged
kubaflo merged 45 commits into
mainfrom
kubaflo-release-branch-workflow
Nov 8, 2026
Merged

kubaflo merged 45 commits into
mainfrom
kubaflo-release-branch-workflow

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

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 [Release candidate] 11.0.1xx SR1 #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 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

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

kubaflo and others added 30 commits November 5, 2026 10:45
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
…e lanes

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Create deterministic servicing and CI version commits, integrate normalized fixes into next-lane ancestry, and preserve the exact approved release cut. Prepare both bug-template dropdowns only from verified stable publication; production metadata writes remain disabled.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 15d039f6-e8d8-44a3-be20-cf81720619c7
Cherry-picked-from: cb2160f
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Fetch the housekeeping activation tip as well as its original merge before next-lane integration. Reproduce the old shallow-root failure with an isolated clone and verify the fixed retry returns the same commit. Preserve full history when preparation runs in a local full checkout.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 15d039f6-e8d8-44a3-be20-cf81720619c7
Cherry-picked-from: 95c9538
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Validate IsServicingBuild and final-version wiring, empirically export and apply post-publication metadata bundles, and restrict bounded preparation fetches to GitHub Actions. Record successful hosted servicing cycles and both no-op retry paths without claiming production shipment.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 15d039f6-e8d8-44a3-be20-cf81720619c7
Cherry-picked-from: 8be7151
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
…tion

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Keep release cuts, integration-branch housekeeping, publishing and canonical nightly state separate. Persist create-once lane receipts before publishing branches or PRs so scheduled and manual retries resume the same approved integration.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
Withdraw the squash-integration recovery as requested. Missing automatic GA/prior stable tags now produce an explicit blocked, incomplete readiness diagnostic instead of terminating reporting. Do not run or report contents/regression inventories without a verified baseline, and remove stale inventory exports. Invalid explicit revisions remain fatal; no release state or protected ref is changed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
@kubaflo kubaflo changed the title [release] Recover candidate merges and propose canonical SR advancement [release] Report missing readiness baselines and propose canonical SR advancement Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Skill Validation Results

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

Overall Passed Static Passed LLM Skipped Skills 28 Agents 7

✅ Skill Validation Results — 8bd14f7 · [release] Decouple servicing progress from manual tags · 2026-11-08T20:35:26Z

✅ Static Checks Passed

Skills: 28 | Eval specs linted: 17

Full lint output
── .github/skills/agentic-labeler/tests/eval.vally.yaml
npm warn deprecated @opentelemetry/sdk-trace-node@2.12.0: Use @opentelemetry/sdk-trace package
npm warn deprecated @opentelemetry/sdk-trace-base@2.12.0: Use @opentelemetry/sdk-trace package
Vally collects pseudonymous usage telemetry (command name, version, outcome, duration, persistent device identifier (when available), and coarse OS/runtime info) to improve the product. No prompts, datasets, file paths, or arguments are collected.
Opt out any time by setting VALLY_TELEMETRY_OPTOUT=1 or DO_NOT_TRACK=1.
Learn more: https://aka.ms/vally/telemetry
✔ .github/skills/agentic-labeler/tests/eval.vally.yaml is valid
── .github/skills/analyze-sessions/tests/eval.vally.yaml
✔ .github/skills/analyze-sessions/tests/eval.vally.yaml is valid
── .github/skills/ci-fix/tests/eval.ownership.vally.yaml
✔ .github/skills/ci-fix/tests/eval.ownership.vally.yaml is valid
── .github/skills/ci-fix/tests/eval.vally.yaml
✔ .github/skills/ci-fix/tests/eval.vally.yaml is valid
── .github/skills/code-review/tests/eval.inline-findings.vally.yaml
✔ .github/skills/code-review/tests/eval.inline-findings.vally.yaml is valid
── .github/skills/code-review/tests/eval.producer-trace.vally.yaml
✔ .github/skills/code-review/tests/eval.producer-trace.vally.yaml is valid
── .github/skills/code-review/tests/eval.trim-aot.vally.yaml
✔ .github/skills/code-review/tests/eval.trim-aot.vally.yaml is valid
── .github/skills/code-review/tests/eval.vally.yaml
✔ .github/skills/code-review/tests/eval.vally.yaml is valid
── .github/skills/code-review/tests/hermeticity.vally.yaml
✔ .github/skills/code-review/tests/hermeticity.vally.yaml is valid
── .github/skills/code-review/tests/soak.capability.vally.yaml
✔ .github/skills/code-review/tests/soak.capability.vally.yaml is valid
── .github/skills/evaluate-pr-tests/tests/eval.vally.yaml
✔ .github/skills/evaluate-pr-tests/tests/eval.vally.yaml is valid
── .github/skills/pr-review/tests/eval.gh-auth.vally.yaml
✔ .github/skills/pr-review/tests/eval.gh-auth.vally.yaml is valid
── .github/skills/review-test-failures/tests/eval.vally.yaml
✔ .github/skills/review-test-failures/tests/eval.vally.yaml is valid
── .github/skills/try-fix/tests/eval.restore.vally.yaml
✔ .github/skills/try-fix/tests/eval.restore.vally.yaml is valid
── .github/skills/try-fix/tests/eval.vally.yaml
✔ .github/skills/try-fix/tests/eval.vally.yaml is valid
── .github/skills/verify-tests-fail-without-fix/tests/eval.protocol.vally.yaml
✔ .github/skills/verify-tests-fail-without-fix/tests/eval.protocol.vally.yaml is valid
── .github/skills/verify-tests-fail-without-fix/tests/eval.vally.yaml
✔ .github/skills/verify-tests-fail-without-fix/tests/eval.vally.yaml is valid

⏭️ LLM Evaluation: Skipped

No changed skills with eval specs found.

🔍 Full results and investigation steps

@kubaflo

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
@azure-pipelines

This comment has been minimized.

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

Reviewed commit a511025.

See inline comments for details.

if ($existing) {
Fetch-NextLaneCommit @($existing)
$parents = (Get-NextLaneGit @('show', '-s', '--format=%P', $existing)).Split(' ')
if ($parents.Count -ne 1 -or

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[moderate] Regression Prevention and Test Coverage - The new existing-proposal guard has no discriminating regression coverage. .github/scripts/ReleaseNextLanes.Tests.ps1 loads the functions but executes only the coordinator loop and source-check foreach, never Sync-CanonicalReleaseStatePr; the hosted trial also excludes this helper through SandboxPrefix. Neither rejection of a proposal changing an additional file nor acceptance of the identical currentSr-only proposal after an unrelated feature-branch commit is exercised. Add offline helper fixtures for both cases, asserting that the valid retry reuses its SHA and the mismatched proposal causes no publication or overwrite.

Use pinned GA/prior release branch snapshots and canonical cycle state for configured servicing progress. Tags remain manual: no tag creation, requirement, shipped-state inference or tag-push milestone processing. Honor manual tracker closure per source/baseline snapshot, retain historical tag diagnostics and strict candidate merge approval, and keep inventory execution pinned while preserving human-readable handoff coordinates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ad2e0a-35c0-4eaf-b76d-b4f9608b71ec
@kubaflo kubaflo changed the title [release] Report missing readiness baselines and propose canonical SR advancement [release] Decouple servicing progress from manual tags Nov 8, 2026
@kubaflo
kubaflo marked this pull request as ready for review November 8, 2026 20:40
Copilot AI balanced review requested due to automatic review settings November 8, 2026 20:40
@kubaflo

kubaflo commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

@dalexsoto stamp

@kubaflo

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

Configured-major detection skips retained Preview/RC branches, while missing tag refreshes and branch pruning can produce incorrect release status, historical reports, and baseline inventories.

4 open issues
What changed in this PR

This PR moves configured .NET MAUI servicing progress from tag-based detection to canonical cycle state and pinned branch snapshots. Tags remain manual release metadata, separate from progress reporting and release approval.

Changes:

  • Use GA/prior-SR branch baselines, report missing inventories as UNKNOWN / NOT RUN, and scope tracker closure to exact snapshots.
  • Prepare a reviewed draft PR advancing currentSr after verified rollover while preserving nightlyMode.
  • Ignore configured stable tag-push milestone processing and update documentation and regression fixtures.
File Description
eng/​scripts/​Sync-ReleaseNextLanes.ps1 Prepares draft canonical-state updates after verified rollover.
eng/​scripts/​MauiReleaseConfiguration.psm1 Allows reading canonical state from pinned commits.
docs/​ReleaseProcess.md Documents manual tags and reviewed state advancement.
docs/​ReleaseBranchWorkflow.md Explains snapshot reporting and state-PR deployment gates.
.github/​workflows/​fix-milestone-drift.yml Identifies automatic tag-push invocations.
.github/​skills/​release-readiness/​tests/​Test-ReleaseBranchRoles.ps1 Adds branch-baseline and tag-independent reporting fixtures.
.github/​skills/​release-readiness/​SKILL.md Updates servicing reporting guidance.
.github/​skills/​release-readiness/​scripts/​Update-TrackerIssue.sh Uses snapshot markers for tracker generations.
.github/​skills/​release-readiness/​scripts/​New-ReleaseHandoff.ps1 Preserves readable branch coordinates in handoffs.
.github/​skills/​release-readiness/​scripts/​Get-ReleaseReadiness.ps1 Pins inventory bounds and reports unavailable baselines explicitly.
.github/​skills/​release-readiness/​scripts/​Find-ReleaseReadinessTrackers.ps1 Adds configured current/prior-cycle branch discovery.
.github/​skills/​release-readiness/​references/​methodology.md Documents branch-bound inventory semantics.
.github/​scripts/​Fix-MilestoneDrift.ps1 Skips configured stable tag-push processing.
.github/​docs/​maui-ci-facts.md Records state-advancement and manual-tag behavior.

Review effort: Balanced

Comment on lines +955 to +956
if ($roles.configured) {
return Get-ConfiguredServicingProgress -Roles $roles -Major $Major
Write-Host "Fetching origin (branches + tags)..." -ForegroundColor Cyan
Invoke-GitOrFail @('fetch', 'origin', '--tags', '--prune', '--quiet') `
Write-Host "Fetching origin branch snapshots..." -ForegroundColor Cyan
Invoke-GitOrFail @('fetch', 'origin', '--no-tags', '--prune', '--quiet') `
if (-not $NoFetch) {
Write-Host "Fetching latest refs..." -ForegroundColor Cyan
& git fetch --all --quiet 2>$null | Out-Null
& git fetch --all --no-tags --quiet 2>$null | Out-Null
if (-not $NoFetch) {
Write-Host "Fetching latest refs..." -ForegroundColor Cyan
& git fetch --all --quiet 2>$null | Out-Null
& git fetch --all --no-tags --quiet 2>$null | Out-Null
@MauiBot

MauiBot commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

PR Test Gate

@kubaflo — existing-test verification for commit 8bd14f7e.

Result SKIPPED Platform Android Commit 8bd14f7e


🧪 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: 8bd14f7e.

Without-fix baseline: caa07471.

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

Reviewed commit 8bd14f7.

See inline comments for details.

$roles = Resolve-ReadinessBranchRoles -Major $Major -RepositoryPath $Repo
$mainBranchForMajor = $roles.sourceBranch
if ($roles.configured) {
return Get-ConfiguredServicingProgress -Roles $roles -Major $Major

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 - This configured-major early return bypasses the retained Preview/RC lanes entirely. With releaseBand=11.0.1xx and an existing release/11.0.1xx-rc1 or Preview branch lacking its matching prerelease tag, the previous lanes emit an in-flight prerelease tracker, but Get-ConfiguredServicingProgress emits only SR trackers. The workflow therefore never generates or refreshes that prerelease report. The added fixture tags every retained prerelease branch, so its zero-trackers assertion cannot distinguish tag retirement from unconditional omission. Keep the configured SR replacement separate from Preview/RC discovery.

Write-Host "Fetching origin (branches + tags)..." -ForegroundColor Cyan
Invoke-GitOrFail @('fetch', 'origin', '--tags', '--prune', '--quiet') `
Write-Host "Fetching origin branch snapshots..." -ForegroundColor Cyan
Invoke-GitOrFail @('fetch', 'origin', '--no-tags', '--prune', '--quiet') `

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 - Disabling tag fetching globally also changes historical/unconfigured and Preview/RC discovery, which still reads the local tag catalog through Get-StableTagsForMajor, Get-PreviewTagsForMajor and Get-RcTagsForMajor. If a historical SR or next-major prerelease tag is published after a checkout's last tag fetch, a normal detector invocation no longer imports it and keeps the shipped lane in flight or computes a stale shipped watermark. Previously --tags refreshed this evidence. The new fixture creates tags locally and uses -NoFetch, so it does not exercise remote tag freshness. Refresh tags for the retained tag-dependent lanes without making configured servicing depend on them.

}
if ($tagIndependent -and !$Candidate) {
$priorSrRef = $BaselineRef
$effectiveExcludes = @($BaselineRef | Where-Object { $_ })

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 - Configured non-candidate reports overwrite an explicitly supplied -ExcludeBranches list with the automatic preceding-release baseline. An SR1 diagnostic using -ExcludeBranches origin/custom-bound now includes commits reachable from custom-bound that the caller asked to exclude: Get-SrCommits consumes only the overwritten ctx.excludeBranches. An explicitly nonexistent exclude is likewise discarded before the existing missing-ref validation instead of failing as documented. Apply the automatic bound only when the caller omitted the exclusion override.

$targetSrBranch -cmatch "^release/$([regex]::Escape($roles.releaseBand))-sr[1-9][0-9]*$"
if ($tagIndependent -and !$Candidate -and $Shipped) {
Write-Warn 'Configured servicing progress uses branch snapshots, not tag-derived shipped state. Tags remain a manual release action.'
$Shipped = $false

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] Backward Compatibility and Migration - Clearing -Shipped here leaves the workflow caller's mode and public issue title unchanged. When a configured in-flight SR's expected manual tag exists, release-readiness.yml sets MODE=shipped and ISSUE_TITLE to 'shipped' before calling this script. The report becomes in-flight with a snapshot marker, but the workflow's subsequent title reconciliation handles only hotfix/shipped markers, not snapshots. It passes the stale shipped title to Update-TrackerIssue.sh, which creates or edits the public tracker with that title. Reconcile the caller from the snapshot lifecycle as well, so a manual tag cannot claim the configured release shipped.

if ($existing) {
Fetch-NextLaneCommit @($existing)
$parents = (Get-NextLaneGit @('show', '-s', '--format=%P', $existing)).Split(' ')
if ($parents.Count -ne 1 -or

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[moderate] Regression Prevention and Test Coverage - The existing-proposal guard has no discriminating regression coverage. ReleaseNextLanes.Tests.ps1 loads the helper but executes the coordinator loop and source-check foreach, never Sync-CanonicalReleaseStatePr. Neither rejection of an existing proposal changing an additional file nor acceptance of the identical currentSr-only proposal after an unrelated feature-branch commit is exercised. Add offline helper fixtures for both cases, asserting that the valid retry reuses its SHA and the mismatched proposal causes no publication or overwrite.

# to this script's caller (unlike dot-sourcing), which is why the conditional
# StrictMode dance above is still needed for Pester compatibility.
Import-Module (Join-Path $PSScriptRoot 'shared/MauiReleaseVersioning.psm1') -Force
if ($TagPushEvent -and $Tag -cmatch '^(?<major>[1-9][0-9]*)\.0\.[0-9]+$') {

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 the new TagPushEvent guard. Fix-MilestoneDrift.Tests.ps1 dot-sources without this switch, while MilestoneTrigger.Tests.ps1 checks tag globs and the Bash shape regex, not this state-dependent return. With releaseBand=11.0.1xx, automatic 11.0.10 processing must perform no milestone edits or issue closures, whereas the identical manual tag invocation without TagPushEvent and historical/Preview/RC pushes must still reach analysis. Add offline entrypoint fixtures distinguishing these cases; the existing tests cannot detect premature configured issue closure or suppression of the retained manual/historical paths.

# scheduled updater run). Search the exact generated marker directly so
# the result is not diluted by a generic-marker --limit window.
if [ "$MODE" = "shipped" ]; then
if [ "$MODE" = "shipped" ] || [ -n "$SNAPSHOT_MARKER" ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[moderate] Regression Prevention and Test Coverage - The new snapshot-based lifecycle branch is not exercised by the committed tests. Test-ReleaseBranchRoles.ps1 asserts only that Markdown contains a snapshot marker; the updater execution probe in Test-ReleaseReadiness.ps1 uses a markerless Preview candidate with no activity, and its lifecycle-helper probe uses a shipped marker. Add mocked updater fixtures in candidate/in-flight mode proving that an exact human-closed source/baseline snapshot is not recreated, but a different snapshot is not suppressed by that old closure, including with zero recent commits. These cases distinguish the new branch from the old shipped-only gate and protect the manual-closure behavior being fixed.

@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 a509fca into main Nov 8, 2026
183 of 194 checks passed
@kubaflo
kubaflo deleted the kubaflo-release-branch-workflow branch November 8, 2026 23:35
kubaflo added a commit that referenced this pull request Nov 9, 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 -->

Prerequisite found while preparing the user-requested SR1/SR2 replay
after #40057 merged. This is a small trusted release-infrastructure
correction, **not** either release integration PR and **not** permission
to reset protected refs.

**Root cause:** `Get-ApprovedCandidateMerge` counts every historical
prepared managed PR for the same candidate route, even when an
explicitly authorized reset removes its merge from live `net11` history.
With #40040 retained as historical evidence, resetting the branch still
selects that old integration; a subsequent proper two-parent integration
then fails the duplicate-cycle guard. The deployed source at `a509fca2`
reproduced both failures in a real-Git, no-write rehearsal.

**Fix:** pin and fetch the live integration tip, fetch each candidate's
head/merge SHAs, and count only unrecorded integrations that are
ancestors of that tip. Log excluded historical integrations explicitly.
Treat Git verification errors and a missing integration branch as hard
failures. Update the workflow documentation.

**Unchanged safety rules:**
- A squash merge still in live history remains discoverable and rejected
by the exact two-parent candidate guard. #40040 is not accepted or
rewritten.
- Two prepared candidate integrations both present in live history still
fail as ambiguous.
- Recorded receipt proofs are not silently filtered; their existing
validation and ancestry checks remain.
- Tags remain manual and independent of configured progress. No release
refs, tags, receipts, canonical state, protection rules, internal
mirror, or publication approvals are changed by this PR.

**Validation:**
- `pwsh -NoProfile -Command 'Import-Module Pester -RequiredVersion
5.9.0; $r = Invoke-Pester -Path
.github/scripts/ReleaseNextLanes.Tests.ps1,.github/scripts/ReleasePublishing.Tests.ps1
-PassThru -Output Minimal; if ($r.FailedCount -gt 0) { exit 1 }'` — **25
passed, 0 failed**.
- Local real-Git rehearsal using the deployed and patched discovery
functions — **10 passed scenarios**, including deployed failure, fresh
exact merge after reset, unchanged live-squash rejection, live duplicate
rejection, preserved receipt proof, missing-branch refusal, and
deterministic next-lane replay. External API writes were prohibited by
the rehearsal adapter.
- Prepared replay retains the exact original candidate/inflight metadata
bytes and all lane ancestry, with current `main` as an ancestor. Five
actual workload-project MSBuild evaluations passed: net11/candidate
patch10 CI, inflight patch20 CI, stable SR1 release context, and
explicit non-stable override. These refs were prepared locally only.
- PowerShell syntax and `git diff --check` — passed. No new
pipeline/YAML tests or workflow permission changes were added.
Native/signed-build acceptance and a real release replay have **not**
run.

**Replay remains gated:** protected `net11` is still at rejected squash
`c175df85`. The one-time exact-ref reset/publication exception was not
approved while the user was unavailable, so no protected ref or rule was
changed. Merge this correction through normal human review before
testing a fresh candidate integration. The reset and SR1/SR2 tracking PR
creation remain separate pending actions.

### 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 #40057. Does not close the release
adoption issue or certify a successful production cut.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

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