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: tests/saves.js (43 s), and the --extended variants of clock, spread, paths, indexes (the second group of EXTENDED in tests/suites.js). Split from VB-409, which did the page (tests/page.js, harness tests/lib/dompage.js).
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.Noted by VB-409, 16 November 2026.
Tests only; nothing under src/ changed. tests/lib/probe.js gains island(seed, size) and scenario(name, seed): small generated
islands, 36 by 26 (as tests/page.js), 48 by 34 for heirs (on 36 by 26 and 30 by 22 it throws “Not enough room for the debug
villages”). Each is a tenth of a second to generate and seed.
Decision: the scenario cases use these small generated islands rather than tinyWorld maps. Sim.seed runs all three scenarios on a
tinyWorld island too, but a populous year there costs about twice as much (the hand-drawn all-meadow land fills up), and
saves asserted that a save loads into a world generated again from its seed and size, which a tinyWorld cannot show.
tests/page.js already uses a generated 36 by 26 island in verify.
Where each assertion went:
saves (was 43 s at night, the default and tiny maps over 2+1 years): now in INTEGRATION, small. Each key of the state and the
changed tiles agree after save, JSON, load into a regenerated world and advance: founders 42 (saved at 0.6 y, through the autumn
meetings and the round), heirs 7 and populous 7 (a few days in), on small islands; the mid-hour save with the idlers
drawn and the mid-day save between talk turns: on the probe village (10 days + 0.7 h and + 10.5 h, 3 days on). The refusal of
format-2 and format-3 saves: on the probe. Deleted: length (years before the save) and seed 42 of heirs (it does not seed on a small
island). Length is not a rule.clock --extended (populous on the tiny map, 2 years by chunks of 2 y, a day, an hour, 0.1 h): now clock --integration, the probe a
year and a day by chunks of the whole, a day and 0.1 h (same tick count, st.t, invariants and state hash). The hour-chunk falls from
the year case and stays in the 2-day case of npm test. The long run is deleted.spread --extended: the same assertions as its probe case in npm test (the round’s steps, the nights, the meetings’ order and
saves between phases), on the populous tiny map. Deleted: the probe case holds each rule, with its two villages (the meetings’ order
still wraps in one year of two). The load into a generated world is now saves’.paths --extended: worn-in start of populous and heirs and none for the founders, on small islands (thresholds scaled to the land:
populous more than 5 trodden and a path, against 60 and 10); a populous season, not a year, for wear only where pawns walk, on fields,
never on houses, greens or water, stages fitting counts, more than 20 worn tiles; then lanes laid by hand round every house and
green and a green laid on open land, for: a house draws nothing, only its door sends a way to it, at most three non-adjacent ways
onto a green and every other trail side joins the way beside it (now asserted to happen at least once), trodden ground draws
nothing, every trail tile has segments within a tile, thin drops a decoration on a lane and keeps one clear (now asserted to
have a lane). Stays at night, as paths --extended, saying so in its first line: the default island’s year, where the quota “more
than a quarter of the houses have a way to their door” is a statistic of a whole island’s traffic (1 of 10 on the small island
after a year, since its houses mostly face the green).indexes --extended (founders 10 y, populous 3 y on 180 by 130, heirs 5 y; compared each year): now indexes --integration,
compared at the seed and every season of founders (4), heirs (2) and populous (1) on small islands, then after each of 7 deaths
by Sim.killPawn (a holder whose widow and heir take over; a whole household, the holder last, which ends it) and 2 days on. The
short runs bring few events by themselves (2 born, none died), so the deaths are made; the record’s other mutations stay in the
probe case of npm test. The long runs are deleted.Validation: each script passes in each mode; paths --extended passes on the default island (unchanged numbers: worn in
377/211/52, after a year 832/418/150, 352 segments). Times on this machine at load 12 to 25 on 4 cores are descriptions: user CPU
saves 4.7 s, clock --integration 2.3 s, paths --integration 1.7 s, indexes --integration 3.0 s (wall 5 to 17 s under that
load). The night loses saves, spread --extended, clock --extended and indexes --extended (about 110 s measured in the 245-second
verify).