Status: done (2026-11-17) Priority: 2 Size: M Design ref: design.md, Exchange, goodwill and obligations (The gift: The feast, What a feast books); backlog/VB-407.md Goal: Today an occasion pours ale and gives the host standing; no food is served and no goodwill booked, and about a fifth of the grain harvest rots. Build the feast of VB-407’s plan on the wedding and the funeral ale, which exist (sim/occasions). Acceptance criteria:
FEAST in src/sim/rules.js, each with its meaning: above 2 (years of the household’s need, over its seed, that it keeps before it feasts), share 0.25 (of what it holds beyond that), perGuest 3 (rations one person eats and drinks at a sitting). The threshold is a rule of the registry, so the household’s panel can say why it does or does not feast.min(share × excess, perGuest × present) rations through sim/stores (a good and the reason feast); those present, the host’s own members too, have eaten that day’s meal, so their households do not feed them again for it. Nothing is served to those who did not come, and nothing is served that is not eaten.sim/exchange); a household without a holder books nothing; the host’s own members book nothing. Standing stays pourAle’s.feast (log, with its kind, the host pawn and atFarm): the host, the guests’ count, the rations served; the holder’s panel lists the balances it made as any goodwill.tests/lib/invariants.js): a feast never takes a host below its seed and 2 years; rations served equal rations eaten. A test on a constructed state (tests/tiny.js): a host below the threshold serves nothing; a host above it serves the lesser of the two bounds; a guest who stayed at home owes nothing; a guest household’s meal is not eaten twice.tools/balance.js; VB-403’s report if it exists), goodwill outstanding a household (88 rations today), hungry household-days, growth. Whether households, not only averages, are better off: the helped households a year, before and after. (Not all taken, 17 Nov: populous small seeds 7 and 42 at 15 years, as the run asked, and founders 7 and 42 at 30, on a shared machine; populous seeds 3 and 11 at 30 years are owed, noted as VB-997 for VB-662.)above 1.5, 2, 3 and share 0.25, 0.5, with what each gave; the values kept are Kim’s 2 and 0.25 unless a run shows a collapse, and the others go to docs/tuning.md.feastServed; goodwill’s cap of 32 counterparts a pawn holds.
Notes:--report households; grain against members × 48 rations, the seed not taken off): 65 of 111 households held over 2 years and 28 over 3; the excess beyond 2 years summed to 10,400 rations of 47,100 held, its median 119 a household. So the threshold is met by about half the households, not by a few, and a quarter of a median excess is about 30 rations: the sitting’s limit (3 × 20 guests) seldom binds at a wedding. The first run of this task replaces this count with a true one (seed and need as sim/help reckons them).FEAST.share, a new act TRAITS.acts.generosity.feast read through Traits.act; why a household does or does not feast names the label (Traits.wordOf).feast (sim/occasions, context {hh}): the household’s grain (base) less its seed reserve (seed) and FEAST.above years of its need (keep); above 0 it feasts; Sim.explainFeast(st, hh) gives its parts for the panel (the panel’s line is VB-996). At an occasion’s end (finish, after pourAle), feast lays out min(share × generosity × excess, perGuest × need − ale) rations of grain above the seed (Stores.takeSpare, reason feast, the entry carrying guests, booked, keep and left), where need is the day’s rations of those who came (a child 0.5) and ale the poured barrels’ grain (BREW.grain). Each who came and has not feasted that day eats its part by its ration (pawn.feast = {t, n, host}, owned by sim/occasions); feedHousehold (sim/hunger) gives a pawn who feasted in the last day a full meal from nothing. Each guest household with a living holder, not the host’s, owes the host’s holder what its members ate plus its share of the ale at its grain (relations.book, the gift’s booking between the two holders). Event feast (log, host pawn, atFarm, n = rations; the text names the guests’ count). Counter feastServed (a pawn served). Test tests/feast.js (verify) on the probe state; invariants in checkState: a feast of the last day left its host at or above its keep, and its rations equal what its eaters ate, each one feast a day.perGuest a ration of need, less the ale’s grain, as the design’s line counts ale in the 3 rations, where the criterion wrote perGuest × present; (3) goodwill is booked only at a feast, the ale in it; an occasion with ale and no food books as before (memory and standing only); (4) the food is grain above the seed, a ration of grain a ration of food (no cooking work); (5) the booking is the gift’s (book between the holders), without the gift’s tie gain, since the guests already remember the ale; (6) generosity scales the share, 0.5 to 1.5 (TRAITS.acts.generosity.feast, VB-520’s note).| run | feasts (a village-year) | rations feasted (share of harvest) | rotted share | goodwill booked at feasts | goodwill owed a holder | hungry household-days | helped households a year | growth a year |
|---|---|---|---|---|---|---|---|---|
| populous 7, before | 0 | 0 | 0.339 | 0 | 23 | 26 | 8.1 | 1.57% |
| populous 7, after | 102 (0.42) | 1,320 (0.3%) | 0.327 | 684 | 18 | 25 | 7.6 | 1.48% |
| populous 42, before | 0 | 0 | 0.340 | 0 | 23 | 10 | 10.4 | 2.26% |
| populous 42, after | 77 (0.34) | 1,090 (0.2%) | 0.346 | 677 | 19 | 21 | 10.7 | 2.38% |
| founders 7, before | 0 | 0 | 0.448 | 0 | 16 | 0 | 0.5 | 2.96% |
| founders 7, after | 8 (0.13) | 110 (0.1%) | 0.458 | 31 | 9 | 0 | 0.5 | 2.82% |
| founders 42, before | 0 | 0 | 0.449 | 0 | 46 | 0 | 0.6 | 1.98% |
| founders 42, after | 9 (0.15) | 76 (0.1%) | 0.459 | 18 | 24 | 1 | 0.5 | 1.98% |
The feast works but is small: about 13 rations a feast, the sitting binding at nearly every one (a wedding brings a handful of guests), so it eats under half a percent of the harvest while a third rots, and the goodwill it books (about 45 rations a year on populous small) is lost in the noise of help’s. Households: hungry days and the helped households a year move within the seeds’ noise (seed 42’s hungry days 10 to 21 is a few households in one bad spell); no household is worse off by rule, since a feast leaves its host above its seed and 2 years. Growth is the targets’ as before (both populous seeds above 1%). The shortfall goes to the tuning run (inbox tuning); the harvest home (VB-459) is the occasion that brings feasting to scale.
above 1.5: 100 feasts, 1,361 rations, rot 0.337, goodwill 597, owed 24 a holder, hungry 24, growth 1.54%; above 3: 79 feasts, 932 rations, rot 0.335, goodwill 442, growth 1.52%; share 0.5: 103 feasts, 1,356 rations, rot 0.326, goodwill 705, growth 1.48%. No collapse: the kept values are Kim’s 2 and 0.25; share barely matters, since the sitting binds. The others go to docs/tuning.md (inbox tuning).feastServed: about 500 on populous small seed 7 over 15 years (102 feasts × 5 eaters), 0 in the counters’ 30-day probe; goodwill’s cap of 32 counterparts holds (relations).