Tests: validate prerelease identifier when matrix version is prerelease#19
Closed
Tests: validate prerelease identifier when matrix version is prerelease#19
prerelease#19Conversation
Copilot started work on behalf of
Marius Storhaug (MariusStorhaug)
February 20, 2026 10:09
View session
Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix version verification for latest and prerelease tests
Tests: validate prerelease identifier when matrix version is Feb 20, 2026
prerelease
Copilot started reviewing on behalf of
Marius Storhaug (MariusStorhaug)
February 20, 2026 10:40
View session
There was a problem hiding this comment.
Pull request overview
This PR adds prerelease identifier validation to the test workflow to ensure that when the matrix entry prerelease is used, the installed PowerShell version is actually a prerelease build and not a stable version that might have been returned incorrectly.
Changes:
- Captures
$isPrereleaseRequestflag before API resolution to preserve the original matrix intent - Adds regex validation to assert prerelease versions contain identifiers like
-previewor-rc - Maintains existing behavior for
latestand pinned version matrix entries
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
The
prereleasematrix entry verified the installed version matched the API-resolved tag, but never asserted the resolved version was actually a prerelease — a stable fallback would pass silently.Changes
$isPrereleaseRequestflag — captured before$requestedis overwritten by the API resolution, so the original matrix intent (prerelease) is preserved for downstream checks.$isPrereleaseRequestistrue, asserts the installed version matches the regex-preview|-(rc|alpha|beta)\., failing explicitly if a stable version slipped through.latestand pinned-version paths are unchanged.Original prompt