Skip to content

Build 468: no Fix.frame error from water that just woke; HUD layout outside its ResizeObserver - #490

Merged
k06a merged 1 commit into
mainfrom
claude/project-thread-md1sc7
Dec 2, 2026
Merged

k06a merged 1 commit into
mainfrom
claude/project-thread-md1sc7

Conversation

@k06a

@k06a k06a commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Two errors from Anton's reports.

Fix.frame: Cannot read properties of null (reading '26') (build 465, desktop, then four times in one place). Flood.open took a water whose lake was measured (st = 2) as running and pushed into its queue, but invade makes that queue only when it first runs, a frame later when the frame's time is used up. A repair crew putting a block back in that frame (Fix.put › Land.set › Flood.near › open) threw. Now a cell opened before the way has started joins the seeds that invade takes first. Test first: tools/flood.test.mjs part 4 threw Cannot read properties of null (reading '59') before the fix.

ResizeObserver loop completed with undelivered notifications (iPhone, build 461). The HUD laid itself out inside the callback of its ResizeObserver; sizes it changed there were observed again in the same frame. The callback now asks for one layout in the next frame. Test first: tools/resize.test.mjs wraps every ResizeObserver of the page and watches its callbacks with a MutationObserver (before: style writes to #acts inside the callback; after: none), and checks the HUD is still laid out after each change of size.

Rules in docs/ARCHITECTURE.md (Robustness): a stage marker never runs ahead of the data it promises; no layout inside a ResizeObserver callback.

Screenshots: tools/shots/468.mjs (release assets).


Generated by Claude Code

…ust woke; HUD layout outside its ResizeObserver

Flood.open pushed into the queue of a water whose stage said running but whose queue invade had not made yet (P.B null, Anton build 465,
four errors in one place): a cell opened before the way starts joins the seeds. tools/flood.test.mjs part 4 reproduces it.
The HUD laid itself out inside its ResizeObserver callback (Anton, iPhone build 461: 'ResizeObserver loop' error card); the callback
now asks for a layout in the next frame. tools/resize.test.mjs watches every observer callback for DOM writes.
Rules in docs/ARCHITECTURE.md (Robustness).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UiczduV6TP2WJ64QZpo7Dn
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

⏱ Performance: this PR against main

Scenarios of src/game/98_perf.js, the two builds by turns on one runner (tools/perf.mjs, CPU side, draws counted not drawn).

✅ No regression against main

scenario metric main PR Δ threshold
– no change beyond the noise
scenario CPU mean p95 max slow/min spikes/min miss sync gens draws top systems (ms/frame)
idle 5.48 8.50 21.5 0.00 7.49 0% 1.00 370 Land.drawPass 0.92, BigMap.sample 0.47, Town.update 0.44, Walk.casters 0.34
night 4.67 7.70 46.7 0.00 12.0 0% 0.00 342 Land.drawPass 0.73, Town.update 0.46, BigMap.sample 0.32, Walk.casters 0.25
drive 31.6 71.7 239 327 120 48% 95.0 112 Land.lightTick 12.9⚠️, Land.gen 3.66⚠️, Land.lodData 1.77, Land.meshChunk 1.61⚠️
flight 14.2 36.7 590 84.9 152 0% 3.00 50.0 Land.lodData 3.04, Folk.update 2.58, BigMap.sample 1.71, Nest.update 0.74
tunnel 12.2 44.0 299 94.9 155 0% 1.00 260 Land.lightTick 2.15⚠️, Land.lodData 1.21, Land.meshChunk 0.97, Folk.update 0.94

Over budget (ms/frame, budget): drive Land.lightTick 12.86 > 1 · drive Land.gen 3.66 > 0 · tunnel Land.lightTick 2.15 > 1 · drive Land.meshChunk 1.61 > 1 · flight Land.gen 0.14 > 0


Generated by Claude Code

k06a commented Dec 2, 2026

Copy link
Copy Markdown
Owner Author

"tests ok" is red only because all 12 test shards were cancelled (run 46950337758: list and bundle passed, every shard cancelled while main is held for #466). No test failed. Locally: flood, floodk, resize and hud pass on this head. CI runs again after this branch is updated on the new main.


Generated by Claude Code

@k06a k06a added the queue In the merge queue: lands on main by itself (node tools/merge.mjs <pr>) label Dec 2, 2026 — with Claude
@k06a
k06a merged commit 0d6643b into main Dec 2, 2026
4 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

queue In the merge queue: lands on main by itself (node tools/merge.mjs <pr>)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants