Crucible: Fix Formatting Churn #5

Merged
archvillainette merged 1 commits from formatting-churn-fix into main 2026-06-17 07:57:55 +00:00
Owner

RC#1 — build wrote 2-space instead of .editorconfig's 4-space

  • editorconfig_format.go: the glob translator escaped {/} as literals, so [.{json,jsonc}]→indent_size=4 never matched any file and formatting fell back to []→2. Implemented real editorconfig brace expansion — {a,b,c} alternation and {n..m} numeric ranges. Nothing is hardcoded; saveLockfile already read .editorconfig, it just got the wrong section.

RC#2 — validate wrote a lockfile (it must be read-only)

  • The three registry collectors persisted lockfiles as a side effect of collection; ValidateProject calls collection outside its snapshot guard, so the write leaked. Threaded a persistLocks bool through collectGeneratedRegistryDatasets and the damagetypes/itemprops/racialtypes collectors. Only buildNativeUnchecked (the real build allocator) passes true; validate, discovery, packaging queries, and wiki discovery pass false.

Tests added: editorconfig_glob_test.go (brace match + 4-space via brace glob), registry_readonly_test.go (read-only writes nothing; persist writes allocations).

RC#1 — build wrote 2-space instead of .editorconfig's 4-space - editorconfig_format.go: the glob translator escaped {/} as literals, so [*.{json,jsonc}]→indent_size=4 never matched any file and formatting fell back to [*]→2. Implemented real editorconfig brace expansion — {a,b,c} alternation and {n..m} numeric ranges. Nothing is hardcoded; saveLockfile already read .editorconfig, it just got the wrong section. RC#2 — validate wrote a lockfile (it must be read-only) - The three registry collectors persisted lockfiles as a side effect of collection; ValidateProject calls collection outside its snapshot guard, so the write leaked. Threaded a persistLocks bool through collectGeneratedRegistryDatasets and the damagetypes/itemprops/racialtypes collectors. Only buildNativeUnchecked (the real build allocator) passes true; validate, discovery, packaging queries, and wiki discovery pass false. Tests added: editorconfig_glob_test.go (brace match + 4-space via brace glob), registry_readonly_test.go (read-only writes nothing; persist writes allocations).
archvillainette added 1 commit 2026-06-17 07:53:21 +00:00
Crucible: Fix Formatting Churn
build-binaries / build-binaries (pull_request) Successful in 2m5s
test-image / build-image (pull_request) Successful in 45s
test / test (pull_request) Successful in 1m22s
e69564dff2
archvillainette merged commit 16d5586587 into main 2026-06-17 07:57:55 +00:00
archvillainette deleted branch formatting-churn-fix 2026-06-17 07:57:55 +00:00
Sign in to join this conversation.