The Workshop · The Road, chapter one
The forest that stopped burning
One of the simulations in the Atlas of Emergence froze when a narrower window shrank its grid. This page follows the fix from the first sign of trouble to a person's decision.
Try the bug
Two copies of the same simulation: the code before the fix, and the code after it. Nothing runs until you press the button. Then both start, and a moment later each frame gets narrower, the way a window does when a phone turns upright. The copy before the fix goes dark and stops. The copy after the fix keeps burning.
The pictures are stills of each copy after its window narrowed and widened again.
The road
Five steps, each with the record it left. Open a step to see it.
-
NoticedA crawler resized every page of the site, and one froze.
It loaded each of the site's 131 pages at desktop size, then resized it to a phone held upright, a phone held sideways, and back. One page threw an error and stopped moving: the Forest Fire simulation.
The error, from the old code on that resize:
RangeError: offset is out of bounds at Int32Array.set (<anonymous>) at ForestFire.step (…/sim.js:142:19)In that run, the clock stayed at t=111 from then on.
-
Defined“Done” was written down before the fix was built.
Done meant:
- Resize the page from 1440×1000 to 390×844, then 844×390, then back to 1440×1000.
- No error after any resize.
- After each resize, the simulation still moves: its clock and its counts of trees and burning cells change.
The check's last line, on the old code and on the fix:
VERDICT before: errors=1 allResizesStillRunning=false VERDICT after: errors=0 allResizesStillRunning=true -
BuiltOne worker built it: a one-line change.
The worker is a Plumb, named for the plumb line, which shows what's truly vertical.
The simulation kept a scratch buffer sized for its grid. A resize rebuilt the grid but kept the old buffer. When the grid got smaller, copying the old buffer into it threw the error, and the animation stopped for good. The fix clears the buffer whenever the grid is rebuilt, so it's made again at the right size.
The error happens only when the grid shrinks, which is why the frames above get narrower.
public/atlas/entries/forest-fire/sim.js @@ -42,6 +42,7 @@ // spark's blaze can be summed across the many ticks it burns. this.fireId = new Int32Array(n); this.fireId.fill(-1); + this._fireIdNext = null; // step()'s scratch; re-made at the new size this._nextFireId = 0; this._fireSize = new Map(); // fireId → running cell count for live fires this.lastFireSize = 0; -
CheckedA worker that didn't build it checked it.
This worker is a Truey: a wall is true when it's plumb, level and square.
It built the old code and the fix in separate copies and wrote its own test. On the old code, it got the same error, and the clock stopped:
resize -> 390x844: sim width 714 -> 344 (onResize fired: true) … [after 390x844] ALIVE=false (ticks +0, gridChanged=false) … S1 page errors: 1 390x844: RangeError: offset is out of bounds @ at ForestFire.step (…/sim.js:142:19)Then it tried three paths the builder hadn't:
- Widen only, from phone to desktop. Neither copy threw an error, but the old code lost track of which fire up to 663 burning cells belonged to. The fix lost none.
- Pause, shrink, then play. The old code threw the error. The fix kept running.
- Shrink and widen, then reset or randomize. The fix gave no errors.
Its verdict: pass, with notes, none of them blocking.
-
DecidedMerged and published on 2 November 2026.
A person decides whether the fix goes public. On this site a merge publishes, so nothing merges without that go. It was merged on the evening of 2 November 2026, and the Forest Fire simulation in the Atlas runs the fixed code now.
Pull request #20 · merged
The public record is pull request #20 on GitHub.