Status: done (2026-11-10) Priority: 2 Size: S Arch: life Phase: implement Design ref: VB-214 (its notes: what was checked by hand, and how); docs/review-life.md, section 5. Goal: VB-214 built saves in the page and checked them once by hand (Kim, 10 Nov: deliver the code, test later). This task makes those checks permanent and reports the numbers and pictures VB-214’s criteria asked for. Acceptance criteria:
tests/browser-saves.js (now a script run by hand that prints its results) asserts, in real Chromium and in verify (tests/run.js):
visibilitychange) writes the auto slot, once for one game time;tools/bench.js), at small-y40 and medium-y5, each stage apart (encode, stringify, gzip, IndexedDB write; read, gunzip, parse, decode). Stale fixtures are said to be so. The 0.5 s line is VB-199’s and VB-226’s, not this task’s.docs/img/vb-214-*.png.design.md’s Saving point (Commands, time steps and views) is brought up to Kim’s decisions of 10 November, listed in VB-214’s notes, by whoever holds the design pass; until then VB-214’s notes stand.
Notes:tests/browser-saves.js is now an asserting test (in tests/run.js verify, in the browsers’ lane, run through
browserHTML like the other browser tests; about 20 s; node tests/browser-saves.js OUTDIR also writes the screenshots). One archipelago
(populous tiny seed 7, a played pawn) is saved to slots 1 and 3 and to a file, the page is hidden (auto slot written once for one game time, and
again after time passed), Main menu then Back to game leaves the hash as it was, a second archipelago (founders seed 11) is saved, two saves are
made to look like another build’s; after a reload Continue gives slot 1’s hash, the message shows, Delete it removes only that save, Start a new
game regenerates the same world (a checksum of the world’s arrays), Delete archipelago removes founders’ saves and no other, the file loads to the
hash it was saved at and takes no slot, and a file of another build is refused with the message. Console and page errors fail it.
tools/save-times.js (new, --help) times each stage in Node and in Chromium. No src/ change; no bug found.Times (10 Nov 2026, the container’s CPU, median of 3 after a warm-up, ms; all four fixtures are STALE against the golden hash, as the late-save fixtures were copied, not remade; the states are the saved ones). The 0.5 s line is VB-199’s and VB-226’s. The IndexedDB write is the page’s blob put, done when the transaction completes.
| JSON / gzip MB | encode | stringify | gzip | IDB write | IDB read | gunzip | parse | decode | |
|---|---|---|---|---|---|---|---|---|---|
| Node, small-y40 | 28.3 / 4.94 | 362 | 155 | 420 | - | - | 128 | 127 | 144 |
| Node, medium-y5 | 18.7 / 3.79 | 329 | 132 | 321 | - | - | 82 | 104 | 144 |
| Chromium, small-y40 | 28.3 / 4.97 | 290 | 165 | 864 | 7 | 3 | 153 | 96 | 120 |
| Chromium, medium-y5 | 18.7 / 3.79 | 189 | 133 | 602 | 5 | 2 | 99 | 53 | 108 |
Encode and stringify (about 0.5 s at small-y40, 0.32 to 0.46 s at medium-y5) are main-thread work; the gzip is the largest stage in Chromium
(0.6 to 0.9 s), but CompressionStream runs off the main thread. Load: about 0.3 to 0.4 s in both, plus the world’s regeneration (not timed).
docs/img/vb-214-*.png: landing (desktop, phone, and from a game), generation screen (desktop, phone), the Saves overlay from
the landing page and from a game (desktop, phone), and a file of another build refused.design.md’s Saving point, was brought up to Kim’s four decisions of 10 November by the orchestrator, on Kim’s instruction (10 Nov 2026).