Plan: Update information source mismatch
Problem statement
CI may install 2.0.0-beta while nova update reports 2.0.0-preview9920 as the newest release. This plan treats the issue as an update information source bug: installation and self-update lookup appear to query PowerShell Gallery differently, so Nova may be comparing against a candidate that is not the one actual installs resolve.
Evidence
scripts/build/ci/Install-CiPowerShellModules.ps1 installs CI dependencies with Install-Module -AllowPrerelease, then reports the installed version via Get-InstalledModule.
.github/workflows/Publish.yml and .github/workflows/Tests.yml both rely on that CI install script.
src/resources/update/ModuleUpdateLookup.ps1.txt looks up update candidates with separate Find-Module and Find-Module -AllowPrerelease calls.
src/private/update/InvokeNovaModuleUpdateLookup.ps1 uses that lookup script as the data source for self-update decisions.
src/private/cli/FormatNovaCliCommandResult.ps1 presents the result as newest version available, which can hide source inconsistency.
- The installed
nova launcher currently imports a local module instance that reports version 2.0.0-preview9920 from /Users/stiwi.courage/.local/share/powershell/Modules/NovaModuleTools/2.0.0.
- The gallery currently reports
Find-Module NovaModuleTools -AllowPrerelease as 2.0.0-beta.
Suspected root cause
Nova uses one information source and query shape for installation (Install-Module / Get-InstalledModule) and another for update discovery (Find-Module in a separate script). If PowerShell Gallery or PowerShellGet surfaces prereleases differently across those commands, nova update can advertise a candidate that CI does not actually install.
Files likely involved
scripts/build/ci/Install-CiPowerShellModules.ps1
src/resources/update/ModuleUpdateLookup.ps1.txt
src/private/update/InvokeNovaModuleUpdateLookup.ps1
src/private/update/GetNovaModuleSelfUpdatePlan.ps1
src/private/cli/FormatNovaCliCommandResult.ps1
tests/UpdateNotification.Tests.ps1
.github/workflows/Publish.yml
Implementation steps
- Compare the exact repository and query path used by CI install and self-update lookup.
- Reproduce the mismatch with mocked or captured results where install resolves
2.0.0-beta but lookup returns 2.0.0-preview9920.
- Introduce a single update-candidate resolver shared by CI-oriented install reporting and
nova update.
- Prefer repository APIs and command combinations that mirror real install behavior.
- Expose source details in the update result so Nova can distinguish a lookup candidate from an actually installable latest version.
- Adjust CLI wording to avoid claiming a universal newest version when the result is source-dependent.
Validation steps
- Add regression tests for divergent
Install-Module vs Find-Module results.
- Add tests that verify the resolver returns the same effective latest prerelease as the install path.
- Add tests that no-update messaging stays accurate when lookup and install sources disagree.
- Verify workflow scripts and update helpers reference the same repository assumptions.
Risks
- PowerShellGet and PSGallery behavior may vary by environment and module provider state.
- Aligning lookup with install behavior may require broader adapter changes.
- If gallery metadata is inconsistent, Nova may still need defensive wording even after resolver changes.
Success criteria
- CI install behavior and
nova update point to the same effective latest prerelease for the same repository context.
- Nova no longer reports
preview9920 as the newest version when CI installs beta from the same source path.
- Tests cover both source-alignment and message-accuracy regressions.
Plan: Update information source mismatch
Problem statement
CI may install
2.0.0-betawhilenova updatereports2.0.0-preview9920as the newest release. This plan treats the issue as an update information source bug: installation and self-update lookup appear to query PowerShell Gallery differently, so Nova may be comparing against a candidate that is not the one actual installs resolve.Evidence
scripts/build/ci/Install-CiPowerShellModules.ps1installs CI dependencies withInstall-Module -AllowPrerelease, then reports the installed version viaGet-InstalledModule..github/workflows/Publish.ymland.github/workflows/Tests.ymlboth rely on that CI install script.src/resources/update/ModuleUpdateLookup.ps1.txtlooks up update candidates with separateFind-ModuleandFind-Module -AllowPrereleasecalls.src/private/update/InvokeNovaModuleUpdateLookup.ps1uses that lookup script as the data source for self-update decisions.src/private/cli/FormatNovaCliCommandResult.ps1presents the result asnewest version available, which can hide source inconsistency.novalauncher currently imports a local module instance that reports version2.0.0-preview9920from/Users/stiwi.courage/.local/share/powershell/Modules/NovaModuleTools/2.0.0.Find-Module NovaModuleTools -AllowPrereleaseas2.0.0-beta.Suspected root cause
Nova uses one information source and query shape for installation (
Install-Module/Get-InstalledModule) and another for update discovery (Find-Modulein a separate script). If PowerShell Gallery or PowerShellGet surfaces prereleases differently across those commands,nova updatecan advertise a candidate that CI does not actually install.Files likely involved
scripts/build/ci/Install-CiPowerShellModules.ps1src/resources/update/ModuleUpdateLookup.ps1.txtsrc/private/update/InvokeNovaModuleUpdateLookup.ps1src/private/update/GetNovaModuleSelfUpdatePlan.ps1src/private/cli/FormatNovaCliCommandResult.ps1tests/UpdateNotification.Tests.ps1.github/workflows/Publish.ymlImplementation steps
2.0.0-betabut lookup returns2.0.0-preview9920.nova update.Validation steps
Install-ModulevsFind-Moduleresults.Risks
Success criteria
nova updatepoint to the same effective latest prerelease for the same repository context.preview9920as the newest version when CI installsbetafrom the same source path.