Skip to content

Add preview release versioning and update channel support - #49414

Merged
Boliang Zhang (LegendaryBlair) merged 19 commits into
mainfrom
LegendaryBlair/preview-version
Aug 6, 2026
Merged

Boliang Zhang (LegendaryBlair) merged 19 commits into
mainfrom
LegendaryBlair/preview-version

Conversation

@LegendaryBlair

@LegendaryBlair Boliang Zhang (LegendaryBlair) commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Publish scheduled main builds as GitHub prereleases while keeping manual main runs as preview validation builds.
  • Add an opt-in Settings switch for prerelease update checks; stable updates remain the default.
  • Use one MSI-safe version across bundles, MSI packages, binaries, symbols, and package manifests.
  • Prevent preview releases from triggering Microsoft Store, WinGet, or public-symbol publication.
  • Label preview builds explicitly in Settings, update notifications, and What's New.

Build intent

Source Trigger Intent
main Scheduled Publish a preview release
main Manual Validate a preview build without publishing
stable Manual Produce a stable release
Other branches Any supported trigger Produce a private validation build

MSI-safe release versioning

Windows Installer compares only major.minor.build and ignores the fourth version component. Preview and stable release builds therefore use:

major.minor.YDDDB.0
  • Y: zero-based number of calendar years since ReleaseTrainEpoch.
  • DDD: three-position calendar day of year.
  • B: daily release sequence 1-9.
  • The fourth component is always 0.

With ReleaseTrainVersion=0.100 and ReleaseTrainEpoch=2026-01-01:

0.100.2111.0   = July 30, 2026, release build 1
0.100.3659.0   = December 31, 2026, release build 9
0.100.10011.0  = January 1, 2027, release build 1

The allocator formats DDD as exactly three digits before converting the MSI component to its numeric representation. Leading zeros may not be displayed because Windows version components are numeric; decoding remains positional:

B   = component % 10
DDD = (component / 10) % 1000
Y   = component / 10000

ReleaseTrainVersion and ReleaseTrainEpoch are checked in under src/Version.props. The epoch remains January 1 of the active epoch year and advances on the first release-train minor change in a new year.

Daily release counter

Azure DevOps persists the daily sequence server-side using a counter keyed as release-YYYYMMDD.

  • main and stable share the same daily counter.
  • Other branches do not evaluate or consume the release counter.
  • Failed or canceled main/stable runs may leave gaps.
  • The build fails when the daily sequence exceeds 9.
  • The counter date and encoded YDDD date both use pipeline.startTime.

Private branches retain independent 0.0.<extended-day><NN>.0 validation versions.

Update behavior

  • Stable users continue to query GitHub's stable latest-release path.
  • Users who explicitly enable preview updates can select newer GitHub prereleases.
  • Preview releases and notifications are labeled as PowerToys Preview.
  • What's New separates preview entries from stable release history and hides previews by default.

Validation

  • 17 Pester tests cover main, stable, private branches, year rollover, epoch reset, monotonicity, override validation, sequence limits, and date alignment.
  • Version propagation verified 0.100.2111.0 in Version.props and all affected AppX/MSIX manifests.
  • Azure DevOps pipeline dry-runs succeeded for both refs/heads/main and refs/heads/stable.
  • The affected native version project builds successfully.
  • PR CI is green for x64, ARM64, Command Palette SDK, dependency review, telemetry detection, and CLA.

Remaining end-to-end checks

  • Install two locally or officially produced installers with consecutive MSI-visible YDDDB versions and verify the upgrade preserves binaries, package registrations, hardlinks, and shell integrations.
  • On the first natural post-merge main or stable run, verify the production counter value and resolved version in the release logs.

Local GPO verification

Validated locally with the signed v0.100.2171 build from Azure DevOps build 153961073. These checks cover the administrative-template integration and Settings behavior.

Policy enabled: preview updates are disabled

With PreviewUpdatesDisabled=1, Include prerelease updates is forced off and locked, and Settings displays the managed-by-your-organization notice.

PowerToys Settings with preview updates disabled by policy

Policy removed: the user preference is preserved

After removing PreviewUpdatesDisabled and restarting PowerToys, the previously selected preview-update preference is restored and editable. The policy suppresses the preference without overwriting it.

PowerToys Settings with the preview-update preference restored

Group Policy Editor

After importing the updated ADMX/ADML templates, Disable preview build updates appears under Microsoft PowerToys > Installer and Updates. The policy dialog documents that Enabled blocks preview updates, while Disabled or Not Configured leaves the choice available to the user.

