Status: done (2026-11-25) Priority: 2 Size: M Design ref: docs/review-principles-2026-11-24/synthesis.md (Invariant catalogue, M2); tests/accounts.js; Sim –report accounts (VB-403); src/sim/stores.js; design.md, Principles for decisions (Nothing teleports) Touches: tools/accounts.js; tests/accounts.js Goal: For every good in Stores and every year, made + brought in - used - spoiled - taken out equals the change in stock, with unexplained within rounding, as food and grain already close. Acceptance criteria:
--report accounts covers every good in sim/stores (timber, hay, stone, hides and the rest), each move booked under its reason, with a per-run counter where yearly totals are pruned (the obstacle VB-1662 met).tests/tiny.js) each good’s unexplained is 0 after a year; tests/accounts.js asserts it.unexplained on populous small seed 3 at year 10, before and after; a good whose account cannot close yet is named with its reason and a task.tools/accounts.js alone (no change to sim/stores or the run): every good the ledgers and totals name gets its own island-wide account, a year’s (goods) and the run’s (result().goods, the years added up as the report reads each turn before the stores prune), lines in.<reason>/out.<reason> by sign, stocks read from households (closing ones as out.ended), villages, stakes, gift grain on its way.tests/accounts.js asserts each good’s account closes (year and run) in the heirs run and on the two-village tiny state of tests/tiny.js over a year, but OPEN (timber, VB-1705).