village-builder

VB-388: A catch that cannot be eaten is dried, and the seed a short household eats is cooked

Status: done (2026-11-13) Priority: 2 Size: M Arch: year Phase: implement Design ref: Economy and jobs (Goods and the farming year: Mixed meals, Meals); QUESTION_ARCHIVE.md, VB-119 (12 Nov); backlog/VB-119.md, third pass; backlog/VB-300.md Goal: With VB-119 merged (Kim, 12 November), fresh fish spoils and the poorest households are hungrier: over 30 years at populous small 120,000 to 200,000 rations of fresh fish spoil (40 to 46% of the fish landed for food) while 35,000 to 56,000 are dried, and household-years hungry on over 0.3 of their days went 0/0/0/0 to 6/0/5/2 at seeds 3, 7, 11, 42. Kim: drying the fish and cooking the seed are this separate task. Acceptance criteria:

Decisions (13 Nov 2026, Deciding without Kim):

Implementation notes (13 Nov 2026): src/sim/pot.js (WINTER_FISH, FISH_WAIT, fishCovered, seedForMeal, cookMeal, seedTold; pot takes a seed allowance), src/sim/drying.js (want, season, potCatch), src/sim/hunger.js (eatSeed tells through Pot.seedTold), src/sim/kinds.js (cook: cookable with the need, cookMeal; fish: waits while covered, delivers through potCatch; no line added, it is at its baseline), tools/stocks.js (the rack’s adders, the fresh store’s none), docs/architecture/modules.md. Tests: tests/drying.js (the want at 0.8, the season to autumn, the winter pot at 0.8, two days of fresh fish post no fishing for the pot and rackfish still, a catch beyond 3 days of need on the rack, hung, and what was kept fresh eaten with none spoilt, nothing racked out of season), tests/pot.js (a household with only its seed posts a cook, the cook cooks the day’s seed, eaten without the raw rate, the unsown fields told; a larder that covers the day posts none), tests/meals.js (“seed is not cooked” becomes: the seed the meal would eat is cooked, none while the larder covers the day).

Validation notes (13 Nov 2026): populous, small, 30 years, seeds 3, 7, 11, 42; before = 32f7f33 (VB-119 and VB-300 merged), after = c4bdbcd (this change; the later commits are tests, tools and notes). Sampled: hungry years = household-years hungry on over 0.3 of their days; hungry days (worst household; households with any); grain at harvest = mean grain of living households at summer’s end, years 5/10/15/20/25/30; short days = household-days with fewer meals than the need at 23:54; raw = days grain was eaten uncooked (ledger raw movements) and rations; seed eaten (seedMeal, rations); fish = landed (catch, rack and pot), dried, spoilt fresh, spoilt as a share of (landed - dried); idle = share of adults without a job at 10:00 on summer days. | seed | hungry years | hungry days (worst; households) | grain at harvest | living y30 | short days | | — | — | — | — | — | — | | 3 | 14 of 3,072 -> 0 of 2,950 | 580 (134; 24) -> 21 (3; 12) | 296 283 184 200 169 212 -> 306 287 203 232 189 228 | 586 -> 590 | 3,814 -> 2,115 | | 7 | 0 of 2,827 -> 0 of 2,820 | 3 (1; 3) -> 13 (6; 5) | 330 334 247 211 280 254 -> 346 334 265 244 315 304 | 624 -> 634 | 1,421 -> 1,212 | | 11 | 0 of 2,809 -> 0 of 2,757 | 25 (12; 7) -> 13 (2; 9) | 308 319 281 261 243 234 -> 325 334 287 248 239 232 | 554 -> 586 | 1,777 -> 1,489 | | 42 | 0 of 3,046 -> 0 of 3,070 | 12 (4; 5) -> 13 (4; 6) | 275 302 244 319 255 229 -> 293 302 252 328 274 266 | 685 -> 663 | 2,488 -> 2,308 |

| seed | fish landed; dried; spoilt (share) | raw days (rations) | seed eaten | pots of 2 / 3 sources | summer idle | | — | — | — | — | — | — | | 3 | 410,237 -> 268,095; 41,696 -> 91,137; 202,405 (0.549) -> 39,667 (0.224) | 3,433 (4,446) -> 1,837 (3,320) | 1,608 -> 1,058 | 0.312 / 0.004 -> 0.311 / 0.002 | 0.489 -> 0.516 | | 7 | 446,004 -> 313,281; 44,520 -> 106,477; 221,074 (0.551) -> 48,675 (0.235) | 1,620 (2,373) -> 1,220 (2,165) | 319 -> 467 | 0.321 / 0.003 -> not sampled | 0.464 -> 0.494 | | 11 | 449,095 -> 299,080; 43,616 -> 100,196; 221,068 (0.545) -> 46,797 (0.235) | 1,840 (3,121) -> 1,491 (2,633) | 497 -> 746 | 0.300 / 0.003 -> 0.316 / 0.001 | 0.488 -> 0.528 | | 42 | 632,217 -> 403,633; 59,651 -> 136,336; 313,739 (0.548) -> 66,916 (0.250) | 2,301 (4,243) -> 1,979 (3,560) | 410 -> 442 | 0.306 / 0.002 -> not sampled | 0.506 -> 0.520 |