Fix per-step precondition warning propagation (empty ArrayList collapsed to null by pipeline)#243
Merged
blindzero merged 2 commits intocodex/create-task-branch-for-codex-merge-conflictfrom Feb 26, 2026
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…step Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Reintegrate preconditions DSL and restore warning propagation
Fix per-step precondition warning propagation (empty ArrayList collapsed to null by pipeline)
Feb 26, 2026
Code Coverage Report
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes per-step precondition warning propagation during planning so that $plan.Steps[n].Warnings correctly reflects warnings appended to $plan.Warnings, even when the warnings list starts empty.
Changes:
- Replaces
Get-IdlePropertyValueusage for accessing the planWarningssink with direct property access to preserve the liveArrayListreference. - Tightens the tracking guard from “has
Countproperty” to “is anIList”, matching the intent of list-based warning tracking.
Comments suppressed due to low confidence (1)
src/IdLE.Core/Private/ConvertTo-IdleWorkflowSteps.ps1:139
- This block duplicates (and can drift from) both Get-IdlePropertyValue and the similar Warnings-sink extraction logic in ConvertTo-IdleWorkflowStepPreconditionSettings. Consider centralizing this into a small private helper (or adjusting Get-IdlePropertyValue to return empty collections without pipeline enumeration) so future fixes don’t need to be applied in multiple places.
$planWarnings = $null
$planObj = $PlanningContext.Plan
if ($null -ne $planObj) {
if ($planObj -is [System.Collections.IDictionary]) {
if ($planObj.Contains('Warnings')) { $planWarnings = $planObj['Warnings'] }
} else {
$wProp = $planObj.PSObject.Properties['Warnings']
if ($null -ne $wProp) { $planWarnings = $wProp.Value }
}
blindzero
approved these changes
Feb 26, 2026
01f518d
into
codex/create-task-branch-for-codex-merge-conflict
9 checks passed
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.
$plan.Steps[n].Warningswas always empty despite warnings being correctly appended to$plan.Warnings. Per-step warning tracking inConvertTo-IdleWorkflowStepssilently no-oped because PowerShell's output pipeline collapses an emptyArrayListto$nullwhen returned from a function — soGet-IdlePropertyValue(..., 'Warnings')returned$nullbefore any warnings existed, making$planWarningsCanTrackCountfalse.Changes
ConvertTo-IdleWorkflowSteps.ps1— replaceGet-IdlePropertyValuecall for the planWarningssink with directPSObject.Propertiesaccess (same pattern already used inConvertTo-IdleWorkflowStepPreconditionSettings), which preserves the liveArrayListreference regardless of whether it is empty. Also tightened the guard to$planWarnings -is [System.Collections.IList].✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.