village-builder

VB-408: Fast behavior-focused tests without permanent golden baselines

Status: done (2026-11-13) Priority: 1 Size: L Design ref: User-approved test suite review, 12 November 2026; docs/testing.md Goal: Implement the user-approved test suite review without gameplay or tuning changes. Acceptance criteria:

Decision: Kim explicitly requested this PR, including retirement of golden gates. No design or tuning change. Impact: tests, runner, CI and development documentation; one simulation comment changes, no executable gameplay code.

Implementation: 43 fast, 94 integration and 8 extended commands. Only the standalone golden script is removed; record’s embedded historical story hash is replaced by event-index consistency. Generated scenarios remain in integration. Runner handles signals/spawn failures, process-group timeout cleanup and worker validation; browsers share one lane. CI runs fast and integration once each; nightly owns long fixtures and measurements. No gameplay or tuning changes.

Validation: fast suite passed 43/43 in 16.5 seconds versus the review’s 293.9-second old default (about 94% less). Full verification started: short contracts, generated scheduling, event history, and browser/base, speed and mobile passed. User requested immediate PR submission because usage was running out; remaining integration is delegated to PR CI. Extended/nightly scenarios were not run locally. Build and whitespace checks passed; main’s documentation changes merged cleanly. Targets: seven counter targets remain out as before; three scaling targets reported out. No targets or baselines changed.

Finished 13 November (second session). Every tier was run to its end here (4 cores, Node 22):

Second pass, 13 November, after Kim: “The tests that are run for each task must be quick. Running 5 minute job is not workable. npm verify should be based on small targeted scenarios (heavily constructed on the super small size), nightly can run the longer tests.” Verify is cut to the scripts under 5 seconds: 86 scripts in 35 s (was 139 in 245 s); the 53 over it (every generated island and run of years, jsdom’s smoke, the six Chromium scripts) moved as they are to the extended tier, which the nightly workflow runs with Chromium. The runner names a verify script over 5 seconds, without failing. AGENTS.md now asks for verify at the end of every task, and for the page’s scripts by name on a change under src/page/. What a task no longer runs is listed in docs/testing.md (What runs only at night); VB-409 rebuilds each on a small constructed state, the page first.