Skip to content

feat: add target manifest inspection and unmanaged updates; stabilize cross-platform CI - #7

Merged
stiwicourage merged 9 commits into
mainfrom
develop
Nov 16, 2026
Merged

stiwicourage merged 9 commits into
mainfrom
develop

Conversation

@stiwicourage

Copy link
Copy Markdown
Owner

Summary

  • Add Get-PSModuleUpdateTargetManifest to inspect the exact planned package without installing or importing it. Reject manifest changes between inspection and installation, including same-version republishing.
  • Add the default-off Install-PSModuleUpdate -ReplaceUnmanagedInstallation opt-in for manually copied modules without installation metadata, preserving verification and recovery safeguards.
  • Normalize missing-package discovery to PMU.PackageNotFound, without fallback queries or raw provider diagnostics.
  • Adopt shared powershell-ci@0.2.0 workflows for tests, security and publishing while retaining the local six-lane platform matrix.
  • Stabilize CI with qualified PowerShellGet 2.2.5 in owned runtimes, correct PSResourceGet availability evidence, portable fixtures and expanded regression coverage. Keep the 95% coverage requirement unchanged.
  • Covers all nine commits from main to develop, not only the latest CI repair. Follow-up to Add target manifest inspection, unmanaged installation opt-in, and package-not-found handling #6.

Affected area

  • Public PowerShell cmdlet behavior
  • Scaffolding or project layout
  • Build, test, analyzer, or CI behavior
  • Release, changelog, or versioning flow
  • Contributor documentation
  • End-user documentation
  • Command help
  • Other

Review guidance

  • Start with manifest inspection and its install-time binding in src/private/inspection/, then review the unmanaged-installation opt-in and native worker paths.
  • Review owned runtime provisioning and provenance validation in scripts/build/ci/, especially containment, cleanup and exact provider versions.
  • Review the shared workflow callers, particularly Publish.yml: merging into main triggers publishing. Publishing itself was not executed during verification.
  • Documentation still contains transitional references to shared-workflow develop; the actual callers now use @0.2.0.

Validation

  • Invoke-NovaBuild
  • Test-NovaBuild
  • Targeted validation for the changed path
  • Full repository quality loop
  • Docs-only change; executable validation not needed

Validation notes:

Verified revision: a0fc08d7ae528f213b698b3d6179e6894cc06735

& ./run.ps1 — PASSED in the qualified PowerShell 7.7.0 runtime:
  ScriptAnalyzer, Invoke-NovaBuild, Invoke-NovaTest,
  Test-NovaBuild and text formatting.
  1,052 unit tests passed; 1 existing skip.
  9 integration tests passed; 3 existing live-feed skips.
  Source coverage: 97.04%, target 95%.

Hosted matrix — PASSED: all six lanes, quality, plan and ci-gate.
  Windows: PowerShell 7.4.21 / 7.7.0 — 96.42% / 96.42%
  Linux:   PowerShell 7.4.21 / 7.7.0 — 97.09% / 96.28%
  macOS:   PowerShell 7.4.21 / 7.7.0 — 97.04% / 97.04%
  Zero unit/integration failures; existing platform/live-feed skips remain.

Normal test workflow — PASSED, coverage 97.09%.
Security workflow — PASSED.

Documentation and release follow-up

  • README.md reviewed and updated if needed
  • CONTRIBUTING.md reviewed and updated if needed
  • CHANGELOG.md reviewed and updated if needed
  • RELEASE_NOTE.md reviewed and updated if needed
  • Command help updated if needed
  • End-user docs updated if needed
  • No documentation or release-note updates were needed

Maintainability, compatibility, and risk

  • Maintainability impact considered
  • No breaking change
  • Breaking change
  • CI or release impact

Risk, rollout, or rollback notes:

The new unmanaged-installation behavior requires explicit opt-in.
Existing defaults, exact-target checks and recovery safeguards remain.

Qualified PowerShellGet 2.2.5 is provisioned only inside owned CI runtimes;
ambient installations are unchanged. This does not qualify bundled 2.2.6.

Live/private-feed and successful AllUsers qualification remain outside
this verification. Existing skips were not removed or weakened.

Merging into main triggers the shared publishing workflow. Release metadata
currently contains 0.2.1-preview; confirm the intended release version before merge.

