Skip to content

Bug/138 bug update information source mismatch#140

Merged
stiwicourage merged 3 commits into
developfrom
bug/138-bug-update-information-source-mismatch
Apr 29, 2026
Merged

Bug/138 bug update information source mismatch#140
stiwicourage merged 3 commits into
developfrom
bug/138-bug-update-information-source-mismatch

Conversation

@stiwicourage
Copy link
Copy Markdown
Owner

Summary

  • Aligned the self-update lookup path with the CI install path by pinning both to PSGallery.
  • Preserved lookup candidate metadata inside the self-update plan so update decisions and tests can reason about the same repository-backed result.
  • Kept the user-facing nova update no-update output in its original friendly form (You're up to date!).
  • Added regression coverage for the pinned lookup script and for the no-update CLI path.
  • This change was needed because CI install and nova update lookup were using different implicit source assumptions, which made the update flow harder to reason about and contributed to the earlier mismatch investigation.
  • Follow-up: the prerelease ordering policy for labels such as preview* vs beta* is still a separate concern if Nova needs custom channel precedence.

Affected area

  • nova CLI or command routing
  • Public PowerShell cmdlet behavior
  • Scaffolding or project.json handling
  • Build, test, analyzer, coverage, or CI helper flow
  • Package, raw upload, or package metadata workflow
  • Publish, release, semantic-release, or GitHub Actions automation
  • Self-update or notification preference behavior
  • Contributor documentation (README.md, CONTRIBUTING.md, repository workflow docs)
  • End-user docs (docs/*.html)
  • Command help (docs/NovaModuleTools/en-US/*.md)
  • src/resources/example/
  • Dependency or manifest changes (package.json, workflow dependencies, release tooling)
  • Security-sensitive change
  • Documentation-only change
  • Other

Review guidance

  • Start with src/resources/update/ModuleUpdateLookup.ps1.txt and scripts/build/ci/Install-CiPowerShellModules.ps1 to review the repository pinning.
  • Then review src/private/update/ConvertToNovaModuleSelfUpdatePlan.ps1 and src/private/update/GetNovaModuleSelfUpdatePlan.ps1 for how lookup metadata is preserved through the update plan.
  • Finally review src/private/cli/FormatNovaCliCommandResult.ps1 and tests/UpdateNotification.Tests.ps1 for the restored no-update UX and regression coverage.
  • Primary files touched:
    • scripts/build/ci/Install-CiPowerShellModules.ps1
    • src/resources/update/ModuleUpdateLookup.ps1.txt
    • src/private/update/ConvertToNovaModuleSelfUpdatePlan.ps1
    • src/private/update/GetNovaModuleSelfUpdatePlan.ps1
    • src/private/cli/FormatNovaCliCommandResult.ps1
    • tests/UpdateNotification.Tests.ps1
  • Trade-off: the implementation aligns the source assumptions and keeps the friendly CLI wording, but it does not introduce a custom prerelease ordering policy across labels.

Validation

  • Invoke-NovaBuild
  • Test-NovaBuild
  • ./scripts/build/Invoke-ScriptAnalyzerCI.ps1
  • ./scripts/build/ci/Invoke-NovaModuleToolsCI.ps1
  • Targeted Nova workflow validated (% nova build, % nova test, % nova merge, % nova deploy,
    % nova publish,
    % nova release, % nova update, % nova notification, or % nova init as relevant)
  • Docs/example only; executable validation not needed

Validation notes:

Focused self-update coverage:

cd "/Users/stiwi.courage/workspace/couragedk/NovaModuleTools" && \
  pwsh -NoLogo -NoProfile -Command 'Import-Module NovaModuleTools -Force; Invoke-NovaBuild; Invoke-Pester ./tests/UpdateNotification.Tests.ps1 -Output Detailed' | cat

Result:
- Tests Passed: 51, Failed: 0

Additional module-level regression check:

cd "/Users/stiwi.courage/workspace/couragedk/NovaModuleTools" && \
  pwsh -NoLogo -NoProfile -Command 'Import-Module NovaModuleTools -Force; Invoke-NovaBuild; Invoke-Pester ./tests/Module.Tests.ps1 -Output Detailed' | cat

Result:
- Tests Passed: 4, Failed: 0

Direct built-module update workflow check:

cd "/Users/stiwi.courage/workspace/couragedk/NovaModuleTools" && \
  pwsh -NoLogo -NoProfile -Command 'Import-Module NovaModuleTools -Force; Invoke-NovaBuild; Remove-Module NovaModuleTools -ErrorAction SilentlyContinue; Import-Module ./dist/NovaModuleTools -Force; $result = @(Invoke-NovaCli update -WhatIf); $result | ForEach-Object { $_ }' | cat

Observed output:
- You're up to date!
- NovaModuleTools 2.0.0-beta01 is currently the newest version available.

Code Health reviews for the touched CLI/test files returned 10.0, and the pre-commit Code Health safeguard passed.

Documentation and release follow-up

  • README.md reviewed and updated if contributor workflow, architecture, CI, release, or automation changed
  • CONTRIBUTING.md reviewed and updated if contribution expectations or review guidance changed
  • CHANGELOG.md reviewed and updated if the change matters to users, maintainers, or contributors
  • docs/NovaModuleTools/en-US/ help updated if a public command or CLI behavior changed
  • docs/*.html updated if end-user workflows or examples changed
  • src/resources/example/ reviewed and updated if the real-world project layout, package model, or upload workflow
    changed
  • No documentation, changelog, or example updates were needed

Maintainability, compatibility, and risk

  • Code Health / maintainability impact considered
  • No breaking change
  • Breaking change
  • Security-sensitive change
  • CI, workflow, or release-pipeline impact
  • Dependency-review impact

Risk, rollout, or rollback notes:

Compatibility impact is low: the change pins the install and lookup path to PSGallery and keeps the original no-update CLI wording.

Rollback is straightforward:
- remove the explicit `-Repository PSGallery` pinning in the CI installer and lookup script
- drop the lookup metadata fields from the self-update plan adapter
- remove the related regression tests in `tests/UpdateNotification.Tests.ps1`

Known limitation / follow-up:
- if Nova needs `preview*` and `beta*` to follow a custom release-channel order rather than raw SemVer prerelease ordering, that should be handled in a separate follow-up change.

Important

Do not use a public pull request to disclose a vulnerability before coordinated handling.
Use the private reporting path in SECURITY.md for new security issues.

- Update `% nova update` to accurately report the current `PSGallery` lookup candidate.
- Modify self-update plan functions to preserve lookup candidate and repository information.
- Enhance no-update output to reflect the latest update candidate instead of falsely claiming the installed version is the newest.
- Simplify output for no updates available
- Remove outdated information about update candidates
@stiwicourage stiwicourage linked an issue Apr 29, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

codescene-delta-analysis[bot]

This comment was marked as outdated.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

- verify empty lookup fields when no result is available
- ensure fallback to SourceRepository when candidate omits Repository
Copy link
Copy Markdown

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Choose a reason for hiding this comment

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

Gates Passed
6 Quality Gates Passed

See analysis details in CodeScene

Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@stiwicourage stiwicourage merged commit 363d533 into develop Apr 29, 2026
12 checks passed
stiwicourage added a commit that referenced this pull request Apr 29, 2026
- Set Node.js engine requirement to >=22.14.0 in package.json and package-lock.json
- Update Publish.yml to provision Node.js 22.14.0 for semantic-release
- Add note in README.md regarding Node.js version requirement for release automation
github-actions Bot pushed a commit that referenced this pull request Apr 29, 2026
# [2.0.0](Version_1.9.1...Version_2.0.0) (2026-04-29)

* Standardize Nova command model, enhance workflows, and update docs ([#27](#27)) ([e627d4c](e627d4c)), closes [#6](#6) [#8](#8) [#9](#9) [#10](#10) [#11](#11) [#12](#12) [#13](#13) [#14](#14) [#15](#15)

### Bug Fixes

* **#109:** update CI workflow and test cases ([9f1d950](9f1d950)), closes [#109](#109)
* **#113:** standardize CLI option syntax for `--what-if` and `--confirm` ([#116](#116)) ([787b155](787b155)), closes [#113](#113) [#113](#113)
* **#63:** correct wording in documentation for clarity ([74b9e7e](74b9e7e)), closes [#63](#63)
* **#63:** update CHANGELOG to include UNRELEASED changes for next release ([70b7307](70b7307)), closes [#63](#63)
* **#63:** update documentation for clarity ([d41e22a](d41e22a)), closes [#63](#63)
* **#63:** update NovaModuleTools installation parameters ([787a14b](787a14b)), closes [#63](#63)
* **#66:** update version format in project.json ([653de4e](653de4e)), closes [#66](#66)
* **#75:** improve update command behavior and output ([217e900](217e900)), closes [#75](#75)
* **#75:** update CHANGELOG to remove outdated entries ([7de2df6](7de2df6)), closes [#75](#75)
* **#75:** update dependabot configuration to change update interval ([8164f34](8164f34)), closes [#75](#75)
* **#75:** update Nova test output handling and configuration ([09cba8f](09cba8f)), closes [#75](#75)
* **#75:** update security policy for version support ([bf7185d](bf7185d)), closes [#75](#75)
* **#75:** update version to 2.0.0-prerelease4 in project.json ([2bc6613](2bc6613)), closes [#75](#75)
* **#81:** update tests to verify renamed public commands and remove unapproved verb warnings ([85c4e37](85c4e37)), closes [#81](#81)
* **#90:** improve version bumping functionality ([2ecfd6c](2ecfd6c)), closes [#90](#90)
* **#develop:** update .gitignore to include .tmp-nova-bin directory ([305f77a](305f77a)), closes [#develop](https://github.com/stiwicourage/NovaModuleTools/issues/develop)
* **#develop:** update ProjectUri in project.json to new domain ([c71c4f4](c71c4f4)), closes [#develop](https://github.com/stiwicourage/NovaModuleTools/issues/develop)
* bump to next version ([7c6fceb](7c6fceb))
* improve CodeScene analysis script functionality ([7b7e903](7b7e903))
* Merge remote-tracking branch 'origin/develop' into develop ([d0ba30c](d0ba30c))
* update BuildOptions test support to use global variable ([80acb8f](80acb8f))
* update ProjectUri to point to main branch ([026d236](026d236))

### Features

* **#101:** add Codecov action to upload test results ([484b77e](484b77e)), closes [#101](#101)
* **#101:** add Codecov badge to CONTRIBUTING.md ([1f1ec4d](1f1ec4d)), closes [#101](#101)
* **#101:** bump version to 2.0.0-preview10 ([e95255e](e95255e)), closes [#101](#101)
* **#101:** implement opt-in preview bump mode for nova bump ([#102](#102)) ([b335bda](b335bda)), closes [#101](#101)
* **#101:** update prerelease versioning for nova bump ([8026dde](8026dde)), closes [#101](#101)
* **#104:** implement package upload file selection utilities ([#131](#131)) ([0890639](0890639)), closes [#104](#104)
* **#105:** consolidate CLI helper functions for improved command handling ([#132](#132)) ([9335979](9335979)), closes [#105](#105)
* **#111:** introduce build-before-test option for nova test command ([#118](#118)) ([c33c908](c33c908)), closes [#111](#111) [#111](#111)
* **#112:** clean up PowerShell help content ([#120](#120)) ([707c989](707c989)), closes [#112](#112)
* **#112:** update project version to 2.0.0-preview96 ([88ba978](88ba978)), closes [#112](#112)
* **#112:** update project version to 2.0.0-preview99 ([176456d](176456d)), closes [#112](#112)
* **#120:** add CLI help system with short and long command help forms ([7ffbcc6](7ffbcc6)), closes [#120](#120)
* **#122:** add skip tests option to Publish and ignore main/develop branches in Tests ([#124](#124)) ([1b39325](1b39325)), closes [#122](#122)
* **#122:** enhance CI workflows with continuous integration options ([5f49ab5](5f49ab5)), closes [#122](#122)
* **#133:** update CHANGELOG and project version for beta release ([1f1b36d](1f1b36d)), closes [#133](#133)
* **#140:** update Node.js version requirements for release automation ([6e23423](6e23423)), closes [#140](#140)
* **#177:** add Import-BuiltCiModule script for module import process ([654875c](654875c)), closes [#177](#177)
* **#177:** enhance CI workflows and assertions ([85b5eff](85b5eff)), closes [#177](#177)
* **#177:** enhance CI workflows with verbose output ([27ae413](27ae413)), closes [#177](#177)
* **#177:** enhance module publishing and versioning commands ([402656f](402656f)), closes [#177](#177)
* **#177:** remove Publish-NovaModule command from Publish.yml ([c356f58](c356f58)), closes [#177](#177)
* **#177:** simplify Publish-NovaModule command in Publish.yml ([79ad899](79ad899)), closes [#177](#177)
* **#177:** streamline CI build and versioning commands ([fcb1cbc](fcb1cbc)), closes [#177](#177)
* **#177:** update CI workflow for NovaModuleTools testing ([171105a](171105a)), closes [#177](#177)
* **#177:** update project version to 2.0.0-preview9901 ([bccba76](bccba76)), closes [#177](#177)
* **#177:** update project version to 2.0.0-preview9907 ([48afb27](48afb27)), closes [#177](#177)
* **#177:** update Publish.yml for module publishing process ([7a5475a](7a5475a)), closes [#177](#177)
* **#177:** update Publish.yml for module publishing process ([5ec5e14](5ec5e14)), closes [#177](#177)
* **#177:** update Publish.yml for module publishing process ([877bae1](877bae1)), closes [#177](#177)
* **#63:** add license information to documentation and update links ([c4cc55e](c4cc55e)), closes [#63](#63)
* **#63:** add Release Notes page and update navigation links ([334abaf](334abaf)), closes [#63](#63)
* **#63:** Adding -AllowPrerelease to GitHub Actions installation of NovaModuleTools. ([1abcb3a](1abcb3a)), closes [#63](#63)
* **#63:** enhance site branding and improve documentation links ([7366f91](7366f91)), closes [#63](#63)
* **#63:** update documentation for PowerShell module workflows ([2d7a4cb](2d7a4cb)), closes [#63](#63)
* **#63:** update documentation structure and improve contributor guidance ([7c0e962](7c0e962)), closes [#63](#63)
* **#63:** update NovaModuleTools installation to include -Force option ([3c068ba](3c068ba)), closes [#63](#63)
* **#63:** update project version to 1.10.3 ([fa4b858](fa4b858)), closes [#63](#63)
* **#65:** extend local publish behavior to reload module in PowerShell ([#69](#69)) ([4c2d9c8](4c2d9c8)), closes [#65](#65)
* **#68:** allow users to update NovaModuleTools directly from a Nova command ([#72](#72)) ([06de070](06de070)), closes [#68](#68)
* **#73:** enhance Nova CLI testing support ([#75](#75)) ([643a016](643a016)), closes [#73](#73)
* **#75:** add bug report and feature request templates ([18a5f1b](18a5f1b)), closes [#75](#75)
* **#75:** add Code of Conduct document ([2e3d9a7](2e3d9a7)), closes [#75](#75)
* **#75:** add pull request template and update contributing guidelines ([526ecfc](526ecfc)), closes [#75](#75)
* **#75:** enhance update command feedback and documentation ([40a3bbb](40a3bbb)), closes [#75](#75)
* **#75:** update NovaModuleTools self-update handling and documentation ([493c914](493c914)), closes [#75](#75)
* **#75:** update version and enhance update warning functionality ([70a141e](70a141e)), closes [#75](#75)
* **#89:** add required modules to project configuration ([61565a7](61565a7)), closes [#89](#89)
* **#92:** centralize project.json writing and improve serialization ([#103](#103)) ([a865a91](a865a91)), closes [#92](#92)
* **#94:** add codecov configuration for coverage status target ([17896b9](17896b9)), closes [#94](#94)
* **#94:** add Get-NovaPackageUploadArtifact function and enhance upload invocation orchestration ([6225a75](6225a75)), closes [#94](#94)
* **#94:** add Get-NovaPackageUploadTargetSettingBundle function and update target resolution logic ([0fd8c0e](0fd8c0e)), closes [#94](#94)
* **#94:** add test for Get-NovaModuleSelfUpdateWorkflowContext error handling ([c51bef2](c51bef2)), closes [#94](#94)
* **#94:** clarify boundaries between public commands, domain logic, and infrastructure concerns ([3da9b97](3da9b97)), closes [#94](#94)
* **#94:** clarify command layering and enhance CLI invocation handling ([396b4b4](396b4b4)), closes [#94](#94)
* **#94:** clarify command layering and enhance notification preference handling ([8bbed2b](8bbed2b)), closes [#94](#94)
* **#94:** clarify command layering and enhance Nova module initialization workflows ([02f9dcd](02f9dcd)), closes [#94](#94)
* **#94:** clarify command layering and introduce Nova CLI installation workflow ([7df398c](7df398c)), closes [#94](#94)
* **#94:** clarify command layering and introduce project info context functions ([df9d0b1](df9d0b1)), closes [#94](#94)
* **#94:** clarify command layering and introduce self-update workflow context functions ([5a83ae2](5a83ae2)), closes [#94](#94)
* **#94:** clarify notification preference command layering and introduce context functions ([d069c55](d069c55)), closes [#94](#94)
* **#94:** clarify package workflow orchestration and context handling ([a0e51fe](a0e51fe)), closes [#94](#94)
* **#94:** clarify Test-NovaBuild orchestration and improve workflow context handling ([c146eba](c146eba)), closes [#94](#94)
* **#94:** enhance Deploy-NovaPackage orchestration and workflow context handling ([b11a2f1](b11a2f1)), closes [#94](#94)
* **#94:** enhance Nova package upload and workflow context tests ([98cd6b2](98cd6b2)), closes [#94](#94)
* **#94:** enhance NovaPackage upload logic and testing ([ed88091](ed88091)), closes [#94](#94)
* **#94:** enhance version update workflow and clarify command orchestration ([4d9e94a](4d9e94a)), closes [#94](#94)
* **#94:** refactor build process to improve project info handling ([b06fb60](b06fb60)), closes [#94](#94)
* **#94:** update author details in project manifest ([d1e243a](d1e243a)), closes [#94](#94)
* **#94:** update codecov configuration to include patch target ([b294166](b294166)), closes [#94](#94)
* **#94:** update codecov configuration to include patch target ([cb94147](cb94147)), closes [#94](#94)
* **#94:** update codecov target configuration to use auto ([2371ffc](2371ffc)), closes [#94](#94)
* **#94:** update project version to 2.0.0-preview92 ([8b44b0b](8b44b0b)), closes [#94](#94)
* **#94:** update project version to 2.0.0-preview93 and modify author details ([700b7f3](700b7f3)), closes [#94](#94)
* **#95:** rename GetNovaCliOptions.ps1 to ConvertFromNovaCliArgument.ps1 ([6133d5f](6133d5f)), closes [#95](#95)
* **#96:** centralize configuration and secret resolution for NovaMod… ([#126](#126)) ([3c4d789](3c4d789)), closes [#96](#96) [#96](#96)
* **#97:** clean up output and result contracts for structured data ([#127](#127)) ([75c4e44](75c4e44)), closes [#97](#97) [#97](#97)
* **#98:** refactor CLI argument handling for improved consistency and scalability ([#128](#128)) ([d80c47c](d80c47c)), closes [#98](#98)
* **#99:** enhance adapter architecture for external dependencies ([#129](#129)) ([51d6147](51d6147)), closes [#99](#99) [#99](#99)
* **#develop:** reorganize project structure in README.md ([1830b59](1830b59)), closes [#develop](https://github.com/stiwicourage/NovaModuleTools/issues/develop)
* enhance NovaModuleTools with new features and improvements ([cd812ec](cd812ec))
* enhance release notes page with Markdown support and styling ([184a37b](184a37b))
* enhance test support for BuildOptions and NovaCommandModel ([75ed34e](75ed34e))

### BREAKING CHANGES

* The codebase is now fully centered on the Nova command model instead of a mixed MT/Nova
implementation.
Internal source files were reorganized into clearer areas such as build, CLI, release, shared, scaffold, and duplicate
validation.
Publish-NovaModule and Invoke-NovaRelease now use a cleaner publish flow that resolves targets before build/test
steps run.
New-NovaModule was refactored into smaller pieces, improving maintainability and bringing its Code Health back to
10.0.
README and command documentation were refreshed to consistently use the Nova command names and describe the
CLI/release workflow more clearly.
Release and test automation files were updated to better support the new Nova workflow.
The repository example, local helper workflow, and command documentation were updated to better reflect how
NovaModuleTools
is intended to be used in day-to-day development.
Removed

Removed the legacy MT command implementation in favor of the Nova equivalents, including:
Get-MTProjectInfo
Invoke-MTBuild
Invoke-MTTests
New-MTModule
Publish-MTLocal
Update-MTModuleVersion / UpdateModVersion
Removed the remaining MT-oriented internal layout and replaced it with the reorganized Nova-focused structure.
Replaced legacy MT command documentation with Nova command documentation.
Fixed

Fixed local publishing so Publish-NovaModule -Local no longer falls back to the legacy publish path.
Fixed build-time resource lookup so schema and template files are found in project src/resources when building from
the repository root.
Fixed local publish/release flows so the local module path is resolved before build/test steps can reload helper
functions.
Fixed ShouldProcess support in Update-NovaModuleVersion, Set-NovaModuleVersion, and New-NovaModule.
Fixed ScriptAnalyzer issues caused by empty catch blocks and noncompliant helper naming.
Fixed local test/build support imports and command-model regressions uncovered during the Nova standardization work.
Fixed generated help activation so module and command help can be loaded with Get-Help after build/import.
Fixed manifest handling so unsupported Manifest keys now fail fast with a clear validation error instead of being
silently tolerated.
Documentation

Updated README.md with:
a dedicated Publish-NovaModule section
local and repository publish examples
guidance for importing the built dist module during local development
notes about build-time resource lookup from src/resources
Added README guidance for the working example/ project, stricter manifest validation, built help expectations, and
the
separate ScriptAnalyzer CI workflow.
Replaced the outdated New-NovaModule screenshot in README.md with a concrete project.json example that shows the
expected NovaModuleTools output more clearly.
Refreshed the README.md contribution guidance so contributors are clearly asked to follow the Nova workflow, run the
local quality loop, update documentation, and keep the codebase maintainable.
Renamed and refreshed command documentation to match the Nova command model.
stiwicourage added a commit that referenced this pull request Apr 29, 2026
- Update `Update-NovaModuleVersion -ContinuousIntegration` to fallback to a patch bump when `HEAD` matches the latest tag
- Fix PSGallery publishing on fresh CI runners by bootstrapping the PSResourceGet repository store
- Add `Get-PSResourceRepositoryStoreDirectory` and `Initialize-PSGalleryRepository` functions
github-actions Bot pushed a commit that referenced this pull request Apr 29, 2026
# [2.1.0](Version_2.0.0...Version_2.1.0) (2026-04-29)

### Bug Fixes

* Merge remote-tracking branch 'origin/develop' into develop ([bfc806b](bfc806b))

### Features

* **#140:** enhance release automation and CI support ([6c85b69](6c85b69)), closes [#140](#140)
@stiwicourage stiwicourage deleted the bug/138-bug-update-information-source-mismatch branch May 12, 2026 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Update information source mismatch

1 participant