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:
extinct (src/sim/heirs.js) drops the household’s plans before it marks the household dissolved (or leftWood puts the timber where a dissolved household’s goods go: decide by what Stores.close does with the woodpile, and say which in the notes). No run throws stores: missing or dissolved holder from leftWood.tests/tiny.js): a household with a building plan whose open step holds timber at its house dies out; nothing throws, and the wood is where the notes say (the derelict farm’s woodpile, or closed with the barn), counted, not lost unbooked.dissolve, a merge at marriage, a move): each drops its plans while the holder still stands.Notes / questions:
docs/plans/VB-444.md, sections 4 and 5): node tools/sim.js --scenario populous --seed 42 --map small --years 3 throws in year 2, at killPawn > succession > extinct > dropPlan > dropAll > dropProject > leftWood > Stores.put. extinct sets hh.dissolved = true and then calls dropPlan; leftWood (VB-255) then puts the step’s timber into the dissolved household’s store, which Stores.type refuses. The same run on today’s values does not meet the case (no building household dies out), so it is latent on main, not caused by the scale; any run may meet it.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.