github-actions Bot and others added 9 commits October 27, 2026 17:10
…ckage-not-found handling (#6)

* feat: implement Get-ProviderDiscoveryParameter function and associated tests

* feat: normalize PackageNotFound error handling and update related tests

* feat: Add PMU testing helpers and integration tests for manifest inspection

- Introduced Initialize-PMULocalProviderStart and Initialize-PMUManifestFixture functions for setting up local provider and manifest fixtures.
- Created Invoke-PMUManifestFixture to streamline the invocation of manifest fixtures.
- Implemented various tests for manifest inspection, including Assert-InspectedManifest, Assert-ManifestReadHash, and Assert-ManifestWorkerResult.
- Added tests for handling manifest inspection errors and ensuring proper cleanup of resources.
- Developed integration tests for Get-PSModuleUpdateTargetManifest, validating the behavior of the module update process under various conditions.
- Ensured that all tests adhere to the expected error handling and state management for PMU operations.

* fix: add tests for exact-target inspection native fixture and update skip policy

* feat: Add support for replacing unmanaged installations with explicit consent

- Introduced `Install-PSModuleUpdate -ReplaceUnmanagedInstallation` to allow updates for manually copied installations lacking root `PSGetModuleInfo.xml`.
- Enhanced documentation in CHANGELOG.md, README.md, and RELEASE_NOTE.md to reflect new functionality.
- Updated cmdlet parameters and examples in Install-PSModuleUpdate.md to include the new switch.
- Implemented new helper functions: Get-NativeSnapshotPath, Get-NativeInstallParameter, Get-NativeSelectedSource, and Test-UnmanagedInstallation to support the new feature.
- Added tests to ensure correct behavior for unmanaged installations and consent handling.

* fix: update CodeScene exception comment for clarity on parameter handling
- Implement shared `powershell-ci` workflows for contributor tests, security checks, and publishing.
- Update `Run-Platform-Matrix.yml` to manage platform-specific CI lanes.
- Remove legacy scripts for CodeScene analysis and NovaModuleTools CI.
- Introduce `Security.yml` for unified security checks and dependency reviews.
- Add `dependabot.yml` for automated dependency updates on a weekly schedule.
- Enhance documentation on security models and workflow maps.
- Update tests to validate new workflow structures and shared contracts.
- Updated Invoke-PlatformLane.ps1 to streamline phase invocation by using hashtables for phase parameters.
- Introduced new functions for initializing phase launch and handling child processes.
- Enhanced error handling and logging for CI phases.
- Refactored QualificationProcess.ps1 to improve child process initialization and result handling.
- Simplified QualificationScenario.ps1 by modularizing plan installation and validation.
- Improved test scripts to validate CI workflows and ensure proper dependency isolation.
- Updated tests to reflect changes in the CI lane manifest structure and phase invocation.
…ress and Linux clock frequency

- Implemented `Get-InstallationProgressHost` to retrieve host state information regarding output redirection and interactivity.
- Created `Write-InstallationProgress` to manage progress reporting during installation phases.
- Introduced `Get-LinuxClockTickFrequency` to fetch the Linux process clock frequency, with error handling for command failures.
- Added tests for the new functions to ensure correct behavior and error handling.
- Enhanced existing tests across various modules to improve coverage and validate edge cases, including:
  - Validating directory requests and handling of empty required fields in metadata.
  - Ensuring correct behavior when dealing with repository receipts and package sources.
  - Testing for proper handling of staging and recovery processes.
…ModuleInstallationRoot for improved path resolution
Provision exact PSGallery PowerShellGet 2.2.5 only inside owned runtime extractions and verify its actual child-process import. Preserve engine checksums, runtime identity, the original test topology and the 95% coverage target.

Require native-provider provenance at the aggregate CI gate and cover provisioning, rejection and cleanup contracts.
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

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

Code Health Directives
1 new code health directive

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.

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Coverage Gates Passed
Overall Coverage: 96.6% (required = 95%)
New & Changed Code Coverage: 99.5% (required = 99%)

Review details by gate
  • Overall Coverage

    • Pass/Fail Reason:
      The overall coverage gate was checked for all code and meets the goal: 96.6% covered >= threshold = 95%
    • Action:
      You have 259 files with a sum of 1655 covered and 58 uncovered lines of code.
  • New & Changed Code Coverage

    • Pass/Fail Reason:
      New or changed code meets coverage goal: 99.5% covered >= threshold = 99%
    • Action:
      You modified 42 files, and covered 181 added/modified lines of code.

@stiwicourage
stiwicourage merged commit 3be7d65 into main Nov 16, 2026
31 checks passed
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.

2 participants