Status: done (2026-11-10)
Priority: 2
Size: S
Arch: yardstick
Phase: wrap-up
Design ref: none (measurement). docs/roadmap.md, sections 3.0, 5.2 (the budget, Decided, Kim, 3 November) and 6.
Goal: Check slice 0 as a whole. Every later slice must be measurable at its own cost, early and late in a run, cheaply. Say where the game stands against Kim’s budget, and name a task for every line over it. Blocked until VB-192 to VB-198, VB-201, VB-088 and VB-163 are done. VB-199 may follow if it still waits for Kim; the save line is then reported as over budget. VB-055, VB-057 and VB-166 may follow too.
Acceptance criteria:
docs/bench/budget.md) filled from a fresh nightly bench at both references (medium-y5 and medium-ref, a whole game year each): ms per game day, ms per living pawn-day and their ratio, the longest step, save (main thread) and load, and each system against its share; the history ratio on small-y40 against small-y5 (tests/history.js).docs/bench/closure.md). For each line over it, a task proposed or an existing one named (VB-127 for talk, for example).HEAD, with the entries left in tests/cost-baseline.json and the task that clears each. (Since VB-263 there is no cost-baseline.json: read as the counters, exponents and ratios at HEAD as targets with residuals, and the task that closes each.)npm test and npm run verify timed before slice 0 and after. AGENTS.md says about 10 s and 40 s; if the new checks moved either, say which and by how much.docs/roadmap.md, section 5.1: the table of costs brought up to date in a new column; REVIEW.md’s cost findings checked against the numbers.HEAD, in or out.
Notes:npm test took 68 s on 4 cores (72 scripts), and the notes of VB-196 and VB-174 give 233 to 284 s for npm run verify.medium-y60 replaced by medium-ref. VB-226 (the save, after VB-199 and VB-204) and VB-227 (jobs) are new; like VB-199, they may follow, and their lines are then reported as over.vb-200 from 7205992). Measuring and documents only; src/ untouched, golden file unchanged.
7205992 (format 2, fresh; medium-ref year 12, 1,010 living). Not published. npm run nightly
was not used: with GH_TOKEN set it publishes. Its steps by hand, one at a time: tools/fixtures.js make, tools/bench.js three
times in a row, tests/history.js --record and tests/scaling.js --record, tools/bands.js. (tests/history.js has no --help:
asked for it, it ran, and finding fixtures missing it fetched the published ones over two being made; those two were remade.)docs/bench/budget.md, the last of the three runs; means and ranges in docs/bench/closure.md, “Slice 0’s wrap-up”):
medium-ref 164.8 ms a game day (161.0 to 170.4) against 200, in; medium-y5 135.1 (120.5 to 143.4). Longest step 38.4 (34.9 to
41.8) and 33.9 (28.0 to 38.8) against 60, in; small-y40 31.5 and 40.3 alone, 43.0 inside verify, in. Save, main thread, 315 ms
(290 to 334) against 500, in; load 221 (170 to 268), in; 4.24 MB gzipped against 10, in. Per living pawn-day medium-ref over
medium-y5 1.04, 1.00, 1.19; small-y40 over small-y5 by wall clock 1.10 and 1.10 alone, 0.95 in verify, against 1.25.medium-ref: 9 of 15 shares in, 6 out: idle strolls +1.56 and walking and working +1.14 (VB-245), paths and routes +0.47
(VB-236), the moving round’s day +0.20 (VB-242), the rest of Sim.advance +0.11 and meetings +0.01 (at the line; their ranges span
it; VB-245 and VB-242). All 15 in at medium-y5. Jobs, VB-227’s line, is in (26.4 against 30).docs/bench/targets.md; closure.md, “Cost growth”): history 19 of 25 in, 6 out: routeExpand 1.436 and
routeRefresh 1.598 (VB-236), walkTies 1.277 (VB-269), roundPairs 13.17 and heirRank 1.269 (VB-242), recordFold 2.859 (VB-268).
Scaling 23 of 25 in: routeRefresh 1.265 (VB-236), roundPairs 2.00 (VB-242). node tests/counters.js passes, no counter moved.
roundRank, oppAsk, planReview and cookFarm, out in VB-263’s table on stale fixtures, are in.docs/bench/bands.jsonl, the record at 9c8885b, src/ as 7205992): 31 in, 19 out, 0 errors: the hunger
floors (hungry-households on 10 runs, hunger-deaths on 8) and population on heirs seed 42 (0.72). Invariants 0 everywhere. No task
owned them: VB-270 proposed (needs review; QUESTIONS.md, “VB-270”).small-y40: VB-201’s 34.0 ms is right. The 143.7 of VB-261’s survey was the maximum of one run
inside verify (103 scripts on four cores; the step’s time includes being descheduled), not the code or a stale fixture’s fold:
aea615a’s own tests/history.js on the same d196f68 fixtures reads 38.8 and 37.3 alone, 7205992 25.0 on them.walkTies: 1.277 on fresh fixtures, out by 0.027; VB-235’s 0.970 is what the d196f68 fixtures give (0.970 at
7205992 too). VB-269 stays open, noted there.AGENTS.md said about 10 s for npm test and 40 s for verify (quoted in this task on 3 November; the git
history here starts on 9 November, so not re-measured). The first numbers recorded since: 68 s for npm test (72 scripts, this
task’s note of 7 November) and 233 to 284 s for verify (VB-196’s and VB-174’s notes). Now, alone on 4 cores: npm test 61.0 s
(88 scripts, 2 targets out), node tests/run.js verify 131.9 s (103 scripts, all hard checks pass, 8 targets out). So npm test
moved most, 10 to 61 s (6 times; 72 scripts on 7 November, 88 now), and verify
40 to 132 s (3.3 times), down from 233 to 284 on 7 November (the agents’ cut, VB-205, and faster fixture loads).docs/roadmap.md, section 5.1: three columns of 10 November (living, ms a game day, ms per living pawn-day; populous small seed 7,
one 41-year run and year 41 from the year-40 fixture: 35.5 ms a day at year 1 to 105.6 at year 41, 0.11 to 0.15 a living pawn-day,
against 68 to 227 and 0.19 to 0.31), a column by system for year 41, the medium references and the year-40 state’s size and save.
Section 5.1’s “Reading” bullets (clock.js:118, 17 loops over every record, the daily tie decay) describe 3 November’s code and
are left as the record; VB-267 may want to mark them as history.REVIEW.md’s cost findings against the numbers: “190 to 220 ms a game day” (30 October, 826 pawns): now 135 at 895 living and 165
at 1,019. “Talk is the largest cost” (2 November): still the largest single line (39.9 ms, 24% at medium-ref), but the agents’
three lines together are 62.8 (38%). “refreshRoutes compares every cached route with every changed tile daily; the cache is
unbounded”: the cache is bounded (60,000, routeEvict 0 at both fixtures), the refresh still grows (routeRefresh 1.60, VB-236).
“The yearly moving round, about 1 s in one step”: its call is 22 to 30 ms at medium-ref, its longest phase 16.7 ms at year 41
(VB-201). “dailyLife 29 ms at worst”: 14.9 at year 41 on small. All five findings are closed or have their task.AGENTS.md is not this task’s): line 52, “--update only lowers excesses in tests/cost-baseline.json” (the file
is gone since VB-263); Commands gives no time for npm test and verify (61 s and 132 s on 4 cores today, if it should); “npm run
nightly fetches them, remakes locally what is still stale and runs the bench” leaves out that it publishes when GH_TOKEN is set,
as it is in these sessions; and tests/history.js and tests/scaling.js take no --help (they run), which an agent told that
every tool answers --help will try.yardstick stays open: VB-227 (needs review), VB-055, VB-207, VB-225 and VB-166 remain in it.npm test passes after the last commit (the backlog check); the golden file is unchanged (no src/ change).