Conversation
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
…tep.EnsureAttributes with new Attributes hashtable syntax Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
…nsureAttributes Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Done. Removed all deprecated/legacy references to Removed:
Updated (30 files):
✅ Zero deprecated references remain |
…ment example Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
This PR completes the migration away from the deprecated singular IdLE.Step.EnsureAttribute step type by removing its implementation and updating the engine registry, step metadata, tests, examples, and documentation to use the plural IdLE.Step.EnsureAttributes step with an Attributes hashtable.
Changes:
- Added
Invoke-IdleStepEnsureAttributesstep handler (with provider fast-path + fallback to per-attribute calls). - Removed
Invoke-IdleStepEnsureAttributeand updated step registry/metadata/module exports to only exposeEnsureAttributes. - Updated tests, docs, and workflow examples to use
IdLE.Step.EnsureAttributes+With.Attributes.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Steps/Invoke-IdleStepEnsureAttributes.Tests.ps1 | Adds coverage for new built-in step handler, including fast-path and fallback behavior. |
| tests/Steps/Invoke-IdleStepAuthSession.Tests.ps1 | Updates auth-session routing tests to call Invoke-IdleStepEnsureAttributes and use With.Attributes. |
| tests/Packaging/ModuleSurface.Tests.ps1 | Updates module surface expectations to export/register EnsureAttributes. |
| tests/Core/New-IdlePlan.Tests.ps1 | Adjusts planning tests to account for EnsureAttributes capability requirements. |
| tests/Core/Invoke-IdlePlan.Tests.ps1 | Adjusts execution tests to account for EnsureAttributes capability requirements. |
| src/IdLE.Steps.Common/Public/Invoke-IdleStepEnsureAttributes.ps1 | Introduces the new plural step implementation. |
| src/IdLE.Steps.Common/Public/Invoke-IdleStepEnsureAttribute.ps1 | Removes deprecated singular step implementation. |
| src/IdLE.Steps.Common/Public/Get-IdleStepMetadataCatalog.ps1 | Updates step metadata catalog entry to IdLE.Step.EnsureAttributes. |
| src/IdLE.Steps.Common/IdLE.Steps.Common.psm1 | Updates exports to expose Invoke-IdleStepEnsureAttributes. |
| src/IdLE.Steps.Common/IdLE.Steps.Common.psd1 | Updates manifest exports to expose Invoke-IdleStepEnsureAttributes. |
| src/IdLE.Core/Private/Get-IdleStepRegistry.ps1 | Updates built-in step registry mapping to IdLE.Step.EnsureAttributes. |
| examples/workflows/templates/entraid-mover-department-change.psd1 | Updates template workflow steps to plural step + hashtable syntax. |
| examples/workflows/templates/entraid-leaver-offboarding.psd1 | Consolidates multiple single-attribute steps into one multi-attribute step. |
| examples/workflows/templates/entraid-joiner-complete.psd1 | Updates template workflow step to plural step + hashtable syntax. |
| examples/workflows/templates/complete-leaver-entraid-exo.psd1 | Updates template workflow step to plural step + hashtable syntax. |
| examples/workflows/templates/ad-mover-department-change.psd1 | Consolidates attribute updates into a single multi-attribute step. |
| examples/workflows/templates/ad-leaver-offboarding.psd1 | Updates template workflow step to plural step + hashtable syntax. |
| examples/workflows/templates/ad-joiner-complete.psd1 | Consolidates attribute updates into a single multi-attribute step. |
| examples/workflows/mock/joiner-with-onfailure.psd1 | Updates mock workflow step to plural step + hashtable syntax. |
| examples/workflows/mock/joiner-minimal-ensureattributes.psd1 | Adds a new minimal example that demonstrates EnsureAttributes. |
| examples/workflows/mock/joiner-minimal-ensureattribute.psd1 | Renames/updates the minimal example to use EnsureAttributes. |
| examples/workflows/mock/joiner-ensureentitlement.psd1 | Updates mock workflow step to plural step + hashtable syntax. |
| examples/workflows/joiner-with-retry-profiles.psd1 | Updates retry-profile example to plural step + hashtable syntax. |
| docs/use/installation.md | Updates step examples in installation docs to reference EnsureAttributes. |
| docs/reference/steps/step-ensure-attributes.md | Updates generated step reference for plural step type and new schema. |
| docs/reference/steps.md | Updates generated steps index to list IdLE.Step.EnsureAttributes. |
| docs/reference/providers/provider-mock.md | Updates provider docs examples/mentions to plural step type. |
| docs/reference/providers/provider-entraID.md | Updates provider docs to reference EnsureAttributes step type. |
| docs/reference/providers/provider-ad.md | Updates provider docs examples/mentions to plural step type and schema. |
| docs/reference/capabilities.md | Updates examples to reference IdLE.Step.EnsureAttributes. |
src/IdLE.Steps.Common/Public/Invoke-IdleStepEnsureAttributes.ps1
Outdated
Show resolved
Hide resolved
src/IdLE.Steps.Common/Public/Invoke-IdleStepEnsureAttributes.ps1
Outdated
Show resolved
Hide resolved
src/IdLE.Steps.Common/Public/Invoke-IdleStepEnsureAttributes.ps1
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
src/IdLE.Steps.Common/Public/Invoke-IdleStepEnsureAttributes.ps1
Outdated
Show resolved
Hide resolved
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Complete Removal of Deprecated Step Type
Removed all deprecated/legacy
IdLE.Step.EnsureAttributereferences and updated entire codebase to useIdLE.Step.EnsureAttributeswith the newAttributeshashtable syntax.Changes Made
Removed Files:
src/IdLE.Steps.Common/Public/Invoke-IdleStepEnsureAttribute.ps1- deprecated wrappertests/Steps/Invoke-IdleStepEnsureAttribute.Tests.ps1- compatibility testsdocs/reference/steps/step-ensure-attribute.md- deprecated documentationexamples/workflows/mock/joiner-minimal-ensureattribute.psd1- legacy example workflowModule Updates:
Invoke-IdleStepEnsureAttributefrom module exports (.psd1and.psm1)IdLE.Step.EnsureAttributefrom step registryWorkflow Examples Updated (17 files):
Attributeshashtable syntaxDocumentation Updated:
EnsureAttributes)EnsureAttributesTests Updated:
EnsureAttributesinstead ofEnsureAttributeAttributeshashtable and new function nameCode Quality Improvements
Invoke-IdleStepEnsureAttributesabout per-attribute change tracking limitationsResult
✅ Zero references to deprecated
IdLE.Step.EnsureAttributeremain in documentation✅ All examples and documentation use the new plural step type
✅ All tests passing (486 passed, 0 failed, 5 skipped)
✅ PSScriptAnalyzer: No issues
✅ Website builds successfully (fixed sidebars.js reference)
✅ Provider documentation accurate (corrected and simplified installation instructions)
✅ Pre-1.0 breaking change implemented cleanly
Original prompt
This section details on the original issue you should resolve
<issue_title>Replace IdLE.Step.EnsureAttribute with IdLE.Step.EnsureAttributes - multi-attribute-capability</issue_title>
<issue_description>## Problem Statement
IdLE.Step.EnsureAttributecurrently supports exactly one attribute (With.Name+With.Value) per step.In real-world workflows we often need to converge many attributes for the same identity. This forces authors to add multiple
EnsureAttributesteps, which creates:The current limitation is visible in the implementation:
Invoke-IdleStepEnsureAttributeenforcesWith.IdentityKey,With.Name,With.Valueand calls provider methodEnsureAttribute(IdentityKey, Name, Value). The built-in step registry only mapsIdLE.Step.EnsureAttributetoInvoke-IdleStepEnsureAttribute.Proposed Solution
Introduce a plural step type that can ensure multiple attributes in one step:
IdLE.Step.EnsureAttributesInvoke-IdleStepEnsureAttributesProvider interaction / performance
To keep providers stable while still allowing optimizations:
Preferred (optional) fast path: If the provider implements a batch method
EnsureAttributes, call it.EnsureAttributes(IdentityKey, AttributesHashtable)AuthSessionparameter support (same discovery behavior asInvoke-IdleProviderMethodalready uses).Fallback (no provider change required): If
EnsureAttributesis not available, iterate keys and call the existingEnsureAttribute(IdentityKey, Name, Value)for each attribute.Result shape
StepResult.Changedshould betrueif any attribute was changed.StepResult.Data.Attributes), without leaking secrets:Backward compatibility / migration
We should switch the primary documentation and examples to
EnsureAttributes.For compatibility we have two viable options (choose one during implementation; default recommendation: A):
Option A (recommended, non-breaking for existing workflows):
IdLE.Step.EnsureAttributeworking.IdLE.Step.EnsureAttributeas deprecated in docs and changelog; schedule removal for a future major (1.0+) if desired.Option B (breaking, pre-1.0 acceptable):
IdLE.Step.EnsureAttributefrom the built-in registry and docs.IdLE.Step.EnsureAttributes.Given the user goal is mainly workflow overhead, Option A achieves that immediately (new workflows use plural), while existing workflows keep running.
Alternatives Considered
Keep step singular but enhance workflow syntax with loops/macros
→ rejected: IdLE workflows are intentionally data-only; adding looping constructs increases complexity and undermines simplicity/security.
Add
With.Names/With.Valuesarrays→ rejected: risk of mismatched lengths and unclear semantics; a hashtable is clearer.
Only implement plural by calling provider
EnsureAttributein a loop→ acceptable baseline; however the optional provider
EnsureAttributesfast-path provides a clean performance upgrade path.Impact
Engine / Core / Steps
IdLE.Core/Private/Get-IdleStepRegistry.ps1: add mapping forIdLE.Step.EnsureAttributes.IdLE.Step.EnsureAttribute.Step metadata catalog
IdLE.Steps.Common/Public/Get-IdleStepMetadataCatalog.ps1: addIdLE.Step.EnsureAttributeswith the same capability:RequiredCapabilities = @('IdLE.Identity.Attribute.Ensure')Provider contracts
EnsureAttributesfor efficiency.Workflows / docs / examples
IdLE.Step.EnsureAttributesto reduce workflow verbosity.Additional Context
Code references (...
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.