village-builder

VB-779: Fix: a household that dies out with timber at a building step throws (stores: dissolved holder)

Status: done (2026-11-16) Priority: 1 Size: S Design ref: design.md, Work: opportunities, plans and tasks; backlog/VB-255.md Goal: A household’s plans are dropped while it can still hold their timber, so a run never throws when a building household dies out, and the timber lies on the farm’s woodpile as VB-255 has it. Acceptance criteria:

Notes / questions:

Implementation (16 Nov): extinct now calls dropPlan before hh.dissolved = true, so leftWood puts the step’s timber into the household’s wood while the holder stands. Stores.close clears only the ledgers (ledger, totals, ale, poured), not wood, so the timber stays with the derelict farm (its woodpile), booked as ‘timber’. Chosen over changing leftWood: one line moved, no second route for goods of a dissolved holder. Other endings: extinct is the only place dissolved is set (dissolve, a marriage merge at heirs.js:550 and service’s wards all call it), so the order holds for all; a move (moveTo) dissolves nothing. Check: tests/extinctwood.js (in suites): cart plan at the house with 7 timber, extinct, no throw, plan gone, hh.wood +7; fails without the fix.