Deployment: derive Main/Singleton short tag via canonical v2 helper (experimentalA fix) - #6657
Open
agniuks wants to merge 4 commits into
Open
Deployment: derive Main/Singleton short tag via canonical v2 helper (experimentalA fix)#6657agniuks wants to merge 4 commits into
agniuks wants to merge 4 commits into
Conversation
ExtractFormattedVersionTag in DeploymentManager reconstructed the short channel
tag with its own private rule that appended only a numeric suffix
(swscanf %u). A non-numeric channel suffix such as the trailing "A" in
"experimentalA" was dropped, so GetStatus derived "-e" instead of "-eA",
built a Main/Singleton package family name that never matched the installed
package, reported the runtime as not installed, and forced a spurious repair
that fails with access denied on Server 2019 / RS5.
The v2.x short-tag rule (first character + trailing base-36 [0-9A-Z]{0,2}
suffix) already exists and is used by the DDLM/Bootstrap path via
AppModel::Identity::GetVersionShortTagFromVersionTagV2. Delegate to it instead
of re-deriving. This removes a duplicate implementation, keeps the runtime in
agreement with the build (CreateBuildInfo.ps1), drops std::regex/swscanf from
the packaged-app startup path, and validates the result (throws E_INVALIDARG
on a malformed tag) rather than silently producing a wrong short tag.
Also corrects the MSIXPackages.md spec, which described the suffix as digits
only; it is base-36 (0-9, A-Z).
AB#63309642
AB#62727253
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. |
Contributor
|
Also, is it a new behavior to have experimentalA, experimentalB and etc now? And this should definitely have tests that defines its expected behavior, it is not the first time we had problems with version tags and it would be better to catch them earlier. |
Contributor
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. |
Contributor
Author
It's been the case since semver implementation for 2.0. This is an interim fix to unblock until Chris is back, we've discussed removing the experimental suffix altogether from the NuGet. |
Contributor
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. |
agniuks
requested review from
Jesse Collins (JesseCol) and
Mike Crider (codendone)
July 29, 2026 20:10
Mike Crider (codendone)
approved these changes
Jul 29, 2026
Contributor
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #6656 (which fixed the
experimentalA->-eAshort-tag bug onrelease/2.0-experimentalwith a self-contained regex). This applies the cleaner fix onmainper Jesse Collins (@JesseCol)'s review: instead of adding a third private copy of the short-tag rule, delegate to the canonical v2 helper that the DDLM/Bootstrap path already uses.Background
DeploymentManager::ExtractFormattedVersionTagre-derived the Main/Singleton short channel tag with its own rule that appended only a numeric suffix (swscanf %u). A letter suffix (the "A" inexperimentalA) was dropped, soGetStatusbuilt...WinAppRuntime.Main.2-e_...while the installed package is...WinAppRuntime.Main.2-eA_..., mis-detected the runtime as not installed, and forced a spurious repair that fails with access denied on Server 2019 / RS5 (~40sAppLaunchWaitertimeouts in the CppWinuiPackaged sample tests). Same root cause as bug 63309642 / bug 62727253.Change
ExtractFormattedVersionTagnow delegates toAppModel::Identity::GetVersionShortTagFromVersionTagV2(dev/Common/AppModel.Identity.h), the v2.x rule already used byMddBootstrap.cpp. It derives first-char + trailing base-36[0-9A-Z]{0,2}suffix, which matches the build (CreateBuildInfo.ps1).specs/Deployment/MSIXPackages.md: the short tag was described as "digits"; corrected to base-36 (0-9, A-Z).Why this over the regex in #6656
GetStatusruns from the packaged-app auto-initializer beforewWinMain; this dropsstd::regex/swscanfconstruction cost there.GetVersionShortTagFromVersionTagV2validates viaIsValidVersionShortTagand throwsE_INVALIDARGon a malformed tag instead of silently emitting a wrong short tag (the exact failure mode that was so hard to diagnose).Verification
GetVersionShortTagFromVersionTagV2produces identical output to #6656 and to the build across the tag table (experimental->-e,experimental10->-e10,experimentalA->-eA,experimentalZ->-eZ,experimental1M->-e1M,preview3->-p3,stable->-s). Caller passes the dash-prefixed tag (substr(versionTagPos)); the helper is called on the tag without the dash and the dash is re-prepended.Notes / follow-ups
ExtractFormattedVersionTagor the short-tag helpers. A parity unit test (runtime short-tag == build short-tag over a tag table) is worth adding but needs a TAEF home; deferring rather than bloating this PR.release/2.0-stablestill carries the oldswscanf(no symptom today since it has no version tag, but a snap stable->experimental could reintroduce it). Recommend a defensive port there as well.Bugs: 63309642, 62727253
Investigation and change drafted by an AI assistant on behalf of agniuks; review feedback incorporated from Jesse Collins (@JesseCol).