Skip to content

[release-readiness] Fix next-cycle milestone after preview7 (rc1, not preview8) - #36803

Merged
PureWeen merged 10 commits into
mainfrom
fix/release-readiness-preview-to-rc
Jul 27, 2026
Merged

PureWeen merged 10 commits into
mainfrom
fix/release-readiness-preview-to-rc

Conversation

@kubaflo

@kubaflo kubaflo commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

The release-readiness skill's Get-MilestoneHygieneChecks derived the roll-forward milestone for a preview cycle by naively incrementing the preview number:

$expectedTitlesNext = @(".NET $major.0-preview$($cycleNum + 1)")

So surveying preview7 told the release captain to create a .NET <major>.0-preview8 milestone. .NET does not ship a preview8. The pre-release train is:

preview1 → preview2 → … → preview7 → rc1 → rc2 → GA

This surfaced during an ad-hoc SR-lane run against the net11 preview7 branch — Get-ReleaseReadiness.ps1 -SrBranch release/11.0.1xx-preview7 — where the report recommended creating .NET 11.0-preview8. The automated preview lane (Get-PreviewReadiness.ps1 → Test-PreviewMilestoneExists) never had this bug: it validates only the current preview's own milestone and never derives a next-cycle title. This fix therefore hardens the SR lane's defensive preview-handling — see the reachability note in SKILL.md — rather than changing automated preview-lane behavior.

Evidence (from this repo)

Major Last preview Then
.NET 9 9.0.0-preview.7.24407.4 9.0.0-rc.1.24453.9 → 9.0.0-rc.2.24503.2
.NET 10 10.0.0-preview.7.25406.3 10.0.0-rc.1.25424.2 → 10.0.0-rc.2.25504.7

Matching milestones: .NET 10.0-preview7 (due 2025-08-01) → .NET 10.0-rc1 (due 2025-08-21) → .NET 10.0-rc2. No preview8 milestone exists in any major since .NET 6.

There was also a second, worse instance of the same bug: in candidate mode the ordinal is incremented before deriving the current title too, so a candidate off preview7 reported its own current cycle as preview8 — a milestone that can never exist, which would render as a permanent spurious BLOCKED row.

Changes

.github/skills/release-readiness/scripts/Get-ReleaseReadiness.ps1

  • Add Get-PreviewTrainMilestoneTitle — a pure ordinal → milestone-title mapper (1..7 → previews, 8 → rc1, 9 → rc2, 10+ → $null). $script:FinalPreviewNumber is the single constant to change if the cadence ever moves (.NET 5 shipped 8 previews; 7 has held since .NET 6).
  • Use it for both the current- and next-cycle titles.
  • Skip the next-cycle check entirely after rc2 instead of inventing an rc3.
  • Widen the stale-milestone filter to (preview|rc)\d+ — preview and rc are one continuous pre-release train, so a stale rc1 is the same housekeeping debt as a stale preview6. (Review refinement: the filter now also excludes $expectedTitlesNext, so a slipped-but-upcoming rc1 — the survey's own next-cycle target — isn't mislabeled "already-shipped debt", which had contradicted the "create it" advice from the next-cycle check.)
  • (Review refinement) Get-MilestoneHygieneChecks now emits UNKNOWN — rather than a silent return @() — for a nonsensical sub-1 preview ordinal (e.g. a release/<major>.0.1xx-preview0 branch), preserving the lane's documented "never silently skips" contract. The legitimate past-rc2 case stays a silent skip (GA has no milestone in this naming convention).

