Skip to content

task 7 fix2

Xopher edited this page Oct 22, 2026 · 1 revision

Task 7 — fix round 2 (from the scoped re-review of round 1, with the lead's rulings)

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.

1. Critical — specs that mock importAllTemples break on the new wait

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.

2. Important — the antechamber's circle must not be a shortcut from the entrance

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).

3. Important — a relocated hole must not land on a passage

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.

4. Lead rulings for Skull Woods (needed by Task 8's next temple; do them in the tool now)

  • 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.
  • openBeside must 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.
  • trimmed must 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).

Leave for later (do NOT do now)

  • 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).

Gate

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.

Table of Contents


Home - See Pages

Developer Docs

Start Screen

User Management

My Portal

My Home

The City (Hometown)

The World Map

The Dungeon

Game Master

Settings

Support & Glossary

About XP

Clone this wiki locally