Skip to content

feat!: ship all first-party modules as a single bundled IdLE package - #326

Merged
blindzero merged 9 commits into
mainfrom
feature/321-bundled-idle-package
Oct 31, 2026
Merged

blindzero merged 9 commits into
mainfrom
feature/321-bundled-idle-package

Conversation

@blindzero

Copy link
Copy Markdown
Owner

Closes #321

Summary

IdLE is now distributed as one PowerShell Gallery package, IdLE, that contains all first-party modules as nested modules (IdLE.Core, IdLE.Steps.Common, IdLE.Steps.DirectorySync, IdLE.Steps.Mailbox, IdLE.Provider.AD, IdLE.Provider.EntraID, IdLE.Provider.ExchangeOnline, IdLE.Provider.DirectorySync.EntraConnect, IdLE.Provider.Mock). The repository layout under src/ is unchanged; only distribution changes.

Changes

  • Bundle definition: src/IdLE/IdLE.psd1 lists all first-party modules in NestedModules. This list is the single source of truth for the bundle content; tools/ModulePublishOrder.psd1 is removed.
  • Public surface: IdLE additionally exports the provider factories New-IdleADIdentityProvider, New-IdleEntraIDIdentityProvider, New-IdleExchangeOnlineProvider, New-IdleEntraConnectDirectorySyncProvider, New-IdleMockIdentityProvider. Step handlers stay internal (module-qualified).
  • Mixed-version guard: IdLE.Init.ps1 (ScriptsToProcess) fails the import if a bundled module name (e.g. IdLE.Provider.AD) is already loaded from a different location. The error lists the modules and the exact Remove-Module / Uninstall-Module commands. Installed-only modules don't trigger warnings.
  • Packaging: tools/New-IdleModulePackage.ps1 only builds the bundle (IdLE/Modules/<Name>/) and rewrites the staged NestedModules entries. -Mode MultiModule, the manifest transformation and the publish ordering are removed.
  • Release workflow: publishes one package. The local PSRepository job installs the bundle and verifies that every bundled module is loaded from the installed package and that the factories are exported.
  • External dependencies stay lazy: a test verifies that Import-Module IdLE loads no non-IdLE module (built-ins from $PSHOME excluded).
  • Help/reference: fixed stale Export-IdlePlan examples (-Workflow/-StepRegistry don't exist), removed blank lines inside provider factory example code (platyPS parsed # comments as headings), regenerated the cmdlet reference including the five factory pages.
  • Docs: installation (incl. migration section), release process, provider reference pages, quickstart, walkthrough, examples.

The repo-layout PSModulePath bootstrap in IdLE.Init.ps1 is kept: it is still needed to import single modules from src/ directly (development/tests) because the step packs declare RequiredModules = 'IdLE.Core'. It is a no-op in the bundled package.

Breaking changes

  • Install-Module IdLE.Provider.* / IdLE.Steps.* / IdLE.Core no longer receive updates → use Install-Module IdLE.
  • Import-Module IdLE.Provider.* / IdLE.Steps.* → use Import-Module IdLE.
  • Importing IdLE fails while a standalone IdLE.* module from another location is loaded.

Migration:

Get-InstalledModule -Name 'IdLE.*' -ErrorAction SilentlyContinue | Uninstall-Module -AllVersions -Force
Install-Module -Name IdLE -Scope CurrentUser
Import-Module -Name IdLE

Import time

Median of 7 fresh pwsh -NoProfile processes, warm, Windows:

Median
Before (main, repo layout) 203 ms
After (repo layout) 302 ms
After (built bundle) 329 ms

Testing

  • Full suite: 886 passed, 2 failed. Both failures also occur on main and are unrelated:
    • Invoke-IdlePlan - ExecutionOptions.Validation.rejects ExecutionOptions with invalid type (parameter binding)
    • Invoke-IdleStepTriggerDirectorySync ... throws error when provider rejects invalid With.PolicyType value
  • New/updated tests: tests/Packaging/New-IdleModulePackage.Tests.ps1 (layout, rewritten paths, import from the built package, factory exports, no external modules), tests/Packaging/ModuleSurface.Tests.ps1, tests/Core/ModuleBootstrap.Tests.ps1 (guard scenarios).
  • examples/Invoke-IdleDemo.ps1 -All runs all mock workflows successfully.
  • Not verified locally: publish/install via a local PSRepository (would modify the local PowerShellGet configuration). This is covered by the psgallery_local_test job in the release workflow.

Follow-up (manual)

After the first bundled release, the package owner unlists the discontinued standalone packages on the PowerShell Gallery.

🤖 Generated with Claude Code

blindzero and others added 4 commits October 31, 2026 18:21
IdLE now loads all first-party modules (engine, step packs, providers) as
nested modules. The NestedModules list in src/IdLE/IdLE.psd1 is the single
source of truth for the bundle content.

- Export the provider factory functions from IdLE.
- Add a mixed-version guard to IdLE.Init.ps1: importing IdLE fails with an
  actionable error if a standalone IdLE.* module from another location is
  already loaded.
- Tests for bundled module loading, factory exports, lazy external
  dependencies and the guard.

BREAKING CHANGE: Import-Module IdLE.Provider.* / IdLE.Steps.* is replaced by
Import-Module IdLE.

Refs #321

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- New-IdleModulePackage.ps1 only builds the bundle (IdLE/Modules/<Name>/)
  and rewrites the staged NestedModules paths; MultiModule mode and the
  manifest transformation are removed.
- Remove tools/ModulePublishOrder.psd1 (bundle content comes from the IdLE
  manifest).
- Release workflow publishes one package; the local PSRepository test
  verifies that all bundled modules load from the installed package.

BREAKING CHANGE: standalone IdLE.* packages are no longer published.

Refs #321

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Export-IdlePlan examples used non-existing New-IdlePlan parameters
  (-Workflow, -StepRegistry).
- Remove blank lines inside provider factory example code; platyPS treated
  the rest as remarks and parsed '#' comments as headings.
- Regenerate the cmdlet reference, now including the provider factories
  exported from IdLE.

Refs #321

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ules

Update installation (incl. migration section), release process, provider
reference pages, quickstart, walkthrough and examples to use
Install-Module/Import-Module IdLE only.

Refs #321

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T17:27:30.122536Z 6d67f07 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Code Coverage Report

Overall Project 74.29% 🍏

There is no coverage information present for the Files changed

@blindzero blindzero self-assigned this Oct 31, 2026
blindzero and others added 5 commits October 31, 2026 18:33
NestedModules entries use '\' ('..\IdLE.Core\IdLE.Core.psd1'), which is not
a path separator on Linux/macOS, so [IO.Path]::GetFileNameWithoutExtension
returned the whole entry. Normalize to '/' before extracting module names
in the tests and in the release workflow's local publish verification
(runs on ubuntu-latest).

Refs #321

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Add the five provider factory cmdlet pages to website/sidebars.js
  (docs consistency audit: orphan docs).
- Wrap regex/hashtable snippets in the provider help in inline code so the
  generated pages contain no bare braces; regenerate the cmdlet reference.

Refs #321

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
platyPS escapes backticks in description text (\`), so inline code is not
recognized and MDX evaluates '{ ... }' as a JavaScript expression. This broke
the Docusaurus build ("Role is not defined") and would have rendered '{36}'
as '36'. Rephrase the three lines without braces and regenerate the cmdlet
reference.

Refs #321

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@blindzero
blindzero merged commit e7e6c50 into main Oct 31, 2026
8 checks passed
@blindzero
blindzero deleted the feature/321-bundled-idle-package branch October 31, 2026 19:55
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.

Ship all first-party modules as a single bundled IdLE package

1 participant