Skip to content

Include all batteries-included modules in IdLE package#127

Merged
blindzero merged 5 commits intomainfrom
copilot/fix-missing-modules-in-idle-package
Jan 30, 2026
Merged

Include all batteries-included modules in IdLE package#127
blindzero merged 5 commits intomainfrom
copilot/fix-missing-modules-in-idle-package

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 30, 2026

Summary

IdLE package published to PowerShell Gallery only contained IdLE.Core and IdLE.Steps.Common. Users installing via Install-Module -Name IdLE received an incomplete package missing 6 additional modules documented in docs/use/installation.md.

Motivation

Package manifest hardcoded defaults to 2 of 8 modules. Users couldn't access provider and step modules without separate installations, contradicting documented behavior. Additionally, the original implementation would have auto-imported all modules, breaking the documented "non-blocking guarantee" for optional providers with external dependencies.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring / internal improvement

Changes

  • Added new $IncludeModuleNames parameter to tools/New-IdleModulePackage.ps1 to control which modules are physically copied into the package (defaults to all 8 batteries-included modules)
  • Kept $NestedModuleNames parameter to control which modules are auto-imported when users run Import-Module IdLE (remains baseline 2 modules: IdLE.Core and IdLE.Steps.Common)
  • Updated script logic to use $IncludeModuleNames for copying modules into package and $NestedModuleNames for updating manifest NestedModules array
  • Updated .github/workflows/release.yml version validation to check all packaged modules
  • Updated parameter documentation to clarify the distinction between package contents and auto-import behavior

This approach ensures all modules are available in the package for manual import (e.g., Import-Module IdLE.Provider.AD) while preserving the non-blocking guarantee that Import-Module IdLE succeeds without external dependencies.

Note: IdLE.Provider.Mock remains published separately for PowerShell Gallery discoverability.

Testing

  • Unit tests
  • Contract tests
  • Manual testing

How to test & review

Build package locally and verify all 8 modules present:

./tools/New-IdleModulePackage.ps1 -Clean
Get-ChildItem ./artifacts/IdLE/Modules -Directory | Select-Object Name

Import and verify only baseline modules are auto-imported:

Import-Module ./artifacts/IdLE/IdLE.psd1
Get-Module | Where-Object { $_.Name -like 'IdLE*' }
# Should show only: IdLE, IdLE.Init

Verify optional modules can be manually imported:

Import-Module ./artifacts/IdLE/Modules/IdLE.Provider.AD/IdLE.Provider.AD.psd1
Get-Module IdLE.Provider.AD
# Should successfully import

Checklist

  • Code follows STYLEGUIDE.md
  • Tests added or updated
  • Documentation updated
  • No UI/auth logic added to IdLE.Core
  • No breaking changes without discussion

Related Issues

Addresses packaging discrepancy where published module lacked documented batteries-included modules while preserving non-blocking guarantee for baseline imports.

Original prompt

This section details on the original issue you should resolve

<issue_title>Only batteries-included modules in package</issue_title>
<issue_description>## Description

The IdLE package only includes IdLE.Core and IdLE.Steps.Common.
No further Steps or Providers are included.

Steps to Reproduce

  1. Install-Module -Name IdLE -Scope CurrentUser
  2. cd ~\Documents\PowerShell\Modules\IdLE<version>\Modules
  3. dir

Expected Behavior

All additional modules and steps should be included in package.

Actual Behavior

Missing additional modules and steps</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix missing additional modules in IdLE package Include all batteries-included modules in IdLE package Jan 30, 2026
Copilot AI requested a review from blindzero January 30, 2026 23:21
@blindzero blindzero marked this pull request as ready for review January 30, 2026 23:23
Copilot AI review requested due to automatic review settings January 30, 2026 23:23
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request attempts to fix a bug where the IdLE package published to PowerShell Gallery only contained 2 of 8 documented modules. However, the implementation has a critical flaw that breaks the documented "batteries-included but not auto-imported" behavior for optional modules.

Changes:

  • Updated tools/New-IdleModulePackage.ps1 to include 6 additional modules in the default package
  • Updated .github/workflows/release.yml version validation to check all 8 packaged modules

Reviewed changes

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

File Description
tools/New-IdleModulePackage.ps1 Added 6 modules to default $NestedModuleNames parameter, which causes them to be both included in the package AND auto-imported
.github/workflows/release.yml Added 6 module manifests to version validation list (appropriate for ensuring version consistency)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Owner

@blindzero blindzero left a comment

Choose a reason for hiding this comment

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

I want to provide a package that has all submodules on board when users install by Install-Module -Name IdLE. But auto-import behavior should not change. They should be available for manual Import-Module -Name Idle.Provider.AD as an example, although this provider is not automatically imported when performing Import-Module.

Copilot AI and others added 2 commits January 30, 2026 23:36
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
…uplication

Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 30, 2026

I want to provide a package that has all submodules on board when users install by Install-Module -Name IdLE. But auto-import behavior should not change. They should be available for manual `Import-...

Fixed in 608ff60 and 6276b29. The package now includes all 8 modules physically (can be installed via Install-Module -Name IdLE), but only the baseline modules (IdLE.Core, IdLE.Steps.Common) are auto-imported. Optional providers like IdLE.Provider.AD are available for manual Import-Module without breaking the non-blocking guarantee.

@blindzero blindzero merged commit b7e86bc into main Jan 30, 2026
10 checks passed
@blindzero blindzero deleted the copilot/fix-missing-modules-in-idle-package branch January 31, 2026 22:53
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.

Only batteries-included modules in package

3 participants