Refactor DirectorySync step to be strictly provider-agnostic#102
Merged
Refactor DirectorySync step to be strictly provider-agnostic#102
Conversation
- Create new IdLE.Steps.DirectorySync module (generic naming) - Move and update Invoke-IdleStepTriggerDirectorySync with provider-neutral help and defaults - Update StepRegistry to register IdLE.Step.TriggerDirectorySync with new module - Update all test references to use new module name - Update documentation to use provider-neutral language - Update meta-module and test helpers to reference new module - Remove old IdLE.Steps.DirectorySync.EntraConnect module Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor steps to enforce provider-agnostic architecture
Refactor DirectorySync step to be strictly provider-agnostic
Jan 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the DirectorySync step pack to be provider-agnostic by removing Entra Connect-specific module naming and documentation, and wiring the generic step pack into the engine and tooling.
Changes:
- Renamed the step pack module from
IdLE.Steps.DirectorySync.EntraConnecttoIdLE.Steps.DirectorySyncand updated manifests/tags accordingly. - Updated
TriggerDirectorySyncstep help text and docs to be provider-neutral. - Updated engine step registry, tooling, and tests to reference the new module name.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Generate-IdleStepReference.ps1 | Updates default scanned step modules to include the new generic DirectorySync pack. |
| tests/_testHelpers.ps1 | Updates test module import path to the new DirectorySync step pack manifest. |
| tests/Invoke-IdleStepTriggerDirectorySync.Tests.ps1 | Updates module-qualified handler strings to the new step pack name. |
| src/IdLE/IdLE.psd1 | Updates nested module reference to load the new DirectorySync step pack. |
| src/IdLE.Steps.DirectorySync/Public/Invoke-IdleStepTriggerDirectorySync.ps1 | Updates comment-based help text/examples to be provider-agnostic. |
| src/IdLE.Steps.DirectorySync/IdLE.Steps.DirectorySync.psm1 | Adds the new module entry point for loading/exporting the step implementation. |
| src/IdLE.Steps.DirectorySync/IdLE.Steps.DirectorySync.psd1 | Updates RootModule/Description/Tags to reflect the generic DirectorySync step pack. |
| src/IdLE.Core/Private/Get-IdleStepRegistry.ps1 | Registers IdLE.Step.TriggerDirectorySync handler from the new DirectorySync module. |
| docs/reference/steps.md | Updates generated step reference synopsis to provider-neutral wording. |
blindzero
approved these changes
Jan 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enforces architectural rule Steps → StepTypes → RequiredCapabilities ← Providers by eliminating provider-specific naming and defaults from the DirectorySync step pack.
Motivation
Step packs contained product-specific naming (
IdLE.Steps.DirectorySync.EntraConnect) and defaults (AuthSessionName = 'EntraConnect'), violating provider-agnosticism. This prevents adding a second DirectorySync provider without modifying step code.Type of Change
Changes
Module structure
IdLE.Steps.DirectorySync.EntraConnect→IdLE.Steps.DirectorySyncStep implementation
AuthSessionName = 'DirectorySync'Engine integration
IdLE.Step.TriggerDirectorySyncregistration toGet-IdleStepRegistry.ps1IdLE.psd1nested modules referenceExample:
Testing
How to test & review
IdLE.Steps.DirectorySyncimports cleanly./tools/Invoke-IdlePesterTests.ps1 -TestPath tests/Invoke-IdleStepTriggerDirectorySync.Tests.ps1Checklist
Related Issues
Implements architectural strictness for provider-agnostic steps as defined in
AGENTS.md§ 4.2.Original prompt
This section details on the original issue you should resolve
<issue_title>Refactor Steps to be strictly provider-agnostic (StepTypes -> Capabilities <- Providers)</issue_title>
<issue_description>## Summary
We want to strictly enforce the architectural rule:
Steps → StepTypes → RequiredCapabilities ← Providers
Steps must be fully provider-agnostic:
A repository review shows one primary violation of this strictness:
TriggerDirectorySyncstep implementation is provider-agnostic in code, but the step pack and documentation are Entra Connect-specific:IdLE.Steps.DirectorySync.EntraConnectAuthSessionNameisEntraConnectThis issue refactors the DirectorySync step pack to be generic and updates all references accordingly.
Motivation / Rationale
Scope
In scope
TriggerDirectorySyncstep to be strictly generic.Out of scope
IdLE.DirectorySync.*).Current findings (what violates strict generic Steps)
1) Provider-specific step pack naming
src/IdLE.Steps.DirectorySync.EntraConnect/*is provider/product-specific by name.2) Provider-specific wording and defaults inside the step
Invoke-IdleStepTriggerDirectorySync:Name = 'Trigger Entra Connect sync'AuthSessionName = 'EntraConnect'3) Documentation inherits provider specificity
docs/reference/steps.mddescribesTriggerDirectorySyncas “Triggers an Entra Connect directory sync cycle …”.Target state (definition)
Step pack & step implementation
IdLE.Steps.DirectorySyncIdLE.Step.TriggerDirectorySyncIdLE.DirectorySync.Trigger,IdLE.DirectorySync.StatusStartSyncCycle(PolicyType, AuthSession)GetSyncCycleState(AuthSession)AuthSessionNameshould be generic (e.g.,DirectorySync) or omitted (null) so workflows/templates set it explicitly.Nameshould be provider-neutral (e.g., “Trigger directory sync”).Templates remain provider-specific (allowed)
DirectorySync)EntraConnect)This provider specificity must not leak into Step packs.
Acceptance criteria
Strict provider-agnostic steps
IdLE.Steps.DirectorySynccontainsInvoke-IdleStepTriggerDirectorySync(same StepType, generic wording).Engine discovery / StepRegistry
Get-IdleStepRegistryauto-registersIdLE.Step.TriggerDirectorySyncwhenIdLE.Steps.DirectorySyncis loaded:IdLE.Steps.Common).Tests
Invoke-IdleStepTriggerDirectorySync.Tests.ps1referencesIdLE.Steps.DirectorySync(not EntraConnect).Documentation
docs/reference/steps.mdupdatesTriggerDirectorySyncdescription to provider-neutral wording.IdLE.Steps.DirectorySync.EntraConnectare removed or replaced with:Compatibility
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.