village-builder

VB-855: Verify’s small cases: the farming year

Status: done (2026-11-16) Priority: 1 Size: L Design ref: docs/testing.md (What runs only at night); tests/suites.js 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: Scripts: newfields, fieldswanted, weeding, soil, hay, byre, herds, herding, drying, forage, dig (second group of EXTENDED in tests/suites.js). Split from VB-409.

Noted by VB-409, 16 November 2026.

Implementation notes (VB-855)

Tests only; nothing under src/ changed. The eleven scripts run on the small generated islands of tests/lib/probe.js (island, scenario; VB-853) and move from EXTENDED to INTEGRATION in tests/suites.js. One keeps a night mode, soil --extended, which says so in its first lines.

Three were red on the run’s branch before this task (so red at night), and now assert what the branch does:

Decision (close call): the soil’s ten-year run stays at night as soil --extended rather than deleted: the farms with cattle keeping their soil (at least 0.95) and the farm without falling below them is a balance of a decade’s crops and dung, and in four years on the small island fresh fields (soil 1.4, above the cap 1.15) take no manure at all, so nothing tells the farms apart. What a run shows of the mechanism is now in verify: a year on, every field’s soil set below the cap (1, 0.9, 0.8 in turn), the spring’s days 1 to 6 cart the heap of each farm with two loads or more onto its fields, its poorest first, and no farm without a heap gains soil.

Where each assertion went:

Validation: each script passes; soil --extended passes (founders 7 after 10 years: soils 1.07, 1.09, 1.07, 0.97, 1.11, as before). CPU each, on this machine at load 28 on 4 cores (a description; wall 0.3 to 12.6 s under that load): newfields 1.8 s, fieldswanted 0.1, weeding 1.8, soil 1.7, hay 3.0, byre 3.3, herds 4.2, herding 3.4, drying 1.6, forage 1.5, dig 1.9. The night loses ten scripts and one shrinks (in the 245-second measure: dig 13, newfields 8, herds 8, herding 8, hay 6, weeding 6, drying 6, byre 6, forage 5, and most of soil 6).

Notes left: a tuning row for the boat that is never begun (VB-393’s surplus).