Plan: Fix CI dependency installation warning
Problem statement
./scripts/build/ci/Install-CiPowerShellModules.ps1 installs NovaModuleTools from PSGallery with -AllowPrerelease, but the installation warns that Pester 5.7.1 is currently in use. The current behavior suggests CI is relying on manifest-driven dependency resolution during the parent module install instead of handling Pester explicitly. The fix should make dependency installation predictable, warning-free, and aligned with how the module actually uses Pester.
Evidence
scripts/build/ci/Install-CiPowerShellModules.ps1 only installs NovaModuleTools via Install-CiModule, using Install-Module -AllowPrerelease -Scope CurrentUser -Force, then reports the result with Get-InstalledModule.
project.json declares Manifest.RequiredModules for Pester 5.7.1 and Microsoft.PowerShell.PlatyPS 1.0.1.
src/private/build/BuildManifest.ps1 copies project.json manifest settings into the generated module manifest through Build-Manifest, and emits prerelease metadata from version 2.0.0-beta.
scripts/build/ci/Invoke-NovaModuleToolsCI.ps1 later imports both NovaModuleTools and Pester, confirming CI expects Pester separately at execution time.
src/private/quality/GetNovaTestWorkflowContext.ps1 uses New-PesterConfiguration, and the related Pester workflow depends on Pester being available when test commands run.
src/private/build/BuildHelp.ps1 handles Microsoft.PowerShell.PlatyPS as an on-demand dependency check, which is a useful contrast to the current manifest-driven Pester behavior.
Suspected root cause
Installing NovaModuleTools 2.0.0-beta from PSGallery also processes its published RequiredModules. Because Pester 5.7.1 is listed there, Install-Module tries to satisfy or update Pester during the parent install. If that exact dependency is already loaded or locked by the session or runner image, PowerShellGet emits the currently in use warning. The repo-controlled cause is that the installer hides dependency handling behind the module manifest instead of making Pester installation and usage explicit.
Files likely involved
scripts/build/ci/Install-CiPowerShellModules.ps1
project.json
src/private/build/BuildManifest.ps1
scripts/build/ci/Invoke-NovaModuleToolsCI.ps1
src/private/quality/GetNovaTestWorkflowContext.ps1
src/private/build/BuildHelp.ps1
tests/CoverageGaps.BuildInternals.Tests.ps1
tests/Module.Tests.ps1
.github/workflows/Tests.yml
.github/workflows/Publish.yml
Implementation steps
- Confirm the generated and published
NovaModuleTools manifest still includes Pester 5.7.1 in RequiredModules, and verify that this dependency path is what Install-Module is resolving during CI install.
- Change the dependency strategy so
Pester is handled explicitly instead of only through the published manifest, and prefer treating it as a test or runtime-on-demand dependency similar to how Build-Help checks for PlatyPS.
- Update
project.json and the Build-Manifest inputs so the published manifest no longer forces unnecessary Pester installation during Install-Module NovaModuleTools, unless a strict runtime dependency is still required.
- Add an explicit availability check for
Pester in the test workflow entrypoint so test commands fail with a clear message if Pester is not installed.
- Update
scripts/build/ci/Install-CiPowerShellModules.ps1 to install direct CI dependencies intentionally, log what is being installed or skipped, and avoid hidden dependency churn during the NovaModuleTools install.
- Add regression coverage for both manifest generation and CI installer behavior so prerelease builds continue to publish the intended metadata without reintroducing the warning.
Validation steps
- Run
./scripts/build/ci/Install-CiPowerShellModules.ps1 in a clean pwsh session and confirm the Pester 5.7.1 is currently in use warning no longer appears.
- Inspect the built module manifest after
Invoke-NovaBuild and confirm RequiredModules reflects the intended post-fix dependency model.
- Run
./scripts/build/ci/Invoke-NovaModuleToolsCI.ps1 -OutputDirectory ./artifacts and confirm Import-Module NovaModuleTools and Import-Module Pester still succeed.
- Run the affected Pester coverage around manifest generation and any new CI installer tests to confirm the dependency flow is stable for prerelease builds.
Risks
- Removing
Pester from RequiredModules may break Test-NovaBuild for users who relied on automatic dependency installation.
- PowerShellGet and PSGallery behavior can vary by runner image, startup profile, or preloaded modules.
- Changing manifest dependencies affects both CI install behavior and published consumer experience, so build and publish paths must stay aligned.
Success criteria
- Installing
NovaModuleTools 2.0.0-beta in CI no longer emits the Pester 5.7.1 is currently in use warning.
- The dependency model is explicit: install-time behavior, manifest metadata, and test-time runtime checks all agree.
- CI and publish workflows continue to build, import, and test
NovaModuleTools successfully after the dependency handling change.
Plan: Fix CI dependency installation warning
Problem statement
./scripts/build/ci/Install-CiPowerShellModules.ps1installsNovaModuleToolsfrom PSGallery with-AllowPrerelease, but the installation warns thatPester 5.7.1is currently in use. The current behavior suggests CI is relying on manifest-driven dependency resolution during the parent module install instead of handlingPesterexplicitly. The fix should make dependency installation predictable, warning-free, and aligned with how the module actually usesPester.Evidence
scripts/build/ci/Install-CiPowerShellModules.ps1only installsNovaModuleToolsviaInstall-CiModule, usingInstall-Module -AllowPrerelease -Scope CurrentUser -Force, then reports the result withGet-InstalledModule.project.jsondeclaresManifest.RequiredModulesforPester5.7.1andMicrosoft.PowerShell.PlatyPS1.0.1.src/private/build/BuildManifest.ps1copiesproject.jsonmanifest settings into the generated module manifest throughBuild-Manifest, and emits prerelease metadata from version2.0.0-beta.scripts/build/ci/Invoke-NovaModuleToolsCI.ps1later imports bothNovaModuleToolsandPester, confirming CI expectsPesterseparately at execution time.src/private/quality/GetNovaTestWorkflowContext.ps1usesNew-PesterConfiguration, and the related Pester workflow depends onPesterbeing available when test commands run.src/private/build/BuildHelp.ps1handlesMicrosoft.PowerShell.PlatyPSas an on-demand dependency check, which is a useful contrast to the current manifest-drivenPesterbehavior.Suspected root cause
Installing
NovaModuleTools 2.0.0-betafrom PSGallery also processes its publishedRequiredModules. BecausePester 5.7.1is listed there,Install-Moduletries to satisfy or updatePesterduring the parent install. If that exact dependency is already loaded or locked by the session or runner image, PowerShellGet emits thecurrently in usewarning. The repo-controlled cause is that the installer hides dependency handling behind the module manifest instead of makingPesterinstallation and usage explicit.Files likely involved
scripts/build/ci/Install-CiPowerShellModules.ps1project.jsonsrc/private/build/BuildManifest.ps1scripts/build/ci/Invoke-NovaModuleToolsCI.ps1src/private/quality/GetNovaTestWorkflowContext.ps1src/private/build/BuildHelp.ps1tests/CoverageGaps.BuildInternals.Tests.ps1tests/Module.Tests.ps1.github/workflows/Tests.yml.github/workflows/Publish.ymlImplementation steps
NovaModuleToolsmanifest still includesPester 5.7.1inRequiredModules, and verify that this dependency path is whatInstall-Moduleis resolving during CI install.Pesteris handled explicitly instead of only through the published manifest, and prefer treating it as a test or runtime-on-demand dependency similar to howBuild-Helpchecks forPlatyPS.project.jsonand theBuild-Manifestinputs so the published manifest no longer forces unnecessaryPesterinstallation duringInstall-Module NovaModuleTools, unless a strict runtime dependency is still required.Pesterin the test workflow entrypoint so test commands fail with a clear message ifPesteris not installed.scripts/build/ci/Install-CiPowerShellModules.ps1to install direct CI dependencies intentionally, log what is being installed or skipped, and avoid hidden dependency churn during theNovaModuleToolsinstall.Validation steps
./scripts/build/ci/Install-CiPowerShellModules.ps1in a cleanpwshsession and confirm thePester 5.7.1 is currently in usewarning no longer appears.Invoke-NovaBuildand confirmRequiredModulesreflects the intended post-fix dependency model../scripts/build/ci/Invoke-NovaModuleToolsCI.ps1 -OutputDirectory ./artifactsand confirmImport-Module NovaModuleToolsandImport-Module Pesterstill succeed.Risks
PesterfromRequiredModulesmay breakTest-NovaBuildfor users who relied on automatic dependency installation.Success criteria
NovaModuleTools 2.0.0-betain CI no longer emits thePester 5.7.1 is currently in usewarning.NovaModuleToolssuccessfully after the dependency handling change.