Disable preview build updates in Local Group Policy Editor

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Apply the check-for-updates action payload before starting the runner update check so toggling prerelease updates immediately recalculates the available channel.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Allow preview pipeline inputs such as 0.100.2607.10001-preview while normalizing Windows version metadata to the numeric four-part version.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use braces around the normalized preview version variable so symbol artifact names include the numeric preview version instead of dropping it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@LegendaryBlair
Boliang Zhang (LegendaryBlair) requested a review from a team as a code owner July 20, 2026 08:03
@github-actions github-actions Bot added the Area-Setup/Install Refers to installation mechanism label Jul 20, 2026
@github-actions

Copy link
Copy Markdown

Thank you for contributing to PowerToys. We've detected that this PR might include a new or modified telemetry event. Please ensure the following before merging:

@htcfreek

Copy link
Copy Markdown
Collaborator

There should be a gpo to control (disable) the preview build updates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ad8b7909-0472-4464-bdee-deaeca726f94
Persist prerelease metadata, label preview updates in General and notifications, and keep preview releases in a separate What's New section for eligible users.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ad8b7909-0472-4464-bdee-deaeca726f94
Generate main and stable versions from a checked-in release-train epoch, keep the fourth component zero, and validate MSI limits.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ad8b7909-0472-4464-bdee-deaeca726f94
Use an Azure-managed daily counter shared by main and stable, while keeping private branch versions independent.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ad8b7909-0472-4464-bdee-deaeca726f94
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ad8b7909-0472-4464-bdee-deaeca726f94
Format the day-of-year as three digits before normalizing the MSI version component.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ad8b7909-0472-4464-bdee-deaeca726f94
Accept explicit MSI-safe versions on private branches without enabling preview publication or public symbols.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ad8b7909-0472-4464-bdee-deaeca726f94

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Three small fixes from a self-review pass (all build/logic-verified on a local branch):

  1. Draft-release filter in the prerelease update scan — inline suggestion on src/common/updating/updating.cpp.
  2. SourceCommit fallback — don't write "unknown" when empty — inline suggestions on both versionSetting.ps1 copies (.pipelines/ and tools/build/).
  3. check-spelling will fail on the new identifiers introduced by this PR (YDDDB, YYMM, DDNNN, Mdd, SOURCEBRANCH, SOURCEVERSION, DAILYVERSIONSEQUENCE, VERSIONDATE, YDDD). This PR doesn't touch the spell-check config, so add these to .github/actions/spell-check/allow/code.txt (or expect.txt). (Not inline-suggestable since that file isn't part of this PR's diff.)

Also still open from earlier: Heiko (@htcfreek)'s request for a GPO to disable preview build updates — worth either adding here or explicitly deferring to a follow-up.

…ates

Mirrors the existing AutomaticUpdateDownloadDisabled policy:
- ADMX/ADML DisablePreviewUpdates (registry value PreviewUpdatesDisabled) under
  the Installer and Updates category (+ SUPPORTED_POWERTOYS_0_100_0).
- gpo.h POLICY_DISABLE_PREVIEW_UPDATES + getDisablePreviewUpdatesValue().
- GPOWrapper bridge (GetDisablePreviewUpdatesValue) for the Settings UI.
- Updater enforcement: when the policy is enabled, prerelease updates are forced off.
- Settings UI: grey out the include-prerelease toggle and show the managed-by-
  organization info bar when the policy is configured.

Addresses htcfreek's review request on PR 49414.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8e04a72e-3b0f-4ac4-8156-d04ea9b8bb85
Preserve the environment-based source commit fallback when no explicit commit is supplied, and allowlist the new release versioning identifiers for spell checking.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ad8b7909-0472-4464-bdee-deaeca726f94
Bump ADMX/ADML revision and minRequiredRevision from 1.20 to 1.21 as required when adding a policy, and mark the template as last changed in PowerToys 0.100.0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8e04a72e-3b0f-4ac4-8156-d04ea9b8bb85
@LegendaryBlair
Boliang Zhang (LegendaryBlair) merged commit 558e633 into main Aug 6, 2026
15 checks passed
@LegendaryBlair
Boliang Zhang (LegendaryBlair) deleted the LegendaryBlair/preview-version branch August 6, 2026 15:45
Boliang Zhang (LegendaryBlair) added a commit that referenced this pull request Aug 7, 2026
…49745)

## Summary of the Pull Request

Follow-up to #49414 that fixes two release-pipeline recovery issues:

- Azure DevOps treats an empty runtime string parameter as required, so
`.pipelines/v2/release.yml` now uses `auto` as the default version
override.
- Explicit `main` and `stable` version overrides are resolved before
automatic `YDDDB` generation, allowing a manually versioned build to
proceed after the daily sequence exceeds 9.

## PR Checklist

