Repository navigation
task 7 fix2
Round 1's items are all confirmed addressed. The re-review found new breakage in the fix diff, and confirmed Skull Woods (the next temple) still cannot be dressed. Fix these, TDD, one spec at a time, small commits.
Review: "tests/unit/TempleSystemCleared.spec.ts:30: its mock of importAllTemples provides only importAllTempleLayouts, so useTemple.ts:99 throws 'ensureBuiltInTemples is not a function'. One chemx test run: 9 of 31 fail. Other specs that mount useTemple without mocking that module now run the real sync and have not been run: TempleSystemFloors, DragonEggRoom, FightDrops, TempleChestTake, TempleKeyCount, BossKeyChest, TempleMoveIcons."
Fix: add ensureBuiltInTemples (resolving) to that mock, then run EACH of these specs one at a time and fix what breaks: TempleSystemCleared, TempleSystemFloors, DragonEggRoom, FightDrops, TempleChestTake, TempleKeyCount, BossKeyChest, TempleMoveIcons. Also find any other spec that mounts or imports useTemple (chemx q useTemple under tests/) and run it.
Review: "dressLinks.ts:96: the circle out of the antechamber is paired with a circle next to the entrance, and circles are two-way. With the Boss Key a hero rides from beside the entrance straight to the Boss door. Ice: 1F (1,1) is one step from the entrance and the Boss Key is on B1, so B2-B6 can be skipped. Earth: skips Skull Woods sections 2 and 3." RULING: pair the antechamber's way back with a circle beside the hole's SOURCE room (the room the hero fell from), so the dungeon's route is kept. Spec: on the FALL fixture and on Ice/Earth-shaped fixtures, the solver's shortest route to the boss is not shorter than the route through the hole (or: the circle pair's other end is adjacent to the hole's source cell).
Review: "dressBoard.ts:339-352 with placeNearest (:302): a relocated hole takes the nearest free cell even when that cell is a passage, and a pit drops whoever walks in. On Ice the B1 hole lands on 'Ice Cross Left' (1,1), a crossroads with doors on all four sides: 'R1: 3 rooms out of reach' (B1 (0,1), (2,0), (2,1)); at the base commit B1 was fully reachable." RULING: a relocated hole goes to a dead-end cell (one open side) of its own LTTP room if there is one, else to a cell added beside its source room; never a cell with two or more open sides. Spec: no dressed pit cell has more than one open side unless the JSON hole cell itself did.
- Displaced circles (teleports) are never dropped: relocate them like holes (dead-end cell of their own room, else an added cell beside the source), and record the move. Skull Woods' four lobby circles are how its sections connect.
-
openBesidemust not throw when every side of the cell is taken: grow the grid by one cell in the freest direction instead (record it as an added cell). - The Bomb-chest placement must not throw (
no cell beside 1F (4,4) for a Bomb chest): if no reachable empty cell exists before the crack, add one beside the nearest reachable room on the entrance side; record it. -
trimmedmust also remove empty LEADING rows/columns after compaction (Ice B6 keeps 13 empty rows at the top today). - Acceptance for this item: run the dress tool for earth-temple and ice-temple into memory only (do NOT write their modules; Task 8 does that): both must build, solve (
solveTemple(...).solvable), pass the audit, and need the Boss Key to reach the boss. Put that as a spec in ClassicTemples.spec.ts or ClassicDress.spec.ts that dresses those two JSONs in memory (it guards the tool before Task 8).
- A pit naming a floor that does not exist (engine bruise vs solver next floor down).
- The antechamber move always reported as grown: true.
- TempleSolver.spec.ts at 502 lines (tests are not in the audit).
Run the specs named above one at a time, plus ClassicDress, ClassicTemples, ClassicTempleRefresh, ShippedTemplesAudit, TempleSolver, RoomInteractions. Audit with npx --yes chemx@26.10.19-530 audit --no-index --unroll (no file you touch may newly appear under LINE_BUDGET_FILE / CONTROL_FLOW_INLINE_BOOLEAN / TYPE_COLOCATION / HOOK_RETURN_OVERLOAD), then git checkout -- chemx-ratchet.json. Regenerate storm-temple.ts if the tool's output for Storm changes. Append "Fix round 2" to task-7-report.md and reply with the short status contract.
- Architecture
- Component-Library
- Hooks-Reference
- Temple-System
- Battle-Field-Architecture
- current_context - For AI/Human Handoff
- User Menu
- General Settings
- Family Settings
- Sound Settings
- Notification Settings
- Reward Settings
- Party Settings
- Theme Settings
- Chore Settings