Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/Action-Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,13 @@ jobs:
if ($installed -ne $requested) {
throw "Failed: expected $requested but got $installed"
}

# For prerelease matrix entries, additionally assert the version string
# contains a prerelease segment so we never silently fall back to stable.
$matrixVersion = '${{ matrix.version }}'
if ($matrixVersion.Trim().ToLower() -eq 'prerelease') {
if ($installed -notmatch '-') {
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The regex pattern -notmatch '-' is less strict than what was specified in both the PR description and the issue requirements.

The PR description states the check should be:

$installed -notmatch '-(preview|rc|alpha|beta)\.'

The issue #18 also specifies:

$installed -match '-preview|-(rc|alpha|beta)\.'

The current implementation only checks for the presence of any hyphen, which could match invalid prerelease identifiers. According to the stored memories about prerelease format, PowerShell prerelease versions should contain specific identifiers like 'preview', 'rc', 'alpha', or 'beta' followed by a dot and number (e.g., '7.4.0-preview.5').

The pattern should be stricter to ensure it matches only valid prerelease identifiers, not any string with a hyphen.

Copilot uses AI. Check for mistakes.
throw "Prerelease validation failed: installed version '$installed' does not contain a prerelease segment."
}
Write-Host "Prerelease check passed: '$installed' contains a prerelease segment."
}
Comment on lines +105 to +111
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The prerelease validation only checks for $matrixVersion -eq 'prerelease', but the test matrix also includes a pinned prerelease version '7.4.0-preview.5' (line 25). According to the issue requirements, pinned versions should only do exact-match comparison, which is already done on lines 99-101. However, if this pinned prerelease version is being tested, there's an inconsistency in validation rigor.

Consider whether pinned prerelease versions should also validate the prerelease format. If the intent is to only validate the dynamically-resolved 'prerelease' entry, this is correct. Otherwise, you could also check if the matrix version itself contains a prerelease identifier and validate that the installed version matches that pattern.

Copilot uses AI. Check for mistakes.