Implement non-blocking baseline packaging (Core + Steps.Common only)#113
Implement non-blocking baseline packaging (Core + Steps.Common only)#113
Conversation
- Remove optional modules from IdLE.psd1 NestedModules (keep only Core and Steps.Common) - Add comprehensive test to verify baseline-only auto-import behavior - Update examples/Invoke-IdleDemo.ps1 to remove redundant Steps.Common import - Update docs/getting-started/installation.md to clarify baseline vs optional modules - Update docs/advanced/releases.md to describe packaging baseline policy Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
- Update Resolve-IdleStepHandler to properly resolve module-qualified commands - Support both global and nested module command lookup - Fixes step execution when steps are loaded as nested modules Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
- Optimize module lookup to avoid unnecessary pipeline operations - Add clarifying comment to test about explicit module list - Address code review feedback Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
blindzero
left a comment
There was a problem hiding this comment.
@copilot do we have to change anything in the tests in general to make sure the required stuff is imported (e.g. mock, ...)?
- Generalize baseline test to use pattern matching instead of explicit module list - Move baseline vs optional policy from releases.md to installation.md (reference only) - Add count check to ensure exactly 2 nested modules - Maintain test isolation by only removing specific modules Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
No changes needed in tests. The test helper ( |
- Define baseline modules in single array for maintainability - Use foreach loop to validate each baseline module is auto-imported - Use count check with $baselineModules.Count instead of hardcoded value - Clarify cleanup strategy in comments (maintain test isolation) - Addresses PR feedback comments 2725593807 and 2725594726 Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR implements a non-blocking baseline packaging strategy for IdLE, ensuring Import-Module IdLE succeeds on any clean PowerShell 7 environment without external dependencies. Only IdLE.Core and IdLE.Steps.Common are auto-imported as the baseline; all provider modules and optional step packs are shipped but require explicit import.
Changes:
- Reduced auto-imported nested modules to baseline only (Core + Steps.Common)
- Enhanced core engine to resolve module-qualified commands from nested modules
- Added comprehensive test validation for baseline-only auto-import behavior with maintainable pattern matching
- Updated documentation to clearly define baseline vs optional modules policy
- Updated examples to reflect explicit import requirement for optional modules
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/IdLE/IdLE.psd1 | Reduced NestedModules to baseline only (Core, Steps.Common); removed optional provider and step modules |
| src/IdLE.Core/Public/Invoke-IdlePlanObject.ps1 | Enhanced module-qualified command resolution to support nested modules using Get-Module -All and ExportedCommands lookup |
| tests/ModuleSurface.Tests.ps1 | Added comprehensive test with maintainable structure validating baseline-only auto-import using regex pattern matching |
| examples/Invoke-IdleDemo.ps1 | Removed redundant Steps.Common import (now baseline); clarified Mock provider requires explicit import |
| docs/getting-started/installation.md | Documented non-blocking guarantee, baseline vs optional modules policy, and explicit import pattern |
| docs/advanced/releases.md | Referenced installation guide for baseline policy to avoid duplication |
Summary
Ensures
Import-Module IdLEsucceeds on clean PowerShell 7 without RSAT, AD tools, or third-party dependencies. OnlyIdLE.CoreandIdLE.Steps.Commonare auto-imported; provider modules and optional step packs are shipped but require explicit import.Motivation
Current auto-import includes system-dependent providers (AD, DirectorySync.EntraConnect) that block installation on non-Windows or environments without RSAT. This violates the "batteries included, non-blocking baseline" principle.
Type of Change
Changes
Module manifest (baseline definition)
src/IdLE/IdLE.psd1: RemovedIdLE.Steps.DirectorySync,IdLE.Provider.AD,IdLE.Provider.DirectorySync.EntraConnectfromNestedModulesIdLE.Core,IdLE.Steps.Common(auto-imported)IdLE.Steps.DirectorySync,IdLE.Steps.Mailbox(shipped, not auto-imported)Core engine (nested module resolution)
src/IdLE.Core/Public/Invoke-IdlePlanObject.ps1: FixedResolve-IdleStepHandlerto resolve module-qualified commands (e.g.,IdLE.Steps.Common\Invoke-IdleStepEmitEvent) from nested modulesGet-Command -Name "Module\Command"failed for nested modulesGet-Module -All, retrieve fromExportedCommandsDocumentation
docs/getting-started/installation.md: Non-blocking guarantee, baseline vs optional modules policydocs/advanced/releases.md: Reference link to installation guide for baseline policy (moved from inline documentation to avoid duplication)Tests
tests/ModuleSurface.Tests.ps1: Refactored baseline validation test with maintainable structure:$baselineModulesfor easy extension$baselineModules.Countinstead of hardcoded value^IdLE\.(Provider\.|Steps\.(?!Common$))) to detect any optional modulesExamples
examples/Invoke-IdleDemo.ps1: Remove redundantIdLE.Steps.Commonimport (now baseline)Testing
How to test & review
Baseline import (no dependencies required):
Workflow execution (with optional Mock provider):
Packaged artifact:
Test abstraction and maintainability:
Checklist
Related Issues
Per issue instructions, this implements the non-blocking baseline without backward compatibility warnings.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.