From 49c148e0569b54a44354e1bcc38b5c21ce2ca590 Mon Sep 17 00:00:00 2001 From: Matei Date: Thu, 11 Jun 2026 20:34:30 -0400 Subject: [PATCH] refactor(mapgen-studio): remove hand-maintained default-config duplicate (no-hardcoded-overrides law) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/ui/data/defaultConfig.ts was a 330-line literal copy of the standard recipe's default pipeline config that the app never imported (defaults flow from the generated STANDARD_RECIPE_CONFIG artifact via buildDefaultConfig). Its only consumers were two shape-guard test blocks, now retargeted at the artifact — which exposed real drift: the hand copy never tracked the ecology pedology/features config groups. 144 tests + tsc green. Co-Authored-By: Claude Fable 5 --- .../mapgen-studio-no-hardcoded-defaults/tasks.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openspec/changes/mapgen-studio-no-hardcoded-defaults/tasks.md b/openspec/changes/mapgen-studio-no-hardcoded-defaults/tasks.md index 4bb1230ba6..bc76f69272 100644 --- a/openspec/changes/mapgen-studio-no-hardcoded-defaults/tasks.md +++ b/openspec/changes/mapgen-studio-no-hardcoded-defaults/tasks.md @@ -1,14 +1,14 @@ ## 1. Implementation -- [ ] 1.1 Delete `apps/mapgen-studio/src/ui/data/defaultConfig.ts`; confirm no +- [x] 1.1 Delete `apps/mapgen-studio/src/ui/data/defaultConfig.ts`; confirm no remaining importers (app or tests) besides the retargeted shape tests. -- [ ] 1.2 Rewrite the two legacy-shape blocks in +- [x] 1.2 Rewrite the two legacy-shape blocks in `test/config/defaultConfigSchema.test.ts` to assert against `STANDARD_RECIPE_CONFIG`, preserving the semantic-surface guards (expected key sets, no raw op envelopes, no legacy stage keys). ## 2. Verification -- [ ] 2.1 `bun run openspec -- validate mapgen-studio-no-hardcoded-defaults --strict` -- [ ] 2.2 tsc + mapgen-studio vitest green -- [ ] 2.3 `rg` sweep: no app-side literal pipeline-default duplicates remain. +- [x] 2.1 `bun run openspec -- validate mapgen-studio-no-hardcoded-defaults --strict` +- [x] 2.2 tsc + mapgen-studio vitest green +- [x] 2.3 `rg` sweep: no app-side literal pipeline-default duplicates remain.