Repository navigation
A worker for phones (generator phase 2); towns with an estate plan again - #509
Merged
Merged
Conversation
…easured cost, a worker lives in its page's memory class Measured in headless Chromium after the cold scenario a worker holds 29-40 MB (heap and buffers); it was counted as 400 MB, so a phone got none. Now 45 MB each within a third of the budget; the page's budget goes to the worker with the land (small caches there too). iPhone profile, CPU 4x slower: the 3x3 around the camera 39.8 -> 11.0 s, the whole land not within the scenario -> 52.6 s. tools/wcount.test.mjs, tools/wcost.bench.mjs; mem.test counts the threads of LodPool itself. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UiczdsWP38p6ohAsRYayXG
…as still read by the estates (every such town threw); undef.test finds any undeclared name in the whole source; farrec.test builds its third world above the floor Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UiczdsWP38p6ohAsRYayXG
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UiczdsWP38p6ohAsRYayXG
k06a
added a commit
that referenced
this pull request
Dec 2, 2026
dev: hotfix for the freeze of build 481 (#509, build 484)
k06a
pushed a commit
that referenced
this pull request
Dec 2, 2026
…ps move to gw 77, build 482 - The gates of this branch (bends by bisectors, forks, bridge decks as ramps, track grass strip, ramps under snow, pixel-line markings) are one generator version, gw 77; SHAPE_GW and the other gates under the floor are gone with main's floor. - Golden worlds of this branch pinned to gh 9 / gl 9 / gw 77; old hashes unchanged (1068 checks). - Notes and release shots renumbered to 482 (tools/shots/482.mjs finds its bridges by rise instead of fixed road keys). - 34_settle.js: estate lanes no longer read the removed STR flag (same two lines as in the estate fix of PR #509), without it towns with an estate threw during generation and drive.test could not run. Checked on the merged tree: shape, deck (26 deck steps, 107 track steps), ramp, till snow, golden. drive.test per seed against the same build at gw 72: 56 / 50 / 66 / 46 runs with faults against 122 / 67 / 103 / 145 (seed 5150 town+river does not finish loading on main 481 either: Rail.reachW under Rail.make). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UiczdtfS3F7ut856jKPgvG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Anton · project thread
What
1. Fix on main (build 481): towns with an estate did not plan. The version floor (#466) dropped the constant
STR(always true since), the estates (#494), written before, still read it. Git merged them cleanly, the bundle built, andSettle.planthrewSTR is not definedfor every town with an estate, so its far tiles and columns never came. Fixed at the two reads.New test
tools/undef.test.mjs: the whole game as the build puts it together, scopes by terser, any free name that is not a global of the browser or the language fails. It foundSTR; it runs in 4 s.2. Phase 2 of the generator plan (docs/WORLDGEN.md): a worker for phones. Measured before building:
coldscenario holds 29 MB (small caches) to 25–40 MB (full), heap and buffers; the code is ~16 MB of it.Now
LodPool.count(cores, budget)counts a worker at 45 MB and lets the workers take a third of the budget; the page's budget goes to the worker with the land, so the caches of a small device are small in the worker too. Tiles and columns are the same bytes.coldEmulated only: no real iPhone was tried. A page that dies for memory starts with a smaller budget (
Mem.lvl): an iPhone keeps its worker after one death and has none after two.3.
tools/farrec.test.mjsbuilds its third world at the current versions (genv.test flagged gw 9 below the floor).Tests
tools/undef.test.mjs(new): red on main withSTR, green here.tools/wcount.test.mjs(new, 406 checks): the table of devices, more memory never means fewer workers, a worker with a small budget keeps the small caches and makes the same bytes.tools/wcost.bench.mjs(new): memory andcoldtimes withPHONE=1 THROTTLE=4,NW=0for none.tools/mem.test.mjs: a phone now has exactly one worker of the pool and still fits its budget (it counts the pool's own threads; the hook also counted the watchdog and the mesher).Sources
Runtime.getHeapUsage(backingStorageSize) andEmulation.setCPUThrottlingRatefor the measurement.Rules added to docs/ARCHITECTURE.md: "A thread is counted at what it measurably holds, and lives in its page's memory class" and "Every name the code uses is declared, checked over the whole source".
No screenshots: nothing on screen changes (the same tiles sooner).
https://claude.ai/code/session_01UiczdsWP38p6ohAsRYayXG
Generated by Claude Code