Status: done (2026-11-13)
Priority: 2
Size: M
Design ref: Goods, production and animals (Goods and the farming year: Fuel). QUESTION_ARCHIVE.md, Consistency review (10 Nov)
Goal: The woodpile is read by nothing but the firewood job’s urgency (hh.wood, src/sim/kinds.js:138-140): a household with none lives as one with a full pile. In populous small, seed 7, a village of 15 households had no wood for 40 years and nothing followed. Kim decided on 10 November: a household out of wood is cold, which lowers its members’ mood and health, and it cannot cook.
Acceptance criteria:
endOfDay, src/sim/clock.js, where the day’s wood is burnt) a household whose pile does not cover the day’s use burns what it has and is cold that day by the part it lacked times the season’s use over winter’s (woodUse: spring 0.22, summer 0.19, autumn 0.31, winter 1), so a summer day without wood barely counts. hh.cold, 0 to 1, is the mean of the last 12 days, kept as hh.coldLog like a pawn’s hungerLog (state with an owner, @state, an invariant; a save without them loads with 0).HEALTH.cold (2) times the day’s cold, times HEALTH.frail (1.5) under 5 and from 60, in updateHealth (src/sim/hunger.js), beside hunger’s drain of 4 times hunger squared, and a full meal restores nothing that day (it restores 3 on a warm one; with the meal’s 3 kept, a fed adult would gain 1 a day in a cold house and the cold would cost nothing). A winter wholly without wood so costs a fed adult 24 of 100 and an infant or an old pawn 36; with hunger it kills. The death hazard reads health as today; the death of a pawn whose household was cold is recorded with cold: true and told (“died in a cold house”), and no new cause is added.cookWanted, src/sim/kinds.js:51) while the pile is empty, and cooking burns no wood of its own (the day’s use is the hearth’s). Grain eaten uncooked feeds ECON.uncooked (0.75) of a ration: feedHousehold counts the grain it takes beyond the cooked meals at that worth, so the household eats more grain for the same need or goes a quarter short. Cooked meals already in store are eaten as today; the larder’s food (milk, meat) is not changed.hh.cold for it to read and names it in the pawn panel beside hunger (“cold: no firewood”), and in the household’s card.woodLow stays 2.2, and a cold household’s is woodColdUrgency (3), above cooking’s, so the first free hand goes for wood; a village with an empty allotment (VB-326) cannot, and the yearly log line says its houses are cold.design.md, Known gaps.tests/lib/bands.js): a report of cold household-days as a share of household-days in the full runs, and no assert until Kim gives a target. Tests (tests/cold.js, in npm test): a household with an empty pile in winter is cold, its frail members’ health falls, no cook job is posted and its grain feeds 0.75; with wood, a run is as before.small-y40): cold household-days by season, deaths and health by age in cold households, grain eaten uncooked, firewood hours; whether households, not only averages, are worse off, and which. The golden file is re-recorded and its changed entries listed.QUESTIONS.md, “Consistency review: wood”, questions 5 to 7.QUESTION_ARCHIVE.md, “Consistency review”, archived 10 November): the numbers above are Agreed. Uncooked grain feeds 0.75 of a ration with or without wood (question 6), so the 0.75 holds for every meal no one cooked. Waits for VB-326 only.38b920d; main has moved some lines since (in src/sim/kinds.js, jobs.js, records.js), and every function and field named still stands: find them by name.hh.wood is still read and written through the stores; new household state hh.cold and hh.coldLog, owned by sim/hunger, read by sim/kinds (the firewood urgency), sim/lifecycle (how a death is told) and the page; no new coupling between systems, no new loop):
sim/hunger. warmHouse runs from feedHousehold when the clock passes the season, before the meal, so the day’s cold reaches health on the same day. It burns what the pile holds of ECON.woodUse[season]. The day’s cold is the wood lacked over winter’s use, which equals the part lacked times the season’s use over winter’s. hh.coldLog keeps the last 12 days (HUNGER.days) and empties after 12 warm days; hh.cold is its sum over 12. A warm house costs one comparison a day. feedHousehold takes the season as an argument instead of adding an export, because sim/hunger is already over its 15 exports (tests/width-baseline.json).updateHealth): a cold day costs HEALTH.cold 2 times the day’s cold, times HEALTH.frail for the frail; a full meal restores 3 only on a warm day. A death in a cold house is recorded with cold: true, a new record field (sim/records FIELDS), and is told “… died of illness in a cold house” (COLD in sim/deaths; the village log, the pawn’s life, eventLine). No cause is added.cookWanted needs wood in the pile; the pot never burned wood of its own. A cold household’s firewood job has urgency MATCH.urgency.woodColdUrgency 3. The yearly noWood line ends “its houses are cold”. The page shows the cold in the pawn card (“health 54, cold: no firewood”), the played pawn’s needs, the house’s tile card (“Cold: no firewood”) and the household’s Supplies fold.ECON.uncooked 0.75 of a ration, replacing ECON.rawGrain 1.25 (a worth of 0.8). The design’s Fuel row holds 0.75 as Agreed (10 Nov), and this task’s note of 11 Nov has Kim confirm it with the 29% in view. The VB-119 answer of 11 Nov (“raw grain stays at 1.25”) answered a question that said the design gave no number. The code follows the design; Kim may decide otherwise.cold-households (cold household-days over household-days, after year 0) is described, in the full runs only (reportOnly), with no assert until Kim gives a target. Tests: tests/cold.js (fast tier). tools/stocks.js now lists the woodpile as read (by the cook and the hearth), and tests/review-tools.js checks that.VB-419 (split sim/rules) and VB-420 (split sim/kinds): the two tunables and the cook’s wood check took both modules over their baseline lengths. Opened VB-421 from the numbers below.32f7f33) and after. Before this change, a “cold” day is a day the pile was emptied. Firewood is counted in loads cut (3 per trip on the back), and grain eaten uncooked in rations over years 13 to 15.
villages band (no village of 3 or more households emptied after year 5) is out at populous 42 because of Kornåker. VB-421 takes this up: why an allotment empties, and what such a village does.npm run verify shows 10 targets out, the same as 32f7f33. Counters are unchanged (tests/counters.js). The golden file was retired by VB-408. Cost: one comparison per live household per day, in the pass that burns the wood, plus a sum over at most 12 days while a house is cold; no new loop.docs/img/cold-populous-42-y6.jpg (populous small 42 at year 6, its largest village). The cold shows in the cards, not on the map.