From 212f745d3f4600473fc1fafcc12c46922ac4d88f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Feb 2026 08:40:01 +0000 Subject: [PATCH 1/4] Initial plan From 4dafdb8a78223f0d6309379978cbcd12fef2f64f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Feb 2026 08:43:37 +0000 Subject: [PATCH 2/4] Fix invalid dates and redundant step-name prefix in precondition schema errors Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com> --- src/IdLE.Core/Private/Test-IdleWorkflowSchema.ps1 | 2 +- tests/Core/Assert-IdleConditionPathsResolvable.Tests.ps1 | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/IdLE.Core/Private/Test-IdleWorkflowSchema.ps1 b/src/IdLE.Core/Private/Test-IdleWorkflowSchema.ps1 index 31cde44b..75671529 100644 --- a/src/IdLE.Core/Private/Test-IdleWorkflowSchema.ps1 +++ b/src/IdLE.Core/Private/Test-IdleWorkflowSchema.ps1 @@ -77,7 +77,7 @@ function Test-IdleWorkflowSchema { $ErrorList.Add("'$StepPath.Precondition' must be a hashtable (condition node).") } else { - foreach ($schemaError in (Test-IdleConditionSchema -Condition ([hashtable]$Step.Precondition) -StepName $StepPath)) { + foreach ($schemaError in (Test-IdleConditionSchema -Condition ([hashtable]$Step.Precondition) -StepName $null)) { $ErrorList.Add("'$StepPath.Precondition' has invalid condition schema: $schemaError") } } diff --git a/tests/Core/Assert-IdleConditionPathsResolvable.Tests.ps1 b/tests/Core/Assert-IdleConditionPathsResolvable.Tests.ps1 index 96551e97..3b78f425 100644 --- a/tests/Core/Assert-IdleConditionPathsResolvable.Tests.ps1 +++ b/tests/Core/Assert-IdleConditionPathsResolvable.Tests.ps1 @@ -17,7 +17,7 @@ Describe 'Assert-IdleConditionPathsResolvable' { $context = @{ Plan = @{ LifecycleEvent = 'Joiner' } - Request = @{ Intent = @{ OffboardingDate = '2026-02-30' }; Context = @{}; IdentityKeys = @{} } + Request = @{ Intent = @{ OffboardingDate = '2026-02-28' }; Context = @{}; IdentityKeys = @{} } } { @@ -35,7 +35,7 @@ Describe 'Assert-IdleConditionPathsResolvable' { $context = @{ Plan = @{ LifecycleEvent = 'Joiner' } - Request = @{ Intent = @{ OffboardingDate = '2026-02-30' }; Context = @{}; IdentityKeys = @{} } + Request = @{ Intent = @{ OffboardingDate = '2026-02-28' }; Context = @{}; IdentityKeys = @{} } } { @@ -53,7 +53,7 @@ Describe 'Assert-IdleConditionPathsResolvable' { $context = @{ Plan = @{ LifecycleEvent = 'Joiner' } - Request = @{ Intent = @{ OffboardingDate = '2026-02-30' }; Context = @{}; IdentityKeys = @{} } + Request = @{ Intent = @{ OffboardingDate = '2026-02-28' }; Context = @{}; IdentityKeys = @{} } } { @@ -71,7 +71,7 @@ Describe 'Assert-IdleConditionPathsResolvable' { $context = @{ Plan = @{ LifecycleEvent = 'Joiner' } - Request = @{ Intent = @{ OffboardingDate = '2026-02-30' }; Context = @{}; IdentityKeys = @{} } + Request = @{ Intent = @{ OffboardingDate = '2026-02-28' }; Context = @{}; IdentityKeys = @{} } } { From 34f5ff4e720731ae0f2fd558e0f72666e24e7e64 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Feb 2026 11:09:35 +0000 Subject: [PATCH 3/4] Fix bad tests: Export-IdlePlan container failure and planning warnings generation Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com> --- .../Private/ConvertTo-IdlePlanExportObject.ps1 | 6 ++++++ ...onvertTo-IdleWorkflowStepPreconditionSettings.ps1 | 12 +++++++++++- tests/Core/Export-IdlePlan.Tests.ps1 | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/IdLE.Core/Private/ConvertTo-IdlePlanExportObject.ps1 b/src/IdLE.Core/Private/ConvertTo-IdlePlanExportObject.ps1 index 9c18cba7..e524ddbe 100644 --- a/src/IdLE.Core/Private/ConvertTo-IdlePlanExportObject.ps1 +++ b/src/IdLE.Core/Private/ConvertTo-IdlePlanExportObject.ps1 @@ -41,6 +41,12 @@ function ConvertTo-IdlePlanExportObject { ) foreach ($name in $Names) { + if ($Object -is [System.Collections.IDictionary]) { + if ($Object.Contains($name)) { + return $Object[$name] + } + continue + } $prop = $Object.PSObject.Properties[$name] if ($null -ne $prop) { return $prop.Value diff --git a/src/IdLE.Core/Private/ConvertTo-IdleWorkflowStepPreconditionSettings.ps1 b/src/IdLE.Core/Private/ConvertTo-IdleWorkflowStepPreconditionSettings.ps1 index f03f8c31..b5d44813 100644 --- a/src/IdLE.Core/Private/ConvertTo-IdleWorkflowStepPreconditionSettings.ps1 +++ b/src/IdLE.Core/Private/ConvertTo-IdleWorkflowStepPreconditionSettings.ps1 @@ -42,7 +42,17 @@ function ConvertTo-IdleWorkflowStepPreconditionSettings { ) } - Assert-IdleConditionPathsResolvable -Condition ([hashtable]$rawPrecondition) -Context $PlanningContext -StepName $StepName -Source 'Precondition' -AllowMissingRequestContextPaths -WarningSink (Get-IdlePropertyValue -Object $PlanningContext.Plan -Name 'Warnings') + $warningSink = $null + $planObj = $PlanningContext.Plan + if ($null -ne $planObj) { + if ($planObj -is [System.Collections.IDictionary]) { + if ($planObj.Contains('Warnings')) { $warningSink = $planObj['Warnings'] } + } else { + $wProp = $planObj.PSObject.Properties['Warnings'] + if ($null -ne $wProp) { $warningSink = $wProp.Value } + } + } + Assert-IdleConditionPathsResolvable -Condition ([hashtable]$rawPrecondition) -Context $PlanningContext -StepName $StepName -Source 'Precondition' -AllowMissingRequestContextPaths -WarningSink $warningSink $normalized.Precondition = Copy-IdleDataObject -Value $rawPrecondition } } diff --git a/tests/Core/Export-IdlePlan.Tests.ps1 b/tests/Core/Export-IdlePlan.Tests.ps1 index 3ea6d0d2..8d45f92c 100644 --- a/tests/Core/Export-IdlePlan.Tests.ps1 +++ b/tests/Core/Export-IdlePlan.Tests.ps1 @@ -80,7 +80,7 @@ Describe 'Export-IdlePlan' { } } - + Context 'Planning warnings export' { It 'includes planning warnings in exported plan for CI checks' { $cid = '22222222-2222-2222-2222-222222222222' From 30b19a0a9ceddaa3be54c40d598a016944f6071e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Feb 2026 11:58:32 +0000 Subject: [PATCH 4/4] Fix failing Test-IdleWorkflowSchema tests: escape brackets in -like patterns Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com> --- tests/Core/Test-IdleWorkflowSchema.Tests.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Core/Test-IdleWorkflowSchema.Tests.ps1 b/tests/Core/Test-IdleWorkflowSchema.Tests.ps1 index 1caf4eb2..37396e44 100644 --- a/tests/Core/Test-IdleWorkflowSchema.Tests.ps1 +++ b/tests/Core/Test-IdleWorkflowSchema.Tests.ps1 @@ -21,7 +21,7 @@ Describe 'Workflow schema validation - Condition/Precondition DSL parity' { } $errors = Test-IdleWorkflowSchema -Workflow $workflow - @($errors | Where-Object { $_ -like "*Steps[0].Condition*invalid condition schema*" }).Count | Should -BeGreaterThan 0 + @($errors | Where-Object { $_ -like "*Steps``[0``].Condition*invalid condition schema*" }).Count | Should -BeGreaterThan 0 } It 'rejects invalid Condition DSL nodes in OnFailureSteps at definition validation time' { @@ -41,7 +41,7 @@ Describe 'Workflow schema validation - Condition/Precondition DSL parity' { } $errors = Test-IdleWorkflowSchema -Workflow $workflow - @($errors | Where-Object { $_ -like "*OnFailureSteps[0].Condition*invalid condition schema*" }).Count | Should -BeGreaterThan 0 + @($errors | Where-Object { $_ -like "*OnFailureSteps``[0``].Condition*invalid condition schema*" }).Count | Should -BeGreaterThan 0 } It 'rejects invalid Precondition DSL node at definition validation time' { @@ -58,7 +58,7 @@ Describe 'Workflow schema validation - Condition/Precondition DSL parity' { } $errors = Test-IdleWorkflowSchema -Workflow $workflow - @($errors | Where-Object { $_ -like "*Steps[0].Precondition*invalid condition schema*" }).Count | Should -BeGreaterThan 0 + @($errors | Where-Object { $_ -like "*Steps``[0``].Precondition*invalid condition schema*" }).Count | Should -BeGreaterThan 0 } It 'accepts valid precondition using the same condition DSL' { @@ -81,7 +81,7 @@ Describe 'Workflow schema validation - Condition/Precondition DSL parity' { } $errors = Test-IdleWorkflowSchema -Workflow $workflow - $errors.Count | Should -Be 0 + @($errors).Count | Should -Be 0 } } }