- [x] **Communication:** This is a follow-up to the reviewed
preview-release versioning design in #49414
- [x] **Tests:** Added/updated and all pass

## Detailed Description of the Pull Request / Additional comments

`auto` is normalized to an empty override in
`.pipelines/resolveBuildMetadata.ps1`, preserving automatic
release-train version generation without requiring input in the Run
Pipeline dialog.

Override parsing is now separated from automatic version generation.
Full explicit versions bypass daily-sequence and generated-date
validation, while automatic versions continue to require a sequence from
1 through 9 and fail closed outside that range.

`.pipelines/tests/resolveBuildMetadata.Tests.ps1` covers scheduled
`main` with the `auto` default, automatic `stable` generation, and
explicit preview/stable recovery when the daily counter has reached 10.

## Validation Steps Performed

- `Invoke-Pester .pipelines\tests\resolveBuildMetadata.Tests.ps1
-EnableExit` — 22 passed
- Confirmed `auto` resolves a first August 7 stable build to
`0.100.2191.0`
- Confirmed explicit `0.101.0` resolves to `0.101.0.0` with daily
sequence 10

Copilot-Session: 8e04a72e-3b0f-4ac4-8156-d04ea9b8bb85
Niels Laute (niels9001) added a commit that referenced this pull request Aug 7, 2026
Supersedes #49719, which cannot be reopened because its original base
branch was deleted after #49414 merged.

## Summary of the Pull Request Improves the update settings introduced
by #49414 by replacing the prerelease checkbox with a dedicated **Update
channel** expander. Users can choose between Stable and Insider
channels, see the current selection while the expander is collapsed, and
access the PowerToys Insider documentation. The new expander preserves
the existing `IncludePrereleaseUpdates` setting and displays its own
managed-by-organization state when the preview update policy is
configured. <img width="1576" height="526" alt="image"
src="https://github.com/user-attachments/assets/35863d4b-5ca1-4662-9d84-f184c98dbbc6"
/> ## PR Checklist - [x] **Communication:** This builds on the update
channel work merged in #49414 - [ ] **Tests:** No automated tests added;
this is a Settings UI presentation change over the existing setting -
[x] **Localization:** All end-user-facing strings can be localized - [ ]
**Documentation updated:** Documentation changes are maintained
separately ## Detailed Description of the Pull Request / Additional
comments - Moves `IncludePrereleaseUpdates` out of the general update
settings list into a dedicated SettingsExpander in
`src/settings-ui/Settings.UI/SettingsXAML/Views/GeneralPage.xaml`. -
Adds Stable and Insider radio-button choices, descriptions, collapsed
status text, and an Insider learn-more link. - Adds localized strings in
`src/settings-ui/Settings.UI/Strings/en-us/Resources.resw`. - Separates
the preview update policy warning from the other update settings
warnings in
`src/settings-ui/Settings.UI/ViewModels/GeneralViewModel.cs`. ##
Validation Steps Performed - Built
`src/settings-ui/Settings.UI/PowerToys.Settings.csproj` for Debug ARM64
with the repository build script. - Applied the repository XAML Styler
configuration to `GeneralPage.xaml`.

---------

Copilot-Session: 4169c03d-5e17-4495-b7b1-8e6af0d6565c
Boliang Zhang (LegendaryBlair) pushed a commit that referenced this pull request Oct 29, 2026
## Summary of the Pull Request

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #51465
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

This change:

- Normalizes the product version that the DSC schema generator writes
into the
`Microsoft.PowerToys.Configure` module to four parts. A new
`GetNormalizedProductVersion()`
helper in `DSCGeneration.cs` is used for both the `.psm1` installation
lookup and the `.psd1`
  `ModuleVersion`.
- Matches the uninstall entry's `DisplayVersion` as a `[System.Version]`
instead of an exact
string, treating missing parts as zero, so `0.102.2933` and
`0.102.2933.0` compare equal. An
  empty or unparsable `DisplayVersion` is skipped instead of throwing.
- Moves the HKLM-then-HKCU uninstall lookup, which was duplicated in the
Debug and Release
templates, into a static `FindPowerToysInstallation()` method on the
`PowerToysConfigure` class.
- Closes #51465.

### PR Context

Since #49414, releases carry a four-part version, and the MSI registers
it as the uninstall
`DisplayVersion` (for example `0.101.2362.0`). The generator took the
version from
`GetProductVersion()`, which omits the fourth part when it is zero, so
the generated `.psm1`
compared against `0.101.2362`. The match never succeeded, and every
`PowerToysConfigure` apply
failed with "PowerToys installation wasn't found." This reproduces on
0.101.2362.0 and, per the
reporter, in the bundled module of 0.102.2933.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Setup/Install Refers to installation mechanism

4 participants