.github/skills/release-readiness/SKILL.md

  • New Pre-release train cadence (no preview8) section with the tag/milestone evidence above.
  • Updated the Milestone for next cycle / Stale open milestones ship-check rows.
  • Documented that preview7 is the effective feature/API-lock gate: because no eighth preview exists, work that misses the preview7 cut does not roll into "the next preview" — RC is normally API-locked, so in practice it slips to the next major. Reports on a preview7 branch should treat still-open public-API PRs as a decide-now item.
  • (Review refinement) Added a reachability note clarifying that the preview→rc mapping fires only in the SR lane when driven with a preview-shaped branch; an in-flight survey of a cut release/*-rc1 branch produces no milestone checks at all (rc branch shapes are skipped by the parser).

.github/skills/release-readiness/scripts/Find-ReleaseReadinessTrackers.ps1

(Review refinement — this file was originally reported as needing no change; that was wrong.) Lane 4 does read PreReleaseVersionIteration from the survey ref rather than incrementing, and it does no-op once the label flips from preview to rc. But the no-op is the bug, not the safeguard. The same preview→rc discontinuity this PR fixes for milestone naming applies here: the pre-release train continues into rc1/rc2, so once the survey ref is bumped past the final preview the PreLabel -eq 'preview' guard stops matching for the entire rc window and no rc tracker is ever proposed.

Verified against this repo rather than assumed: release/10.0.1xx-rc1's Versions.props carries rc/1, and rc branches and tags use naming exactly parallel to previews (release/<major>.0.1xx-rc<N>, <major>.0.0-rc.<N>.<build>).

  • Lane 4 now recognises the rc phase explicitly and warns with an actionable message.
  • It deliberately does not emit an rc tracker, because the rest of the preview lane is still preview-only and an rc tracker would break downstream rather than help: Get-PreviewReadiness.ps1's branch parser hard-throws on any ref that isn't release/<major>.0.1xx-preview<N>, and rc branches/tags don't match the strict preview regexes — so Lane 3's in-flight detection and the already-cut / already-shipped dedup would never fire and the same rc candidate would be re-proposed forever. The inline comment records exactly what full rc support requires, so the follow-up is scoped rather than rediscovered.
  • The fix therefore targets the genuinely dangerous half: the silence. This case previously fell into the same No active preview cycle line a major legitimately in SR phase prints, so a release captain could not distinguish "nothing to do" from "rc1 needs a tracker and you won't get one".

Tests

Added 25 assertions (M17–M23, plus M20b / M20c / M20d / M22c from review) to Test-ReleaseReadiness.ps1:

  • preview7 → next cycle is rc1, and explicitly not preview8
  • preview7 + rc1 both present → no check emitted
  • preview6 → still preview7 (cadence below 7 unchanged)
  • candidate mode off preview7 → current rc1, next rc2
  • (M20b) candidate off preview7 with rc1 missing → current-cycle BLOCKED naming rc1 (not preview8) — the negative-case guard for the newly-reachable rc current-cycle check; mutation-verified to catch a mutant that neuters BLOCKED for every -rc\d+$ title
  • (M20c / M20d) preview0 ordinal → UNKNOWN; past-rc2 ordinal → silent skip (0 checks)
  • rc2 → no roll-forward check (GA follows)
  • (M22b / M22c) a stale rc2 (neither current nor next) is flagged; a slipped next-cycle rc1 is not flagged as stale debt
  • pure-function mapping for ordinals 0, 1, 7, 8, 9, 10 and major-number substitution

Subsequent adversarial-review rounds added further coverage and fixes:

  • (M22 / M22b) negative coverage for Check 3b — it must stay silent when the past-due milestone is not the roll-forward target.
  • Get-PastDueOpenMilestones — extracted so Check 3 and Check 3b cannot drift apart on what "past due" means.
  • Sort-Object -Stable — PowerShell's default Sort-Object is not stable (ties are only preserved with -Top/-Bottom/-Stable); since sorting now happens before each caller's discriminator, stability is what makes the new ordering equivalent to the old. Divergence only begins around 17 elements, because .NET falls back to a stable insertion sort below ~16 — so the guarding fixture is padded past that threshold.
  • (M22e / M22f) ordering is now pinned in two separate scenarios because neither catches the other's mutant: M22e uses all-tied due_on (kills the missing--Stable mutant but cannot see direction), M22f uses distinct dates (kills -Descending).
  • Dual-tracker E2E gate — this assertion ran against the live repo and had two independent preconditions (branch cut and survey ref bumped) but only checked the first, so it failed for the whole legitimate interval between them. It also derived its expected tracker as shipped+2, i.e. it was asserting the very preview8 naming this PR removes. It now reads the survey ref's actual iteration and derives the expectation from it.
  • (rc window) synthetic scenario for the Lane 4 fix above, plus a negative control so a naive "always warn" cannot satisfy it.
Passed: 1124   Failed: 0

Every fix is mutation-verified — reverting each one fails its own assertion and no others. Two mutants were checked in both directions for the rc-window change (reverting to silence fails the warning assertions; forcing the condition to $true fails the negative control). One surviving mutant is left deliberately: -lt → -le on the grace cutoff, which requires exact datetime equality to distinguish and is pre-existing.

The 5 pre-existing milestone scenarios that could have regressed (M11, M12, M13, M15) all still pass — notably M15, which asserts an rc branch shape is still skipped (that's a separate, intentional behaviour and out of scope here).

Issues Fixed

None filed — found during an ad-hoc SR-lane run against the net11 preview7 branch (Get-ReleaseReadiness.ps1 -SrBranch release/11.0.1xx-preview7).

… preview8)

`Get-MilestoneHygieneChecks` derived the roll-forward milestone for a preview
cycle by naively incrementing the preview number, so surveying `preview7`
recommended creating a `.NET <major>.0-preview8` milestone. .NET does not ship
a preview8 — the pre-release train is `preview1..preview7 -> rc1 -> rc2 -> GA`.

Verified against dotnet/maui's own history:

  .NET 9  9.0.0-preview.7.24407.4  -> 9.0.0-rc.1.24453.9  -> 9.0.0-rc.2.24503.2
  .NET 10 10.0.0-preview.7.25406.3 -> 10.0.0-rc.1.25424.2 -> 10.0.0-rc.2.25504.7

with matching milestones `.NET 10.0-preview7` -> `.NET 10.0-rc1` -> `.NET 10.0-rc2`
and no preview8 in any major since .NET 6.

Changes:

- Add `Get-PreviewTrainMilestoneTitle`, a pure ordinal -> milestone-title mapper
  (1..7 previews, 8 -> rc1, 9 -> rc2, 10+ -> $null). `$script:FinalPreviewNumber`
  is the single constant to change if the cadence ever moves.
- Use it for BOTH the current- and next-cycle titles, so candidate mode off
  preview7 resolves to rc1/rc2 instead of preview8/preview9.
- Skip the next-cycle check entirely after rc2 rather than inventing an "rc3".
- Extend the stale-milestone filter to `(preview|rc)\d+` — preview and rc are one
  continuous pre-release train, so a stale rc1 is the same housekeeping debt as a
  stale preview6.
- Document the cadence in SKILL.md, including that preview7 is the effective
  feature/API-lock gate: work that misses it does not roll into "the next
  preview", it slips to the next major.

`Find-ReleaseReadinessTrackers.ps1` needed no change — Lane 4 reads
`PreReleaseVersionIteration` from the survey ref rather than incrementing, so it
already no-ops when the label flips from `preview` to `rc`.

Adds 22 assertions (M17-M23) covering the preview7 -> rc1 transition, rc2
end-of-train, candidate mode past preview7, stale rc detection, and the pure
mapper. Full suite: 1012 passed, 0 failed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 63594848-5aab-4ffa-8cb0-a64823163037
Copilot AI review requested due to automatic review settings July 26, 2026 11:14
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool July 26, 2026 11:14 — 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 -- 36803

Or

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

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions

github-actions Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Skill Validation Results

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

Overall Passed Static Passed LLM Skipped Skills 23 Agents 6

✅ Skill Validation Results — 92b7ff4 · [release-readiness] Fix next-cycle milestone after preview7 (rc1, not preview8) · 2026-07-27T17:09:09Z

✅ Static Checks Passed

Skills: 23 | Eval specs linted: 12

Full lint output
── .github/skills/agentic-labeler/tests/eval.vally.yaml
npm warn deprecated prebuild-install@7.1.3: No longer maintained. Please contact the author of the relevant native addon; alternatives are available.
✔ .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/code-review/tests/eval.capability.vally.yaml
✔ .github/skills/code-review/tests/eval.capability.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/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/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.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
kubaflo temporarily deployed to copilot-pat-pool July 26, 2026 11:15 — with GitHub Actions Inactive

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.

Pull request overview

Fixes the release-readiness “preview train” milestone derivation so preview7 correctly rolls forward to rc1 (not the non-existent preview8), and ensures candidate-mode/current-cycle milestone titles follow the same mapping.

Changes:

  • Added a Get-PreviewTrainMilestoneTitle helper to map preview1..preview7 → rc1 → rc2 → GA and used it for both current/next cycle milestone checks.
  • Updated milestone hygiene logic to skip “next cycle” checks after rc2 (avoid inventing rc3) and include rcN milestones in stale-milestone detection.
  • Added unit tests (M17–M23) and updated skill documentation to codify the cadence and its implications.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/skills/release-readiness/scripts/Get-ReleaseReadiness.ps1 Introduces preview→rc milestone mapping and updates milestone hygiene checks to follow the real pre-release train.
.github/skills/release-readiness/SKILL.md Documents the pre-release train cadence (no preview8) and updates relevant ship-check descriptions.
.github/skills/release-readiness/tests/Test-ReleaseReadiness.ps1 Adds regression tests covering preview7→rc1, candidate behavior, rc2 termination, stale rc milestones, and pure-function mapping.

@kubaflo
kubaflo temporarily deployed to copilot-pat-pool July 26, 2026 11:17 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool July 26, 2026 11:18 — with GitHub Actions Inactive
@github-actions github-actions Bot added the area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions label Jul 26, 2026
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool July 26, 2026 11:18 — with GitHub Actions Inactive
… review)

Scenario M21 passes a synthetic `release/11.0.1xx-preview8` PriorSrBranch only to
drive the candidate-mode ordinal math onto rc2 so the test can exercise the
"rc2 is the end of the train" path. Since this PR removes preview8 as a real
roll-forward target, add a note so a future reader doesn't misread the test as
implying preview8 exists (real RC branch shapes are intentionally skipped by the
parser, so a preview-shaped input is the only way to reach rc2 in this unit test).
Comment-only; no behavior change (Copilot review).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d00747b7-96f3-4e7a-8dfb-e3a48db04b2d
Copilot AI review requested due to automatic review settings July 26, 2026 11:23
@kubaflo

kubaflo commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

@copilot addressed the review note in 40fdab6c9f8 — documented that M21's preview8 is a synthetic parser input (not a real cycle) used to reach rc2. Comment-only. Ready for re-review — thanks!

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

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

Adversarial multi-model review — PR #36803

Methodology: 3 independent reviewers with adversarial consensus, plus one dispute round on a contested finding. Reviewers read full source (not just the diff), ran the suite, and one performed mutation testing to check whether the new assertions actually discriminate. Findings below survived cross-validation; single-reviewer findings were discarded.

What looks right

The mapper is strongly pinned by the new tests — reverting Get-PreviewTrainMilestoneTitle to the naive preview<n+1> behavior kills 11 assertions (M17, M18, M20, M21, M23×4), and flipping $script:FinalPreviewNumber to 8 kills 5. The factual evidence in the code comment also checks out verbatim: all six cited tags (9.0.0-preview.7.24407.4 … 10.0.0-rc.2.25504.7) exist in git tag -l, and .NET 10.0-preview7 / -rc1 / -rc2 exist as real milestones. The strict-mode array-unrolling note and the if ($expectedTitlesNext.Count -gt 0) guard are both correct, and the SR path and preview1–6 path are unchanged.

Findings (ranked)

Sev Finding Consensus
❌ Testing — no negative-case test for the newly-reachable rc current-cycle check; a mutant that neuters BLOCKED for all rc titles passes 1095/1095 2/3 after dispute
⚠️ Logic/Documentation — the fixed previewMatch arm may be unreachable through every documented/automated invocation path (SR-only lane); the live preview8 sighting needs an invocation trace 2/3
⚠️ Logic — stale-filter widening to (preview|rc)\d+ mislabels a slipped rc1 as "already shipped"; $expectedTitlesNext isn't excluded 2/3
⚠️ Error Handling — return @() for Ordinal -lt 1 silently suppresses the BLOCKED current-cycle signal, against the lane's documented "never silently skips" contract 3/3 (severity split)
💡 Documentation — PR description counts are off (see design comment) 2/3

Test coverage assessment

Good on the title-derivation axis — mutation testing confirms real discrimination, and negative assertions are present (M17 asserts not preview8, M19 pins preview6 → preview7, M23 pins ordinal 0 → $null). The gap is on the check-emission axis for rc-shaped current-cycle titles, which is the ❌ above and is a ~6-line fixture.

Prior review status

copilot-pull-request-reviewer posted an overview and a note that the author addressed in 40fdab6 (the M21 synthetic-preview8 comment); its latest pass generated no new comments. Nothing here duplicates that feedback.

Scope note

Branch is clean relative to base — the local diff matches the PR's authoritative changed-file list exactly (3 files), so no stale-base artifacts were reviewed.

CI status is out of scope for this review by design.


3 independent reviewers · adversarial consensus · dotnet/maui repo review dimensions applied (Logic & Correctness, Regression Prevention, Complexity Reduction)

@PureWeen

Copy link
Copy Markdown
Member

Design-level notes (outside the diff)

  • 💡 Documentation — The PR description's test numbers don't match what the suite actually reports. Two reviewers independently ran pwsh .github/skills/release-readiness/tests/Test-ReleaseReadiness.ps1 and both got 1095 passed / 0 failed, not the Passed: 1012 quoted in the description. The new-assertion count also measures as 18, not 22 (baseline 1077 + 18 = 1095). Everything is green either way — the concern is that a stale pass count in the description is the artifact future readers cite when auditing whether the suite grew, so it quietly decouples the written record from the real baseline. Worth refreshing before merge.

  • 💡 Documentation — SKILL.md now states "After rc2 the check is skipped entirely (GA doesn't use this naming)." That's accurate as a description of the mapper, but reviewers confirmed ordinal 9 (rc2-as-current) and ordinal 10+ (GA) are reachable only via the synthetic release/11.0.1xx-preview8 input that test M21 has to fabricate — no real branch shape gets there, since rc-shaped branches are skipped by the parser (existing scenario M15). The wording reads as documenting live behavior rather than a defensive path. Consider a half-sentence making the boundary explicit — e.g. that rc titles are reached only via candidate-mode-off-preview7, and that in-flight surveys of an actual release/*-rc1 branch still produce no milestone checks at all. Otherwise a future maintainer will reasonably assume rc milestone hygiene is enforced once the rc branch is cut, and it isn't.

    The anchor link itself is fine — #pre-release-train-cadence-no-preview8 correctly resolves to the new heading under GitHub's slug rules.

Both flagged by 2/3 reviewers. Posted here rather than inline because they concern the PR description and cross-file behavior rather than a specific changed line.

…iew)

Address 3 findings from PureWeen's adversarial review on #36803:

- Testing (❌): add M20b negative-case test — a *missing* rc1 driven
  through the current-cycle check now pins BLOCKED + the rc1 render.
  Without it, a mutant that neuters BLOCKED for every `-rc\d+$` title
  passed the full suite (1095/1095). Mutation-verified: the mutant now
  aborts at M20b.

- Error handling (⚠️ 3/3): Get-MilestoneHygieneChecks silently returned
  @() for any $null train title, conflating "past rc2" (legitimate — GA
  has no milestone) with a nonsensical sub-1 ordinal (e.g. a `preview0`
  branch). The latter now emits UNKNOWN, preserving the lane's documented
  "never silently skips" contract; past-rc2 stays a silent skip. New
  tests M20c/M20d pin both halves.

- Logic (⚠️ 2/3): the stale-milestone filter now also excludes
  $expectedTitlesNext. A slipped-but-upcoming rc1 (the survey's own
  next-cycle target) is no longer mislabeled "already-shipped debt",
  which had contradicted Check 2's advice to create it. New test M22c
  guards this; M22b retargeted to rc2 to keep proving the rc filter fires.

Suite: 1102 passed / 0 failed (was 1095). All three fixes mutation-verified
as discriminated by the new assertions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d00747b7-96f3-4e7a-8dfb-e3a48db04b2d
Copilot AI review requested due to automatic review settings July 26, 2026 16:20

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

…review)

Addresses PureWeen's ⚠️ reachability finding + 💡 SKILL.md doc note: the
`preview→rc` milestone mapping lives only in the SR lane
(Get-MilestoneHygieneChecks in Get-ReleaseReadiness.ps1). The automated
preview lane (Get-PreviewReadiness.ps1 → Test-PreviewMilestoneExists)
validates only the current preview's own milestone and never derives a
next-cycle title, so it never had the preview8 bug.

Add a SKILL.md note making the boundary explicit: rc titles are produced
only when the SR-lane check is driven with a preview-shaped branch (ad-hoc
`-SrBranch release/*-preview7` or candidate-off-preview7); an in-flight
survey of a cut `release/*-rc1` branch produces no milestone checks at all
(rc shapes are skipped by the parser, scenario M15). The mapping is
defensive normalization for preview-lane inputs, not a live gate on rc
branches.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d00747b7-96f3-4e7a-8dfb-e3a48db04b2d
Copilot AI review requested due to automatic review settings July 26, 2026 16:23
@kubaflo

kubaflo commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

@PureWeen — round-2 findings all addressed in 59987bfe88f, and thanks for the careful pass on the remediation itself.

  • ⚠️ (1) SR-lane regression + (2) suppressed-not-reclassified → the next-cycle title stays out of the "already-shipped debt" bucket, but a new lane-agnostic Check 3b (Next-cycle milestone past due, CLEANUP) re-classifies it with accurate wording. Your SR8/overdue-SR9 signal is restored, and a long-abandoned next-cycle milestone no longer vanishes. New tests M22c (preview/rc) + M22d (SR) pin both lanes and fail on the pre-fix script.
  • 💡 (3) UNKNOWN Area collision → split into Milestone hygiene (branch shape) vs (API failure), updated the agent remediation table, and M16/M20c now assert the distinct Area.
  • 💡 (4) crash-not-fail tests → $null -ne guards on M20b/M20c/M22b; verified the rc-skip mutation now fails cleanly (M20b … check present) with the suite continuing to a summary.

Docs: SKILL.md gains a ship-check row for Check 3b; the exclusion comment now states the lane-agnostic intent. Suite 1115/0 (was 1102). Ready for another look.

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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

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

Adversarial review — round 3 (remediation of round-2 findings)

Re-reviewed at 59987bf. Methodology: 3 independent reviewers with adversarial consensus, each working in an isolated detached worktree. All four round-2 findings are genuinely resolved — I verified that independently rather than accepting the PR comment.

Round-2 findings — verified resolved

Round-2 finding Status
⚠️ SR-lane signal silently dropped Resolved. Two reviewers independently replayed the exact harm scenario (survey release/10.0.1xx-sr8, .NET 10 SR9 open and 60 days overdue) across all three commits: merge-base → 1 CLEANUP, 7b8bef9 → 0 checks, HEAD → 1 CLEANUP via Check 3b. Signal restored.
⚠️ Suppressed rather than re-classified Resolved, and better than asked. The new wording doesn't just re-surface the row — it corrects a mislabeling that was wrong even at merge-base, where a not-yet-shipped next-cycle milestone was called "already-shipped debt."
💡 UNKNOWN Area collision Resolved. Split into (branch shape) / (API failure), agent remediation table updated with a row that explicitly says re-running gh auth will not help. I grepped every consumer in the repo — no matcher is left on the old bare string.
💡 Crash-not-fail tests Resolved. Re-running the mutation that previously aborted the harness now yields a clean 1111 / 1 with M20b … check present failing and the suite reaching its summary.

Also independently confirmed: 1115/0, net +13 assertions, and M22c/M22d both non-vacuous under four separate mutations. Two reviewers verified Check 2 and Check 3b are structurally mutually exclusive, so a captain can never be told both "create the next milestone" and "the next milestone is overdue."

My own top-priority hypothesis going in was that $cycleLabel — interpolated into Check 3b's message — might be assigned in only one arm of the SR/preview split, which would be a StrictMode crash in brand-new code. That was wrong: it's initialized to '' at line 1257, before the split, and assigned in both arms. Two reviewers fired Check 3b in both lanes with no exception. Good defensive placement.

Findings

1. ⚠️ Testing — Check 3b's membership predicate has no negative coverage — Get-ReleaseReadiness.ps1:1413

2. 💡 Complexity Reduction — Check 3 and Check 3b duplicate their past-due predicate — Get-ReleaseReadiness.ps1:1409

Details inline. Nothing here blocks merge; the shipped behavior is correct in every scenario tested.

Test coverage

Substantially stronger than round 2. M22d closes the SR-lane gap that motivated round-2 finding 1, and mutation testing confirms both lanes discriminate independently. The one asymmetry is finding 1: Check 3's exclusion has negative coverage (M22c/M22d assert the next-cycle title is not stale debt), but Check 3b's inclusion has none.

Non-blocking observation (not a finding against this PR)

One reviewer flagged that SKILL.md:305 lists the new row as applying to "SR + preview branches" while Get-MilestoneHygieneChecks has a single call site in the SR lane. I checked: that phrasing is pre-existing, shared verbatim by the three sibling milestone rows and introduced in 294d8f7ed6, so the new row is consistent with its neighbours rather than introducing the claim. Worth a separate cleanup pass across all four rows sometime — not something to fix here.

Discarded after investigation

A possible double-count when both SR title variants (.NET 10 SR9 and .NET 10.0 SR9) exist and are overdue — the flagging reviewer explicitly declined to press it, and a second reviewer produced the same output and read it as correct.

Prior review status

Round 1 (#pullrequestreview-4782098135) and round 2 (#pullrequestreview-4782501694) are both fully superseded — every finding from each is verified resolved above. No prior finding is repeated here.

3 independent reviewers with adversarial consensus.

…edicate

Addresses two findings from the round-3 adversarial review of this PR.

1. Testing — Check 3b's membership predicate had no negative coverage.
   M22c/M22d only assert the row appears when the next-cycle milestone IS
   past due. Replacing `($expectedTitlesNext -contains $_.title)` with
   `$true` still passed the whole suite, so nothing pinned that 3b selects
   ONLY the next-cycle title. Adds the missing negative half to M22
   (next-cycle rc1 present and on time, past-due preview5) and M22b
   (next-cycle rc1 absent, past-due rc2) — both assert no
   "Next-cycle milestone past due" row is emitted. Verified by mutation:
   the `$true` mutant now fails both new assertions.

2. Complexity — Check 3 and Check 3b duplicated the open/due_on/cutoff
   test. They partition the same milestone set on the next-cycle title,
   so they must agree on what "past due" means, but nothing enforced it;
   drift would let a milestone double-report or fall through both checks
   unreported. Extracts Get-PastDueOpenMilestones so the shared half is
   defined once and each check contributes only its own discriminator.

Behavior-preserving: hoisting Sort-Object ahead of the per-check filters
is order-equivalent (filtering a sorted list preserves relative order and
Sort-Object is stable).

Suite: 1115 -> 1117 passing. The one remaining failure
("net11 missing preview8 candidate tracker") is pre-existing on main and
unrelated — Lane 4 of Find-ReleaseReadinessTrackers.ps1, which this PR
does not touch; net11.0 still has PreReleaseVersionIteration=7 now that
release/11.0.1xx-preview7 is cut.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7f87d6b9-cc21-4952-81c7-787a8585ce11
Copilot AI review requested due to automatic review settings July 27, 2026 16:19

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.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new

…ring

Addresses three round-4 review findings, all against the previous commit
(3e852ff), which was itself a review fix.

1. Sort-Object -Stable. That commit hoisted the sort ahead of each check's
   discriminator and justified it with "Sort-Object is stable". That is
   false: per the cmdlet docs, ties are only delivered in received order
   with -Top/-Bottom/-Stable. Verified on pwsh 7.4.5 — the default sort
   keeps order below .NET's ~16-element insertion-sort threshold and
   permutes ties above it, which is why a small fixture never caught it.
   Adds -Stable, which is what actually makes sort-then-filter equivalent
   to filter-then-sort, and rewrites the docstring to say so accurately.
   This also makes tie order deterministic, which the original
   filter-then-sort code did not guarantee either.

2. Parameter contract. $Milestones was [AllowEmptyCollection()] but not
   Mandatory, which advertises null-tolerance the function does not have:
   AllowEmptyCollection is a no-op on optional parameters, and a $null
   argument reached $_.state and aborted the entire run under StrictMode
   rather than returning empty. Marking it Mandatory makes the existing
   attribute meaningful and converts that failure into a clean binding
   error. Verified: @() and a single object bind fine; $null and omission
   now fail fast.

3. Ordering was untested. Reversed- and permuted-sort mutants survived the
   whole suite, so nothing pinned the rendered milestone order. Adds two
   scenarios that fail on exactly one mutant each:
   - M22e pins tie order. It pads $pastDueOpen past the insertion-sort
     threshold with cross-major milestones that $cycleFilter later drops,
     because a small fixture cannot detect an unstable sort. Fails iff
     -Stable is removed.
   - M22f pins direction (oldest-first) with distinct, out-of-order due
     dates. Fails iff the sort is reversed. M22e alone cannot catch this,
     since all its entries are tied.

Suite: 1117 -> 1120 passing. The one remaining failure
("net11 missing preview8 candidate tracker") is pre-existing on main and
unrelated — Lane 4 of Find-ReleaseReadinessTrackers.ps1, which this PR
does not touch.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7f87d6b9-cc21-4952-81c7-787a8585ce11
Copilot AI review requested due to automatic review settings July 27, 2026 16:47

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.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new

…'s actual iteration

The `[E2E] Detection with -AllActiveMajors` dual-tracker assertion ran against
the live repo and failed for a legitimate repo state, not a regression.

The window it checks has TWO independent preconditions -- the shipped+1 branch
must be cut AND the survey ref must have been bumped to the next iteration.
Those are separate maintainer actions. The comment stated the second one
parenthetically but the code never checked it, so the assertion failed for the
entire interval between the cut and the bump. That is exactly where the repo
sits today: release/11.0.1xx-preview7 exists, net11.0 is still at iteration 7.

It also derived the expected tracker number as shipped+2, which asserts the
same buggy naming assumption this PR fixes -- after preview7 the next cycle is
rc1, so shipped+2 demands a `preview8` that will never exist.

Now reads PreReleaseVersionIteration from the survey ref and only asserts once
it has moved past the in-flight preview, deriving the expected number from that
iteration. The invariant itself remains deterministically covered by the
synthetic dual-preview-window test, which mocks both preconditions.

Verified: suite goes 1120/1 -> 1120/0. Mutating the gate to open when it
should not produces 3 real failures, confirming the assert path is still live
rather than a permanent skip.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7f87d6b9-cc21-4952-81c7-787a8585ce11
Copilot AI review requested due to automatic review settings July 27, 2026 16:54

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

Adversarial review — round 4

3 independent reviewers with adversarial consensus, each in its own isolated worktree at the reviewed SHA. Scope is code only; CI status is deliberately out of scope.

Round 3's two findings were addressed. This round surfaced 3 new findings, all 💡 (non-blocking) — plus one live-repo test defect found while chasing the suite's last red assertion. All four are already fixed and pushed to this branch.


💡 Documentation — the helper's docstring asserted a stability guarantee PowerShell does not give (2/3 reviewers, confirmed against Microsoft docs + direct probe)

Get-PastDueOpenMilestones moved sorting to happen before each caller's discriminator instead of after. That's only equivalent to the old ordering if the sort is stable, and the docstring justified the move by stating Sort-Object is stable. It isn't.

Per Microsoft's Sort-Object documentation, ties are delivered in received order only with -Top, -Bottom, or -Stable. I verified empirically on pwsh 7.4.5: at n=200, 132 of the tied elements were reordered. Divergence begins at n=17 — .NET falls back to a stable insertion sort below ~16 elements, which is exactly why this is invisible in small fixtures.

One reviewer disputed the finding; its counter-fixture was 6 milestones, i.e. inside the stable region. Settled against the official docs.

Worth being precise about impact: the old filter-then-sort was also unstable at n≥50, so this was never a live regression — the defect was a false guarantee in the docstring rationalizing a real behavioral change. Today dotnet/maui has 21 open milestones and no two share a due_on, so nothing is observably wrong right now.

Fixed in 5ac3fdad77: added -Stable and rewrote the docstring to describe the actual semantics, including the ~16-element threshold.


💡 API Design — AllowEmptyCollection() on an optional parameter advertises null-tolerance the function doesn't have (2/3 reviewers)

AllowEmptyCollection is a no-op on optional parameters — its purpose is to let @() satisfy a mandatory binding. As written, the attribute read as "empty and absent inputs are handled," but neither was.

Verified by execution: before the fix, both $null and omission threw The property 'state' cannot be found on this object from deep inside the pipeline. Under Set-StrictMode -Version Latest that aborts the entire run, not one check — so a caller passing an empty milestone result would take down the whole readiness survey with an error pointing at the wrong place.

Fixed in 5ac3fdad77: added [Parameter(Mandatory)]. @() and single objects now bind correctly; $null and omission fail at the binding boundary with a clear message.


💡 Testing — nothing pinned the rendered ordering, so reversed and permuted sorts survived every scenario (1/3, threshold lowered per self-correction: the finding targets code introduced during this review)

Mutation testing confirmed it: both Sort-Object → Sort-Object -Descending and dropping -Stable entirely passed the full suite. The ordering the helper exists to produce had no assertion behind it.

Fixed in 5ac3fdad77 with two scenarios, deliberately split because neither can catch the other's mutant:

  • M22e — all entries share one due_on so every comparison is a tie, and the fixture is padded past the 16-element insertion-sort threshold (using cross-major entries that reach $pastDueOpen but are dropped by $cycleFilter). Kills the missing--Stable mutant. Cannot detect direction, since everything is tied.
  • M22f — distinct due_on values, asserts oldest-first. Kills the -Descending mutant.

Each mutant now fails exactly one scenario.


❌ → resolved: the suite's long-standing red assertion was a real defect, and it was the same bug class this PR fixes

The suite sat at 1120 passed / 1 failed on an assertion that predated this PR. Rather than leave it, I traced it — and it turned out not to be flake.

The failing assertion lives in the [E2E] Detection with -AllActiveMajors block and runs against the live repo. The window it checks has two independent preconditions: the shipped+1 branch must be cut, and the survey ref must have been bumped to the next iteration. Those are separate maintainer actions. The comment stated the second one parenthetically, but the code only gated on the first — so the assertion failed for the entire legitimate interval between the cut and the bump. That is precisely where the repo sits today: release/11.0.1xx-preview7 exists, net11.0 is still at PreReleaseVersionIteration=7.

More relevant to this PR: the assertion derived its expected tracker number as $shippedPreviewN + 2 — it was asserting the exact buggy naming this PR sets out to fix. After preview7 the next cycle is rc1, so shipped+2 demands a preview8 that will never exist.

Fixed in 554290347e: the check now reads PreReleaseVersionIteration from the survey ref and only asserts once it has moved past the in-flight preview, deriving the expected number from that iteration rather than assuming an increment. The invariant itself stays deterministically covered by the synthetic dual-preview-window test, which mocks both preconditions and always runs.

Guarded against the obvious failure mode of "a gate that never fires": mutating it to open when it shouldn't produces 3 real failures, confirming the assert path is still live rather than a permanently-skipped no-op.


🔎 Related finding outside this PR's scope — worth a follow-up

While tracing the above I found that Find-ReleaseReadinessTrackers.ps1 Lane 4 has the identical bug this PR fixes, in a file this PR doesn't touch. It derives the next preview by reading PreReleaseVersionIteration and assuming a plain increment. Once net11.0 is bumped after preview7, both outcomes are wrong:

  • bumped to iteration=8, label=preview → emits a bogus preview8 tracker for a release that will never exist;
  • flipped to label=rc, iteration=1 → the PreLabel -eq 'preview' guard fails → emits nothing, silently dropping the rc1 tracker.

Not flagged as a finding against this PR, since it's out of the authoritative changed-file set. Raising it because it's the same defect and will bite at the same transition. Fixing it here or filing it separately are both reasonable.


Test coverage

1120 passed / 0 failed — the suite is fully green for the first time in this PR's history (it was 1115/1 at the round-3 baseline).

Coverage was verified by mutation rather than by inspection. Every fix in this round kills at least one mutant that previously survived the full suite:

Mutant Caught by
remove -Stable M22e only
Sort-Object → -Descending M22f only
Check 3b predicate → $true M22 + M22b
-contains → -notcontains in Check 3b pre-existing coverage
remove Check 3's $cycleFilter pre-existing coverage
force dual-tracker gate open 3 E2E assertions

One surviving mutant is left deliberately: -lt → -le on the grace cutoff. It requires exact datetime equality to distinguish, is pre-existing, and isn't touched by this PR.

Prior reviews

Rounds 1–3 posted; round 3's two findings (missing negative coverage for Check 3b, duplicated past-due predicate) are both resolved. No unresolved threads carried forward.

What looks right

Deriving the next-cycle milestone from the release train's actual shape instead of incrementing the preview number is the correct root-cause fix — the preview→rc boundary is a genuine discontinuity, and hardcoding +1 could only ever be right for part of the cycle.

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.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new

Find-ReleaseReadinessTrackers.ps1 Lane 4 has the same preview->rc blind spot
this PR fixes for milestone naming: it proposes the next preview by reading
PreReleaseVersionIteration from the survey ref and assuming the pre-release
train is a plain increment. It isn't -- after the final preview the train
continues into rc1/rc2, and the survey ref flips to label=rc/iteration=1
rather than an eighth preview.

Verified against this repo rather than assumed: release/10.0.1xx-rc1's
Versions.props carries rc/1, and rc branches and tags use naming exactly
parallel to previews (release/<major>.0.1xx-rc<N>, <major>.0.0-rc.<N>.<build>).

So the `PreLabel -eq 'preview'` guard stops matching for the entire rc window
and no rc tracker is produced. The dangerous part was not the missing tracker
but the silence: this case fell into the same DarkGray "No active preview
cycle" line that a major legitimately in SR phase prints, so a release captain
could not tell "nothing to do" from "rc1 needs a tracker and you won't get one".

Lane 4 now recognises the rc phase explicitly and warns with an actionable
message. It deliberately does NOT emit an rc tracker, because the rest of the
preview lane is still preview-only and an rc tracker would break downstream
rather than help -- Get-PreviewReadiness.ps1's branch parser hard-throws on any
ref that isn't release/<major>.0.1xx-preview<N>, and the strict preview branch
and tag regexes mean Lane 3's in-flight detection and the already-cut/shipped
dedup would never fire, so the same rc candidate would be re-proposed forever.
The comment records exactly what full rc support requires.

Adds a synthetic rc-window test plus a negative control, so "always warn"
cannot satisfy it. Mutation-verified: reverting the rc branch to silence fails
the two warning assertions, and replacing the condition with $true fails the
negative control. Suite 1120 -> 1124, still 0 failures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7f87d6b9-cc21-4952-81c7-787a8585ce11
Copilot AI review requested due to automatic review settings July 27, 2026 17:08
@PureWeen

Copy link
Copy Markdown
Member

Follow-up on the out-of-scope item from my round-4 review — it's now addressed on this branch (92b7ff4715), so the PR is 5 files rather than 4.

I checked the assumption rather than trusting it. At the transition the dev branch flips to label=rc, iteration=1, not preview8 — release/10.0.1xx-rc1's Versions.props carries rc/1, and rc branches and tags are named exactly parallel to previews (release/<major>.0.1xx-rc<N>, <major>.0.0-rc.<N>.<build>). So the failure mode is the silent one: Lane 4's PreLabel -eq 'preview' guard stops matching for the whole rc window.

Deliberately not emitting an rc tracker. That would be worse than emitting nothing, because the rest of the preview lane is still preview-only:

  • Get-PreviewReadiness.ps1:145 hard-throws on any ref that isn't release/<major>.0.1xx-preview<N> — an rc tracker would fail the workflow's report job outright.
  • rc branches and tags don't match StrictPreviewBranchRegex / StrictPreviewTagRegex, so Lane 3's in-flight detection and the already-cut / already-shipped dedup would never fire — the same rc candidate would be re-proposed on every run, forever, even after it shipped.
  • canonicalKey, milestoneName, expectedTagPrefix and the regression labels are all preview-shaped.

So what I fixed is the part that's actually dangerous and genuinely in scope: the silence. This case previously fell into the same DarkGray No active preview cycle line that a major legitimately in SR phase prints — a release captain had no way to distinguish "nothing to do" from "rc1 needs a tracker and you won't get one". Lane 4 now recognises the rc phase explicitly and warns with an actionable message, and the comment records precisely what full rc support requires so the follow-up is scoped rather than rediscovered.

Test: synthetic rc-window scenario plus a negative control, so a naive "always warn" can't satisfy it. Mutation-verified in both directions — reverting to silence fails the two warning assertions and nothing else; replacing the condition with $true fails only the negative control.

Suite is 1124 passed / 0 failed.

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.

Copilot's findings

  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new

@PureWeen
PureWeen merged commit 28b432b into main Jul 27, 2026
19 of 20 checks passed
@PureWeen
PureWeen deleted the fix/release-readiness-preview-to-rc branch July 27, 2026 18:30
@github-actions github-actions Bot added this to the .NET 10 SR10 milestone Jul 27, 2026
HarishwaranVijayakumar pushed a commit to HarishwaranVijayakumar/maui that referenced this pull request Jul 30, 2026
… preview8) (dotnet#36803)

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

### Description of Change

The `release-readiness` skill's `Get-MilestoneHygieneChecks` derived the
roll-forward milestone for a preview cycle by naively incrementing the
preview number:

```powershell
$expectedTitlesNext = @(".NET $major.0-preview$($cycleNum + 1)")
```

So surveying `preview7` told the release captain to create a **`.NET
<major>.0-preview8`** milestone. **.NET does not ship a preview8.** The
pre-release train is:

```
preview1 → preview2 → … → preview7 → rc1 → rc2 → GA
```

This surfaced during an **ad-hoc SR-lane run against the net11
`preview7` branch** — `Get-ReleaseReadiness.ps1 -SrBranch
release/11.0.1xx-preview7` — where the report recommended creating `.NET
11.0-preview8`. The **automated preview lane**
(`Get-PreviewReadiness.ps1` → `Test-PreviewMilestoneExists`) never had
this bug: it validates only the *current* preview's own milestone and
never derives a next-cycle title. This fix therefore hardens the SR
lane's defensive preview-handling — see the reachability note in
`SKILL.md` — rather than changing automated preview-lane behavior.

#### Evidence (from this repo)

| Major | Last preview | Then |
|-------|--------------|------|
| .NET 9 | `9.0.0-preview.7.24407.4` | `9.0.0-rc.1.24453.9` →
`9.0.0-rc.2.24503.2` |
| .NET 10 | `10.0.0-preview.7.25406.3` | `10.0.0-rc.1.25424.2` →
`10.0.0-rc.2.25504.7` |

Matching milestones: `.NET 10.0-preview7` (due 2025-08-01) → **`.NET
10.0-rc1`** (due 2025-08-21) → `.NET 10.0-rc2`. No `preview8` milestone
exists in any major since .NET 6.

There was also a **second, worse instance of the same bug**: in
`candidate` mode the ordinal is incremented before deriving the
*current* title too, so a candidate off `preview7` reported its own
current cycle as `preview8` — a milestone that can never exist, which
would render as a permanent spurious `BLOCKED` row.

### Changes

`.github/skills/release-readiness/scripts/Get-ReleaseReadiness.ps1`
- Add `Get-PreviewTrainMilestoneTitle` — a pure ordinal →
milestone-title mapper (`1..7` → previews, `8` → `rc1`, `9` → `rc2`,
`10+` → `$null`). `$script:FinalPreviewNumber` is the single constant to
change if the cadence ever moves (.NET 5 shipped 8 previews; 7 has held
since .NET 6).
- Use it for **both** the current- and next-cycle titles.
- Skip the next-cycle check entirely after `rc2` instead of inventing an
`rc3`.
- Widen the stale-milestone filter to `(preview|rc)\d+` — preview and rc
are one continuous pre-release train, so a stale `rc1` is the same
housekeeping debt as a stale `preview6`. **(Review refinement:** the
filter now also excludes `$expectedTitlesNext`, so a
slipped-but-upcoming `rc1` — the survey's own next-cycle target — isn't
mislabeled "already-shipped debt", which had contradicted the "create
it" advice from the next-cycle check.**)**
- **(Review refinement)** `Get-MilestoneHygieneChecks` now emits
`UNKNOWN` — rather than a silent `return @()` — for a nonsensical sub-1
preview ordinal (e.g. a `release/<major>.0.1xx-preview0` branch),
preserving the lane's documented "never silently skips" contract. The
legitimate past-`rc2` case stays a silent skip (GA has no milestone in
this naming convention).

`.github/skills/release-readiness/SKILL.md`
- New **Pre-release train cadence (no `preview8`)** section with the
tag/milestone evidence above.
- Updated the `Milestone for next cycle` / `Stale open milestones`
ship-check rows.
- Documented that **`preview7` is the effective feature/API-lock gate**:
because no eighth preview exists, work that misses the preview7 cut does
not roll into "the next preview" — RC is normally API-locked, so in
practice it slips to the next major. Reports on a preview7 branch should
treat still-open public-API PRs as a *decide-now* item.
- **(Review refinement)** Added a **reachability note** clarifying that
the `preview→rc` mapping fires only in the SR lane when driven with a
preview-shaped branch; an in-flight survey of a cut `release/*-rc1`
branch produces no milestone checks at all (rc branch shapes are skipped
by the parser).


`.github/skills/release-readiness/scripts/Find-ReleaseReadinessTrackers.ps1`

**(Review refinement — this file was originally reported as needing no
change; that was wrong.)** Lane 4 does read `PreReleaseVersionIteration`
from the survey ref rather than incrementing, and it does no-op once the
label flips from `preview` to `rc`. But **the no-op is the bug, not the
safeguard.** The same preview→rc discontinuity this PR fixes for
milestone naming applies here: the pre-release train continues into
`rc1`/`rc2`, so once the survey ref is bumped past the final preview the
`PreLabel -eq 'preview'` guard stops matching for the entire rc window
and **no rc tracker is ever proposed**.

Verified against this repo rather than assumed: `release/10.0.1xx-rc1`'s
`Versions.props` carries `rc`/`1`, and rc branches and tags use naming
exactly parallel to previews (`release/<major>.0.1xx-rc<N>`,
`<major>.0.0-rc.<N>.<build>`).

- Lane 4 now recognises the rc phase explicitly and **warns** with an
actionable message.
- It deliberately does **not** emit an rc tracker, because the rest of
the preview lane is still preview-only and an rc tracker would break
downstream rather than help: `Get-PreviewReadiness.ps1`'s branch parser
hard-`throw`s on any ref that isn't `release/<major>.0.1xx-preview<N>`,
and rc branches/tags don't match the strict preview regexes — so Lane
3's in-flight detection and the already-cut / already-shipped dedup
would never fire and the same rc candidate would be re-proposed forever.
The inline comment records exactly what full rc support requires, so the
follow-up is scoped rather than rediscovered.
- The fix therefore targets the genuinely dangerous half: **the
silence.** This case previously fell into the same `No active preview
cycle` line a major legitimately in SR phase prints, so a release
captain could not distinguish "nothing to do" from "rc1 needs a tracker
and you won't get one".

### Tests

Added 25 assertions (**M17–M23**, plus **M20b / M20c / M20d / M22c**
from review) to `Test-ReleaseReadiness.ps1`:

- `preview7` → next cycle is `rc1`, and explicitly **not** `preview8`
- `preview7` + `rc1` both present → no check emitted
- `preview6` → still `preview7` (cadence below 7 unchanged)
- candidate mode off `preview7` → current `rc1`, next `rc2`
- **(M20b)** candidate off `preview7` with `rc1` *missing* →
current-cycle `BLOCKED` naming `rc1` (not `preview8`) — the
negative-case guard for the newly-reachable rc current-cycle check;
mutation-verified to catch a mutant that neuters `BLOCKED` for every
`-rc\d+$` title
- **(M20c / M20d)** `preview0` ordinal → `UNKNOWN`; past-`rc2` ordinal →
silent skip (0 checks)
- `rc2` → no roll-forward check (GA follows)
- **(M22b / M22c)** a stale `rc2` (neither current nor next) is flagged;
a slipped next-cycle `rc1` is **not** flagged as stale debt
- pure-function mapping for ordinals 0, 1, 7, 8, 9, 10 and major-number
substitution

Subsequent adversarial-review rounds added further coverage and fixes:

- **(M22 / M22b)** negative coverage for Check 3b — it must stay silent
when the past-due milestone is not the roll-forward target.
- **`Get-PastDueOpenMilestones`** — extracted so Check 3 and Check 3b
cannot drift apart on what "past due" means.
- **`Sort-Object -Stable`** — PowerShell's default `Sort-Object` is
*not* stable (ties are only preserved with `-Top`/`-Bottom`/`-Stable`);
since sorting now happens before each caller's discriminator, stability
is what makes the new ordering equivalent to the old. Divergence only
begins around 17 elements, because .NET falls back to a stable insertion
sort below ~16 — so the guarding fixture is padded past that threshold.
- **(M22e / M22f)** ordering is now pinned in two separate scenarios
because neither catches the other's mutant: M22e uses all-tied `due_on`
(kills the missing-`-Stable` mutant but cannot see direction), M22f uses
distinct dates (kills `-Descending`).
- **Dual-tracker E2E gate** — this assertion ran against the live repo
and had two independent preconditions (branch cut *and* survey ref
bumped) but only checked the first, so it failed for the whole
legitimate interval between them. It also derived its expected tracker
as `shipped+2`, i.e. it was asserting the very `preview8` naming this PR
removes. It now reads the survey ref's actual iteration and derives the
expectation from it.
- **(rc window)** synthetic scenario for the Lane 4 fix above, **plus a
negative control** so a naive "always warn" cannot satisfy it.

```
Passed: 1124   Failed: 0
```

Every fix is **mutation-verified** — reverting each one fails its own
assertion and no others. Two mutants were checked in both directions for
the rc-window change (reverting to silence fails the warning assertions;
forcing the condition to `$true` fails the negative control). One
surviving mutant is left deliberately: `-lt` → `-le` on the grace
cutoff, which requires exact datetime equality to distinguish and is
pre-existing.

The 5 pre-existing milestone scenarios that could have regressed (M11,
M12, M13, M15) all still pass — notably M15, which asserts an `rc`
*branch shape* is still skipped (that's a separate, intentional
behaviour and out of scope here).

### Issues Fixed

None filed — found during an ad-hoc SR-lane run against the net11
`preview7` branch (`Get-ReleaseReadiness.ps1 -SrBranch
release/11.0.1xx-preview7`).

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: kubaflo <kubaflo@users.noreply.github.com>
Copilot-Session: 63594848-5aab-4ffa-8cb0-a64823163037
Copilot-Session: d00747b7-96f3-4e7a-8dfb-e3a48db04b2d
Copilot-Session: 7f87d6b9-cc21-4952-81c7-787a8585ce11
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants