mirror of
https://github.com/coder/coder.git
synced 2026-06-05 22:18:20 +00:00
b23aed034f
All map iterations in ConvertState now use sorted helpers instead of ranging over Go maps directly. Previously only coder_env and coder_script were sorted (via sortedResourcesByType). This extends the pattern to coder_agent, coder_devcontainer, coder_agent_instance, coder_app, coder_metadata, coder_external_auth, and the main resource output list. Also fixes generate.sh writing version.txt to the wrong directory (resources/ instead of testdata/), which caused the Makefile version check to silently desync and trigger unnecessary regeneration. Adds TestConvertStateDeterministic that calls ConvertState 10 times per fixture and asserts byte-identical JSON output without any post-hoc sorting.