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: land and geography (rivers, stones, geology, layout, settle, plots, names, populous) and the tools (tools, review-tools, help, bench, commands, record, regress, plaindata, --expose-gc registry, notable, manual). Split from VB-409; the last of its groups, so it also closes its time criterion. May be split again in two (land; tools) if it does not fit a session.
tests/tiny.js’s tinyWorld and tinyState, tests/lib/probe.js) by a script of INTEGRATION under 5 seconds. Where the small case holds everything the long run asserted, the long run is deleted; where the long run shows what a small state cannot (statistics over seeds, generated geography), it stays at night and says so in its first line.docs/testing.md, What runs only at night, says what verify holds again.npm run verify stays under a minute here and names no script over 5 seconds (tests/lint.js, 6 to 7 seconds, is split or sped up); the times before and after are in docs/testing.md.
Not met: verify is 172 scripts and 321 s of CPU over them (at least 80 s on 4 cores), 272 s of wall time here at load 10 to 30; the
largest are outside this group (service 7.4 s of CPU, spread 6.2, fish 5.9, format 5.6, pot 5.4). tests/lint.js is sped
up (7.4 to 1.1 s of CPU). The times are in docs/testing.md. What is owed: bring verify’s sum of CPU under 4 minutes (owed to the
collecting task of tests’ time; noted in the result, no ID left to reserve).Noted by VB-409, 16 November 2026.
Tests and tools only; nothing under src/ changed. The nineteen scripts move from EXTENDED to INTEGRATION in tests/suites.js, on the
small generated islands of tests/lib/probe.js (island, scenario; VB-853) and, where a test needs more room, on a 60 by 44 one.
Four keep a night mode, saying so in their first lines and in tests/suites.js: rivers --extended, layout --extended, populous
--extended, tools --extended. One new script: tests/review-hours.js, the hours half of review-tools (apart, since the
scan of the sources there takes 4 seconds by itself).
Built with it (the task’s goal, and what made the minute reachable):
tests/lib/probe.js generates each small island once per seed and size in a test process and
hands out a fresh copy (typed arrays sliced, the rest structuredCloned, the colour sampler shared); generate(seed, size) makes one
anew, for the tests of the generator’s determinism (rivers, stones, geology, manual). The 23 scripts of VB-853 to VB-855 that
use island or scenario went from 64.4 to 53.3 s of CPU in all, measured side by side at load 15 to 30 (offers 5.0 to 3.9,
meals 1.6 to 0.9, kinship 2.0 to 1.1, plans 3.2 to 2.2, byre 3.8 to 2.9, exchange 3.8 to 2.9, hunger 3.6 to 2.8,
drying 2.0 to 1.3; the rest within 0.5 s); every one passes as before, and asserts what it did.tests/lint.js (7.4 s of CPU) generated the default island three times to read the keys of a world and of founders and heirs: now the
small islands, 1.1 s.tests/lib/runner.js
reads the children’s CPU from /proc/self/stat as each exits): on a machine at load 12 to 30 the wall time is a description, the CPU a
measure.tools/sim.js, tools/balance.js and tools/rules.js take --map probe, the 36 by 26 island, for their tests.tools/stocks.js builds the writes map once a process (its stateFields and build each built it, 2 to 4 s each).tests/tools.js on a build of its own (4 s), are asserted in
tests/dependencies.js on the build it already makes.Decisions:
geology’s and stones’ long runs are deleted, not kept at night: their small case holds every rule, the counts scaled to the land
(geology: more than 20 deposit tiles on three 48 by 34 islands, where three 180 by 130 maps held over 50; stones: the 48 by 34
islands hold over 20 meadows next to hills and over 20 far from them, as the default island did).names runs on 60 by 44 islands and asserts the biggest village has 8 farms or more (12 on the medium map): the rule it guards is
that a village of many farms repeats and numbers no name; the bands of village sizes by map size stay in populous --extended. Not on
48 by 34, where populous seeds villages with no farm and no name (VB-888).tools’ verify part runs the tool three times (a year of founders, saved, with the idle report as text; the households report from
the save; populous’s worn-in paths at year 0); each other report takes a year or two of its own, so they stay at night.manual moves to seed 3 on 60 by 44 (seed 42 there has no two villages well apart), its runs of days cut by a third, and its search
for a field’s and a meadow’s tile takes the first that seeds instead of trying every candidate.Where each assertion went:
rivers (default island at 7 and 42, founders and heirs a year): every per-tile rule (the same rivers, courses and fords on every
generation; courses to the sea, catchment rising, sources in hills, mountain or marsh, per island and spaced; the largest basin’s
mouth; fords joining two banks and on every reach of 5; routes across a ford’s banks; the site score’s river term; thinning), and
nothing built on a river and watered fertility after a season of making fields (34 made): on two 48 by 34 islands (seeds 11, 13).
Night, rivers --extended: the default island at 7 and 42, where ten sources or more, a course through a lake (the small islands have
none) and more than 20 crossings are a statistic of whole islands; a year of fields there.stones: all on two 48 by 34 islands. Deleted.geology: all on three 48 by 34 islands. Deleted.layout: fields one block within 4 steps and next to no green, the houses hanging together with the green, every farm reaching
its green, fields and wood, at populous 7 and 11 (42 on the small island has a crowded village apart from its green); heirs half a year
and its plots; founders a year (4 of 6 farms in one block): on the small islands. Night, layout --extended: the default island,
heirs three years and founders ten. Red, before and after this task: on day 90 of founders 7 the lone farm’s village raises its
green beside two fields (greenSite, src/sim/green.js, takes no account of fields); noted as VB-887, priority 1.settle: every scene on the small islands, the heirs scenes at seed 13 (the first on 48 by 34 whose crowded village founds; seed 7
before, on the default island): founded 17 steps away, the cottage built on day 22 and the first field sown on day 50; founders at seed
7 joins the lone farm 20 steps away. Deleted.plots: the newLand customs on heirs 48 by 34; no pawn holding two cleared plots in two years of founders on 36 by 26 (was 180 by
130), now also asserted not vacuous (2 plots cleared). Deleted.names: all on 60 by 44 islands (above). Deleted.populous: household sizes and their mean, no grandparents, every village with a meeting, determinism, and (added) every village has
a farm and a name: at seeds 7 and 42 on 60 by 44; the generator’s hook in the three scenarios on the small islands. Night, populous
--extended: the four map sizes, for the population each seeds and the village size bands (passes, with the added check).tools: the table, the idle shares, the households report, the worn-in paths: verify, on the probe map. Night, tools --extended: the
idle report’s waits and switches, hunger (JSON and text), perf and the run unchanged by it, counts, tools/balance.js (on the probe
map, passes). The writes map’s owners: tests/dependencies.js (above).review-tools: the stocks lines and marks and the waiting report’s help, unchanged; the hours report reading the run without changing
it: tests/review-hours.js, on the small island (was 120 by 85). Deleted.help (food help): every case on the small island (the default before); the long run of seven and a half years (3 x 360 days) is two
years, village stores non-negative and (added) every invariant; the long runs of tests/invariants.js hold the invariants at night.
It passed so before the last merge of the run’s branch; since VB-461 (merged tonight) it is red, on the default island as on the
small one (“kin gave 0”: a near kin’s gift is now set aside and fetched), so it stays in EXTENDED until VB-889 asserts the fetched
gift.bench: the reduced fixture is populous on 36 by 26 (120 by 85 before); every assertion unchanged.commands: every case unchanged; founders on 36 by 26, heirs on 48 by 34 (the default island before).record: the life view on heirs 48 by 34; founders three years and twelve days on 36 by 26 (ten on the default island): one born
event a pawn, a died one for the dead, a married event a union, every event sound, the fold (close friends and enemies only, one count
per kind, village and year, a folded event read as its count), queries; the save in the middle of the third year’s fold is now of
this founders run (heirs three years before). The year-5 query is a year-2 one. Deleted.regress: founders 7 and 12 two years on the small island (three on the default), a harvest each year and sound stores; the
underflowing walk unchanged. Deleted.plaindata: no function in st after seeding and after a year of founders and half a year of heirs and populous (a year each before;
tests/saves.js loads a JSON save of each scenario, which a function would break). Deleted.--expose-gc registry: unchanged but the CLI’s --explain on --map probe and the save from populous on 36 by 26, and the plain
listing read once. Deleted from night.notable: every case on heirs 48 by 34 (the cottage on a cleared plot in a year, told once). Deleted.manual: every case on 60 by 44 at seed 3 (above). Deleted.Validation: every script of the group passes in verify but help (above); rivers --extended, populous --extended and tools
--extended pass (rivers: 39 lake tiles on courses, 154 fords, 68 crossings); layout --extended fails as it did before. npm run
verify after the last merge: 171 of 172 passed (help, red from VB-461, then moved to the night), 9 targets out (advisory); 272 s at
load 10 to 30, 321 s of CPU over the scripts.
Notes left: VB-887 (task, priority 1: the green laid beside fields, layout --extended red), VB-888 (task: populous seeding leaves an
empty, nameless village on small islands), VB-889 (task, priority 1: help asserts VB-461’s fetched gift).