Summary
Update-HveCoreAllCollection in PluginHelpers.psm1 produces non-deterministic YAML output for the display section of collection manifests. The featured and ordering keys appear in inconsistent order across runs because ConvertTo-Yaml (from the powershell-yaml module) serializes regular hashtables with non-deterministic key iteration order.
Expected Behavior
The display section in hve-core-all.collection.yml should always serialize featured before ordering:
display:
featured: true
ordering: alpha
Actual Behavior
Key order varies between runs, sometimes producing ordering before featured:
display:
ordering: alpha
featured: true
This causes unnecessary diffs and non-reproducible output.
Root Cause
The display property is stored as a regular PowerShell hashtable. ConvertTo-Yaml iterates hashtable keys in undefined order. The fix is to rebuild the display section as [ordered]@{} with explicit key insertion order before serialization.
Fix
Rebuild the display section as an ordered hashtable with featured inserted before ordering in Update-HveCoreAllCollection.
🔧 - Generated by Copilot
Summary
Update-HveCoreAllCollectioninPluginHelpers.psm1produces non-deterministic YAML output for thedisplaysection of collection manifests. Thefeaturedandorderingkeys appear in inconsistent order across runs becauseConvertTo-Yaml(from thepowershell-yamlmodule) serializes regular hashtables with non-deterministic key iteration order.Expected Behavior
The
displaysection inhve-core-all.collection.ymlshould always serializefeaturedbeforeordering:Actual Behavior
Key order varies between runs, sometimes producing
orderingbeforefeatured:This causes unnecessary diffs and non-reproducible output.
Root Cause
The
displayproperty is stored as a regular PowerShell hashtable.ConvertTo-Yamliterates hashtable keys in undefined order. The fix is to rebuild thedisplaysection as[ordered]@{}with explicit key insertion order before serialization.Fix
Rebuild the
displaysection as an ordered hashtable withfeaturedinserted beforeorderinginUpdate-HveCoreAllCollection.🔧 - Generated by Copilot