Fix broadcast list unwrapping and mixed positional list handling#89
Merged
minghangli-uni merged 1 commit intomainfrom Feb 1, 2026
Merged
Fix broadcast list unwrapping and mixed positional list handling#89minghangli-uni merged 1 commit intomainfrom
minghangli-uni merged 1 commit intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #89 +/- ##
==========================================
+ Coverage 98.96% 98.98% +0.01%
==========================================
Files 15 15
Lines 679 692 +13
Branches 160 165 +5
==========================================
+ Hits 672 685 +13
Misses 3 3
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
This is a follow-up fixup PR to #88, which unintentionally corrupted some previously working behaviours.
1. single item list broadcasting produces incorrect results
Before this change, when a scalar parameter was provided as a single element yaml list - a common pattern for broadcasting across multiple branches, the existing generator preserved the list shape instead of unwrapping it to scalar, such as given,
the generator output became,
This is not the intended semantics for scalar parameters. The current PR fixes this issue by treating a single element list as a broadcasted scalar and unwrapping it to,
2. Nested yaml list-of-lists handling during list merges
The existing list-merge logic treated an outer list wrapper as a single positional element in the base list, such as,
was interpreted as replacing the first element of the base list
input[0] with the list [a, b], resulting in,This PR fixes the issue by unwrapping the broadcast wrapper from [[a, b]] to [a, b] before merging or cleaning, so the above update now correctly produces,
3. Support mixed positional inventories with PRESERVE / REMOVE markers
For this special case which mixes positional inventories, such as below the inner list does not include all maps inside but can be a special marker (REMOVE / PRESERVE), it does not get per-branch selection correctly.