village-builder

VB-889: Tests: food help asserts VB-461’s fetched gift (help.js red)

Status: done (2026-11-16) Priority: 1 Size: S Design ref: tests/help.js; src/sim/help.js (shareFood) Goal: Verify takes about half a minute and holds a small constructed case of each rule the nightly-only scripts assert (Kim, 13 November) Acceptance criteria: tests/help.js (food help) is red on the run’s branch since VB-461 merged: “kin gave 0, expected 72” (and 48 on the small island). Since VB-461 a near kin’s gift is set aside where it lies and fetched by a member of the asking household (shareFood, src/sim/help.js), but the test still expects the grain in the asker’s store at once after shareFood, and the giver’s store lowered by as much. VB-856 moved the script onto the small island of tests/lib/probe.js (it passed there before the merge) and left it at night, since a red script cannot enter verify.

Noted by VB-856, 16 November 2026.

Implementation (16 Nov 2026): tests/help.js has settle (half-hour steps until no fetch journey). After shareFood the asker store is unchanged, the giver store is lowered at once, and a fetch journey of a member of the asking household exists; after settle the gift is in the asker ledger (gift, from) in full (a store reading would be short by what the household ate meanwhile); the village store likewise; the season cases settle before they read. Back in INTEGRATION after helpers.js. No defect in src/. 3 s CPU; verify 172/172.