Conversation
…ition-skipped steps Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
…nditions DSL heading Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates IdLE’s plan-building pipeline so that steps deemed NotApplicable by a Condition do not trigger downstream plan-time failures from With template resolution or WithSchema validation, aligning planning behavior with the fact that such steps will never execute.
Changes:
- Skip
Withtemplate resolution andWithSchemavalidation forNotApplicablesteps duringConvertTo-IdleWorkflowSteps. - Add 4 Pester tests covering both condition-false (skipped) and condition-true (enforced) branches, including
OnFailureSteps. - Document the “conditions guard plan-time validation” behavior and move new test workflows into fixture PSD1 files.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/IdLE.Core/Private/ConvertTo-IdleWorkflowSteps.ps1 |
Bypasses With template resolution and WithSchema validation when Status is NotApplicable. |
tests/Core/New-IdlePlan.Tests.ps1 |
Adds unit tests ensuring skipped steps don’t fail planning, while applicable steps still validate/throw. |
tests/fixtures/workflows/condition-skip-template.psd1 |
Fixture workflow where a condition-false step has a With template referencing missing data. |
tests/fixtures/workflows/condition-skip-schema.psd1 |
Fixture workflow where a condition-false step would otherwise fail required WithSchema keys. |
tests/fixtures/workflows/condition-skip-onfailure.psd1 |
Fixture workflow validating the same behavior for OnFailureSteps. |
tests/fixtures/workflows/condition-applicable-schema.psd1 |
Fixture workflow verifying condition-true steps still enforce WithSchema (throw on missing required key). |
docs/use/workflows/conditions.md |
Documents that condition-skipped steps bypass remaining plan-time With processing and schema validation. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 96ebc22fe8
ℹ️ 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".
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Code Coverage Report
|
…ing plan building Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
ConvertTo-IdleWorkflowSteps.ps1: skip With template resolution and WithSchema validation forNotApplicablestepsConvertTo-IdleWorkflowSteps.ps1: pass-ExcludeExistsOperatorPathstoAssert-IdleConditionPathsResolvablefor step Conditions, soExistson an absent path no longer throws before the condition can evaluateExists-on-absent-path)condition-exists-absent.psd1for theExists-on-absent-context-path scenarioExistsoperator semantics inconditions.md## Conditions DSLheading inconditions.mdOriginal prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.