Conversation
…est.Identity Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
blindzero
left a comment
There was a problem hiding this comment.
@copilot Remove all remarks, documentation, comments or technical implementations (e.g. aliases, mappings) to be compatible for previous "DesiredState". We are pre 1.0 and do not care about breaking-changes.
…ngs, no transition logic Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Done in 1690fc6. All DesiredState backward compatibility has been removed:
|
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eac3d7eaf0
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This pull request implements a significant architectural improvement to IdLE's request model by introducing explicit separation between caller-provided action inputs (Request.Intent) and read-only associated context (Request.Context), while completely removing the ambiguous DesiredState property.
Changes:
- Replaced
Request.DesiredStatewithRequest.Intentfor caller-provided action inputs - Introduced
Request.Contextfor read-only associated context (host/resolver-provided data) - Added validation to explicitly reject
Request.Identityproperty (identity data must go underRequest.Context.Identity) - Removed
Request.Inputalias support and updated template resolution to use new canonical roots - Updated all 587 tests, documentation, examples, and workflow templates across the codebase
Reviewed changes
Copilot reviewed 66 out of 66 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/IdLE.Core/Private/IdleLifecycleRequest.ps1 | Core domain class updated with Intent and Context properties; removed DesiredState |
| src/IdLE.Core/Public/New-IdleRequestObject.ps1 | Factory function updated to accept Intent and Context parameters with validation |
| src/IdLE/Public/New-IdleRequest.ps1 | Public cmdlet updated with Intent/Context parameters and inline example comments |
| src/IdLE.Core/Public/New-IdlePlanObject.ps1 | Added Request.Identity rejection validation; updated request snapshot to use Intent/Context |
| src/IdLE.Core/Private/Resolve-IdleTemplateString.ps1 | Updated allowed roots to Intent/Context; removed Input alias logic |
| src/IdLE.Core/Private/Get-IdleValueByPath.ps1 | Updated comment to reference Intent instead of DesiredState |
| src/IdLE.Core/Private/ConvertTo-IdlePlanExportObject.ps1 | Updated plan export to use 'intent' field instead of 'desiredState' |
| tests/_testHelpers.ps1 | Updated test helper to support Intent and Context parameters |
| tests/Core/New-IdleRequest.Tests.ps1 | Added tests for Intent/Context parameters, DesiredState absence, and Request.Identity rejection |
| tests/Core/Resolve-IdleWorkflowTemplates.Tests.ps1 | Updated all tests to use Intent/Context; removed Request.Input alias tests |
| tests/Core/Invoke-IdlePlan.MailboxTemplates.Tests.ps1 | Updated mailbox step tests to use Request.Intent |
| tests/Core/Export-IdlePlan.Tests.ps1 | Updated plan export test to use Intent |
| tests/Core/CapabilityDeprecation.Tests.ps1 | Updated deprecation tests to use Intent |
| tests/Core/Assert-IdleNoScriptBlock.Tests.ps1 | Updated ScriptBlock validation tests to use Intent |
| tests/fixtures/workflows/template-tests/*.psd1 | All 28 template test fixtures updated to use Request.Intent/Context |
| tests/fixtures/plan-export/expected/plan-export.json | Updated expected export format to use "intent" field |
| src/IdLE.Steps.Mailbox/README.md | Updated step pack README examples to use Request.Intent |
| src/IdLE.Steps.Mailbox/Public/Invoke-IdleStepMailboxOutOfOfficeEnsure.ps1 | Updated documentation and examples to use Request.Intent |
| examples/workflows/templates/*.psd1 | All 8 example workflows updated to use Request.Intent |
| examples/Invoke-LeaverWithManagerOOF.ps1 | Updated example script to use enrichedIntent |
| docs/use/workflows.md | Updated template documentation to describe Intent and Context roots |
| docs/use/quickstart.md | Updated quickstart guide examples to use Intent |
| docs/use/walkthrough/*.md | All 3 walkthrough docs updated to use Intent |
| docs/reference/cmdlets/New-IdleRequest.md | Updated cmdlet reference with Intent and Context parameters |
| docs/reference/providers/provider-mock.md | Updated mock provider docs to reference Intent |
| docs/extend/extensibility.md | Updated lifecycle request contract to list Intent and Context |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Code Coverage Report
|
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
DesiredStateproperty fromIdleLifecycleRequestclass-DesiredStateparameter, transition window logic, and deprecation warning fromNew-IdleRequestObjectandNew-IdleRequestRequest.Input.*andRequest.DesiredState.*from allowed template roots, alias resolution, and escape regex inResolve-IdleTemplateStringDesiredStatefrom request snapshot inNew-IdlePlanObjectDesiredStatefrom request export fallback inConvertTo-IdlePlanExportObjectRequest.Intent.*/Request.Context.*New-IdleRequest.ps1: Add inline comments to both.EXAMPLEblocks; second example includes all params (LifecycleEvent, CorrelationId, IdentityKeys, Intent, Context)New-IdleRequest.ps1:$Intentand$Contextdefault to@{}(consistent with$IdentityKeys)New-IdleRequestObject.ps1: Remove manual null-checks for$Intent/$Context; use= @{}param defaults instead (consistent with$IdentityKeys)Resolve-IdleWorkflowTemplates.Tests.ps1: Added parallel Context tests — multiple placeholders, nested hashtable, missing path — matching Intent test structureConvertTo-IdlePlanExportObject.ps1: IncludeRequest.Contextin the exportedrequest.inputpayload alongsideidentityKeys,intent, andchanges— fixes silent drop regression where context-influenced plans were missing context data from exports and context-only plans producedrequest.input = nullOriginal prompt
This section details on the original issue you should resolve
<issue_title>Separate action inputs from associated context (rename DesiredState - forbid Request.Identity)</issue_title>
<issue_description>## Problem Statement
The current IdLE request schema uses a block named
DesiredStateas the primary caller-provided input payload for workflows and steps. Over time this name has become ambiguous:DesiredStatesuggests “target configuration only”, but it is also used for generic workflow inputs that are not strictly “state”.Request.Identitymay be introduced, which blurs input vs state, harms auditability, and increases security risk.We need a strict, documented, validated separation between:
Proposed Solution
1) Introduce two explicit request blocks (canonical)
Introduce two canonical top-level request blocks:
Request.Intent.*(canonical block for caller-provided intent/action inputs)Request.Context.*(canonical block for associated read-only context)2) Rename
DesiredStatetoRequest.Intent(controlled migration)Because IdLE prioritizes consistency, this issue defines a controlled breaking change with a short, explicit transition window:
DesiredState->Request.Intentonly ifRequest.Intentis not provided.DesiredStateis used.DesiredState.The transition window (number of releases) must be documented.
3) Forbid ambiguous request fields
Request.IdentityMUST NOT exist and MUST be rejected by validation.Request.Context.Identity.*.4) Semantics and responsibility
Request.Intentis caller-owned and may contain desired changes, configuration, and operator-provided flags needed for actions.Request.Contextis read-only associated context, provided by:Request.Contextmust never be treated as mutable state within IdLE.5) Validation rules (fail-fast, agent-safe)
Alternatives Considered
DesiredStateand introduceRequest.DataInputDatainstead ofIntentIntentis shorter and expresses purpose clearly.Impact
DesiredState.Definition of Done (Step-0-Ready / Agent-Safe)
Design / Contracts
Request.IntentvsRequest.Context.DesiredState.Request.Context:Request.Context.Identity.*Request.Context.Devices.*Implementation
DesiredState->Request.Intentonly ifRequest.Intentis missing.DesiredStateandRequest.Intent.Request.Identity.Request.IntentandRequest.Context.Tests (Pester)
DesiredStateonly ->Request.Intentis populated (transition window).DesiredStateandRequest.Intent-> validation error.Request.Identitypresent -> validation error.Request.Intent.*andRequest.Context.*.Docs / Examples
Request.Intent/Request.Context.Non-Goals
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.