Skip to content

⚙️ [Maintenance]: Hard-lock Pester test dependency to 5.8.0 by GUID - #119

Merged
Marius Storhaug (MariusStorhaug) merged 1 commit into
mainfrom
fix/118-hardlock-pester-5.8.0
Jul 5, 2026
Merged

⚙️ [Maintenance]: Hard-lock Pester test dependency to 5.8.0 by GUID#119
Marius Storhaug (MariusStorhaug) merged 1 commit into
mainfrom
fix/118-hardlock-pester-5.8.0

Conversation

@MariusStorhaug

Copy link
Copy Markdown
Member

Hard-locks the Pester test dependency to an exact version pinned by module GUID, replacing the RequiredVersion = '5.7.1' pin that broke test discovery when the runner installed Pester 5.8.0.

#Requires -Modules@{ ModuleName='Pester'; RequiredVersion='5.8.0'; GUID='a699dea5-2c73-4616-a270-1f7abb777e71' }

Why 5.8.0 + GUID

  • Exact version = reproducible and supply-chain-safe (no silent drift to a newer or compromised release).
  • GUID pins module identity (anti-name-squat). Both the version and the GUID are enforced by PowerShell at discovery time (verified locally).
  • No version comment — unlike a GitHub Actions @<sha>, RequiredVersion already states the version in plain text, and #Requires rejects a GUID without a version key.

Files updated: 2 test file(s).

Fixes#118.

Note

This pin fully holds once Invoke-Pester installs the pinned version instead of the latest (today it installs newest, so a future Pester release would re-break exact pins). Tracked in PSModule/Invoke-Pester#68. Part of the dependency-management epic PSModule/Process-PSModule#356.

CopilotAI review requested due to automatic review settings July 5, 2026 17:02
@MariusStorhaugMarius Storhaug (MariusStorhaug) added the NoRelease Do not create a release label Jul 5, 2026
@github-actions

Copy link
Copy Markdown

No Significant Changes Detected

This PR does not contain changes to files that would trigger a new release:

PathDescription
src/**Module source code
README.mdDocumentation

Build, test, and publish stages will be skipped for this PR.

If you believe this is incorrect, please verify that your changes are in the correct locations.

CopilotAI 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

This PR updates the Pester #Requires -Modules directive at the top of the test suites to align with the Pester version currently being installed by the CI runner, addressing discovery failures caused by version conflicts during Pester discovery/import.

Changes:

  • Update #Requires -Modules in test entrypoints from RequiredVersion = '5.7.1' to RequiredVersion = '5.8.0'.
  • Add the Pester module GUID to the #Requires hashtable to pin module identity.

Reviewed changes

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

FileDescription
tests/Context.Tests.ps1Updates the Pester #Requires pin (version + GUID) used during test discovery.
tests/ContextVaults.Tests.ps1Updates the Pester #Requires pin (version + GUID) used during test discovery.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -1,4 +1,4 @@
#Requires -Modules @{ ModuleName = 'Pester'; RequiredVersion = '5.7.1' }
#Requires -Modules @{ ModuleName = 'Pester'; RequiredVersion = '5.8.0'; GUID = 'a699dea5-2c73-4616-a270-1f7abb777e71' }
@@ -1,4 +1,4 @@
#Requires -Modules @{ ModuleName = 'Pester'; RequiredVersion = '5.7.1' }
#Requires -Modules @{ ModuleName = 'Pester'; RequiredVersion = '5.8.0'; GUID = 'a699dea5-2c73-4616-a270-1f7abb777e71' }
@github-actions

Copy link
Copy Markdown

Super-linter summary

LanguageValidation result
CHECKOVPass ✅
GITHUB_ACTIONSPass ✅
GITLEAKSPass ✅
GIT_MERGE_CONFLICT_MARKERSPass ✅
MARKDOWNPass ✅
NATURAL_LANGUAGEPass ✅
POWERSHELLPass ✅
PRE_COMMITPass ✅
SPELL_CODESPELLPass ✅
TRIVYPass ✅
YAMLPass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@MariusStorhaug
Marius Storhaug (MariusStorhaug) merged commit c80a0a0 into mainJul 5, 2026
43 of 44 checks passed
@MariusStorhaug
Marius Storhaug (MariusStorhaug) deleted the fix/118-hardlock-pester-5.8.0 branch July 5, 2026 23:05
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NoReleaseDo not create a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test discovery fails: pinned Pester 5.7.1 conflicts with installed Pester 5.8.0

2 participants

@MariusStorhaug