Status: done (2026-11-09)
Priority: 1
Size: S
Arch: yardstick
Phase: plan
Design ref: Balance loops and targets (Performance budget); Vision and scope (Population). docs/roadmap.md, sections 5.2 and 5.3; Kim’s decisions of 7 November 2026 (QUESTION_ARCHIVE.md).
Goal: Make the budget a target the game can be held to. The review of the work since 3 November found three things, and Kim answered on 7 November:
medium-ref, steps under 60 ms on medium-ref and small-y40, the history ratio on small-y40 against small-y5, save and load 0.5 s at medium-ref, and medium-y60 as a stress state. Measure them on VB-202’s fixtures, and state which fixture each is measured on. Write a closure table: for every system, its cost today, its share of the budget, and the task that closes the gap. Then carry the result into the bench and the yardstick’s remaining tasks.Context, measured 7 November on 6eaa6bc with the stale fixtures of 4df5766 (node tools/bench.js, one run, Node 22, 4-core Xeon at 2.1 GHz). The machine differs from the one used on 5 November, so compare ratios, not milliseconds.
| Measure | Budget today | medium-y5 (880 living) | medium-y60 (2,492 living) |
|---|---|---|---|
| Mean, ms a game day | 160 | 176 | 652 |
| Longest 6-minute step, ms | 60 (medium-y60: 400 for now) | 87 | 248 |
| Moving round, one call, ms | 60 | 47 | 363 |
| Meetings, one call, ms | 60 | 41 | 276 |
| Save, ms | 500 | 1,044 | 6,935 |
| Load, ms | 500 | 286 | 1,657 |
| Save gzipped, MB | 10 | 4.1 | 24.6 |
| ms a living pawn-day, year 60 against year 5 | at most 1.25× | 1.32× |
small-y40.Questions: answered by Kim on 7 November (QUESTION_ARCHIVE.md, “VB-203: the budget re-derived”). The decided lines are in Notes and in design.md, AGENTS.md and the roadmap (section 5.2).
Acceptance criteria:
HEAD on VB-202’s fixtures: medium-y5 and medium-ref (medium-y60 is dropped: Kim, 8 November).design.md (Performance budget), AGENTS.md (Rules for cost) and docs/roadmap.md (section 5.2).docs/bench/budget.md, or beside it: each system’s ms a game day at medium-ref, its share of the 200 ms, the gap, and the task that closes it. VB-205 and VB-206 confirmed, rewritten or closed; a new task for any other line over its share. If the measurements show a decided line cannot hold, a question for Kim with the numbers.tools/bench.js (VB-202 put them in, Kim, 8 November: check them against the closure table). VB-199, VB-200 and VB-201 rewritten for medium-ref, with no medium-y60.
Notes:QUESTION_ARCHIVE.md, “VB-203: the budget’s shares, window and save line”):
tools/bench.js times a whole game year (48 days) from each fixture, so winter, the meetings and the moving round fall inside the window; the round’s and the meetings’ lines are their one call there (inclusive), with no extra call before the window. History schema 2, so the five-run flags compare like with like.SYSTEM_BUDGETS (192 ms, 8 kept back); budget.md shows it in the budget column.saveMainMs); gzip is a line of its own. The 9 November run predates that key, so its saveMainMs was derived from its own saveMs and stringifyMs in history.jsonl.tests/history.js prints the wall-clock ratio of small-y40 against small-y5 (reported only).docs/bench/closure.md: each line with its fixture and whether it is asserted or reported, each system against its share, the steps and the save.medium-ref; new VB-226 (the save, after VB-199 and VB-204) and VB-227 (jobs, after VB-208).design.md (Performance budget, with Kim’s leave in the session), docs/roadmap.md (sections 1 and 5.2) and AGENTS.md (Rules for cost) carry the answers; medium-y60 is gone from the design.9 Nov 2026, validation, at 9f130e6 with fresh fixtures (Node 22, 4-core Xeon at 2.1 GHz):
| Measure | Line | medium-y5 (885 living) | medium-ref (1,032 living) |
|---|---|---|---|
| Mean, ms a game day (whole year) | 200 | 183 | 226; 233 and 237 in two more runs |
| Mean over the old 30-day window | 176 | 215 | |
| Longest 6-minute step, ms | 60 | 75 | 101 (11 to 14 steps a year over 60, all midnights) |
| Moving round, its call, ms | 60 | 30 | 56 |
| Meetings, their call, ms | 60 | 33 | 50 |
| Save, main thread, ms | 500 | 907 | 1,513 |
| Gzip, ms | 431 | 582 | |
| Parse + load, ms | 500 | 325 | 555 (0.33 to 0.55 s over three runs) |
| JSON / gzip, MB | 10 gzip | 28.3 / 5.0 | 39.3 / 6.9 |
| ms a living pawn-day | 0.207 | 0.219 (1.06 times year 5) |
small-y40 against small-y5 (tests/history.js): longest step 58 and 62 ms in two runs (55 in a whole year), wall-clock ratio 0.99 and 1.07, counters pass. By system at medium-ref and the gaps: docs/bench/closure.md. The mean is about 32 ms over the 200 (16%); the four systems over their shares are talk (VB-127), agents and walking (VB-205), daily life (VB-127, VB-201) and jobs (VB-227). No decided line is shown to be out of reach: the save is three times its line, and VB-226 measures it again once the folds land.
medium-y60 is dropped altogether, replacing question 3’s stress role below; the history ratio is reported on small-y40 against small-y5 only. VB-202 carried the decided lines into tools/bench.js. design.md’s Performance budget still names year 60 as a stress state: this plan’s design pass carries the change there. QUESTION_ARCHIVE.md, “VB-202”.small-y40 at most 1.25 times small-y5; medium-y60 against medium-y5 reported nightly.
Rationale, given in the session:
medium-ref is now about year 14, only nine years past year 5, so a loop that doubles the cost by year 60 would show only a few percent there.small-y40 is 35 years past small-y5, more than a generation, with 0.76 dead records per living pawn. It is cheap, it is already loaded in verify, and VB-088’s history check asserts the work counters on the same pair at the same 1.25. The wall-clock ratio and the counters then judge the same pair.medium-ref already bounds; it is not history. The counters by name (roundPairs scaling exponent 2, for example) say which loop grows and why.medium-y60: a stress fixture, reported nightly against twice the reference’s lines (3 November: “a large map may reach about 2,000 at half the speed”), and never gating. Its temporary 400 ms step allowance has ended: no 6-minute step over 60 ms on medium-ref and small-y40.medium-ref.