-
Notifications
You must be signed in to change notification settings - Fork 125
Description
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: alphaActual Behavior
Key order varies between runs, sometimes producing ordering before featured:
display:
ordering: alpha
featured: trueThis 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