The woods and the highway keep to the flat cap #136

Owner

Tracker: #3621

Step 4d of plan #3558 (D4): no drawn land at y ≥ 0 lies inside a water or lake tile. #3620 put the land's waterline, flat cap and bank on the land tiles; this step holds the woods cap and the highway to that flat cap, along their segments and over their triangles, not only at their vertices.

What changes

  • The shared helper (src/shared/contour.ts): FlatCap indexes the flat cap's outline, the land loops' lips, by tile. Each tile is marked as wholly on the cap, wholly off it, or holding some of its outline, so a run far from the coast costs one lookup per segment.
    • The cap lies on the left of each lip, as the interior of a ring of positive signedArea does.
    • hold(ring) returns the pieces of the region on the ring's left that lie on the cap, by the even-odd rule, each as a ring of its own. Each piece runs along the ring while it lies on the cap. From where the ring leaves the cap, it runs forward along that lip, through its corner vertices, to where the ring next comes back onto the same lip. This pairs each exit with an entry the way polygon clipping does, so a ring that spans a pinch, where two land loops part, gives one piece on each loop's cap. A ring wholly off the cap holds to nothing.
    • Each piece of the ring between two places where it meets the outline is judged by its middle point. A piece that lies on the outline counts as on the cap, so a ring that runs along the outline, as the woods do beside the water, is kept as it is.
  • The woods (forestLoops): it takes the FlatCap and returns every held piece of each outline.
    • On a forest–water edge, its point is the land loop's lip point for that edge, so it lies on the flat cap's edge.
    • Where it turns between two forest–water edges, it turns through the lip's corner vertex. At a water corner the woods wrap, that is the flat cap's wrapped-corner vertex.
    • The whole outline is then held to the cap. That holds its forest–land points and the segments joining them to the lip, where they would cut into the lip near the water.
  • The highway (src/client/render/island.ts): the shoulder, paving and dash ribbons keep their strip of quads where a quad's tiles lie wholly on the cap. Each other quad's two triangles are wound with their area on their left and held to the cap, and each piece is triangulated by Earcut. So a ribbon side that would pass the cap's edge follows it, corner vertices included, and a triangle over a pinch draws on both land tiles and not across the water between them.
  • buildSurface builds one FlatCap from the land loops it is given, and the woods and the highway share it.
  • changelog.md: the Current bullet #3620 added now says the woods and the highway keep to the flat ground too.

Tests

  • src/shared/contour.test.ts, over the generated islands of src/mock/islands.ts (seeds 1–8 that generate, at 64² and 128², Island and Land, Lakes 0, 0.25 and 1):
    • every forestLoops segment, sampled every 0.05 along it, lies inside the flat cap, to 1e-3;
    • a hand-built map pins a water corner the woods wrap: the woods outline turns through the flat cap's corner vertex there;
    • hold over hand-built caps, each checked on a 0.01 grid against the ring ∩ the cap (offCap): a ring that leaves the cap and comes back holds to the part of it on the cap, along the lip between; a ring that spans a pinch holds to one piece on each land tile's cap.
  • src/mock/island.test.ts, over the same maps: every woods-cap triangle and every highway shoulder, paving and dash triangle lies inside the flat cap's outline, to 1e-3. Each triangle within a tile of a water or lake tile is sampled every 0.05 along its edges and on a 0.05 grid over its area within a tile of the water; each other triangle at its vertices.
    • A hand-built 8×8 map has two land blocks that meet only at a pinch, and a road that turns on the tile beside it, shifted 3/8 toward the pinch. Every highway triangle, sampled on a 0.05 grid, lies on the cap.
    • Coverage, not only containment: each map is drawn again with every water and lake tile made Land, where nothing but the map's edge holds the highway. On a 0.05 grid in each tile within a tile of the water, each highway layer (shoulder, paving and dash, told apart by lift) must cover exactly the points its twin's layer covers and offCap puts on the cap. A point within 0.004 of a triangle's edge, or off the cap by no more than 0.004, is not compared. The pinch map runs this check, and so does a test over the generated islands. It compares 2.63M points that either highway draws, 2.58M of them covered, and takes 3 s on m5.
    • The task names src/client/render/island.test.ts. src/client/boundary.test.ts refuses any /server/ import under src/client, generateIsland included, so the test sits beside #3620's generated-island surface tests.
    • Both tests measure against offCap in src/mock/islands.ts: an even-odd test over the lips by rows, with the distance to the outline when a point lies off it. It shares no code with FlatCap.
  • src/client/map.phone.ts: at 1×, in every finish and coast view, every published water point and wrapped-corner point draws as water or foam, beside bare land, the woods and the highway alike. The land and convex-corner points still draw as land, and the woods view still holds a water corner the woods wrap.

Evidence

The review of f861a51 (run 375), answered at c035227

  • No test pinned that ribbon draws every piece cap.hold returns (test coverage). c035227 adds the coverage check above to src/mock/island.test.ts. It is a test-only change, so the benches and renders below stand for this head and were not rerun.
    • Mutant: in a git archive copy of c035227, ribbon's loop over cap.hold(…) was cut to cap.hold(…).slice(0, 1). contour.test.ts, src/mock/island.test.ts and src/client/render then failed exactly the two coverage checks, and passed the other 200 of 202 tests.
      • On the pinch map, 14 grid points go missing.
      • Over the generated islands, 693 points go missing, on 15 maps: 128² Island at seeds 1, 2, 5, 6 and 7, at each lake share.
    • Control: the same copy with island.ts restored passed both checks, with 0 points apart.
  • Gates (m5): sak-gate full run 5 at c035227 passed: npm test 895/895 in 26.2 s, and test:phone 180/180 in 200.7 s.
    • Four earlier gate runs failed only on "Test timed out in 5000ms", under load from other runs on the runner. Runs 1–3 ran an earlier version of the commit, whose new test took twice as long: fast 1 and 2 failed on craft's two-gunship landing test, and full 3 on that test and hud-css's text contrast. Run 4 was full at c035227, failing on the craft test alone while run 389's sx full gate ran beside it.
    • Alone, craft.test.ts passed 22/22 in 1.7 s. Under the same load, f861a51's suite and that earlier version's, run interleaved twice from git archive copies, failed the same 7 tests on timeouts.

The review of 656519d (run 349), answered at f861a51

  • A highway over a pinch (finding 1): the review's 8×8 map, two land blocks meeting only at the corner (4,4), with a road turning at (3,3) shifted by encodeShift(s, s). Each road triangle was sampled on a 1/20 barycentric grid and measured with offCap and wetDepth.

    s 656519d: most off the cap 656519d: samples in water (deepest) f861a51
    0 0 0 0, 0
    0.25 0.232 688 (0.134) 0, 0
    0.375 0.276 1,327 (0.181) 0, 0
    7/16 0.280 1,301 (0.185) 0, 0
    • The new island.test.ts test, at s = 3/8, fails on 656519d's tree with 2,283 samples off the cap, and passes on the head.
  • Each exit pairs with an entry on its own lip (findings 1 and 2): hold follows the lip forward by the cap's side, not the shorter way round, and returns each piece as its own ring.

    • On a git archive copy of the head, walking the lip backward fails both new hold tests in contour.test.ts in under a second. The first has 9,009 grid points apart, and the pinch test fails too.
    • Going from each exit to the run's next entry, whatever its lip, as 656519d did, fails the pinch test (1 piece instead of 2, 1,899 points apart) and the island.test.ts pinch test (2,076 samples off the cap).
  • nearest and the null exit and entry are gone (finding 3). A ring's pieces now break only where it meets the outline, at a hit that carries its place on the outline. So every exit and entry has a place by construction.

  • The held geometry equals the unheld geometry ∩ the cap. Both probes ran by scanline on a 0.05 lattice, skipping points within 0.004 of an outline.

    • The woods: forestLoops against itself with a hold that keeps each ring as it is, ∩ the lips. 0 mismatches over 393M lattice points on the 96 maps of generatedIslands(), and 0 over 97M on 23 partly known maps (64² and 128², 3 or 8 random known disks each). The backward-walk mutant gives 93M mismatches.
    • The highway: the head's up-facing shoulder, paving and dash triangles against the base b76502d's unheld ones ∩ the cap, in tiles within a tile of the water. 0 mismatches over 2.59M points on the 96 maps, and 0 over 170k on the 23 partly known maps. The control, the base's own highway in place of the head's, gives 58,009.
  • Fuzzing: 3,000 tries each hold a random triangle up to 3 tiles across over a random 10×10 map with random shifts, checked against ring ∩ cap on a 0.02 grid. A try with no land or a degenerate triangle is skipped. The head fails none, and 723 of its triangles give more than one piece. 656519d fails 299.

  • The drawing is unchanged on the yard's islands: seed 68 (the coast views) and seed 42, Island and Land, at 128² with Lakes 0.25. The head's woods cap and highway cover the same lattice points as 656519d's in every layer, with a few triangles fewer (6,843 against 6,851 at seed 68). So the renders below, made at 656519d, stand for the head.

  • Rebuild cost (Shore yard, Playwright WebKit, iPhone 15 landscape, on m5): 5 sessions × 7 interleaved runs per arm, 140 pages with no page error, from git archive trees built by vite build() and served by preview(). Each figure is the median of the runs' rebuild means, in ms:

    arm rebuild landLoops buildSurface shore render
    main 672fc28, with the head's shore.ts 16.47 2.07 13.80 0.20 0.47
    base b76502d 11.27 2.40 8.27 0.20 0.47
    656519d, the reviewed head 13.87 2.53 10.73 0.20 0.47
    head f861a51 13.60 2.53 10.33 0.13 0.53
    • The head is 2.87 ms under main's rebuild (phone estimate −21.5 ms), inside the step's bound of main + 2.2 ms. It is 2.33 ms over the base's (phone estimate +17.5 ms), and 0.27 ms under 656519d's (phone estimate −2.0 ms).
    • Every session's median lay within 0.07 ms of these figures. The shore field's first build (17–18 ms) and reveal (0.4 ms) are the same on every arm. map.phone.ts's 40 ms rebuild bound holds.
    • main's arm differs from the head's shore.ts only by a local WOODS_SHADE = 0.9, because main's ground.ts does not export it.
    • The bench ran 22:29–22:31, right after gate run 1, in a quiet window: the one-minute load was 3.4 at its start. Before it, run 366, a reviewer on the same runner, had run sx at a one-minute load of 28–43 while this run waited, 22:14–22:22.
  • The Map Yard frame bench was not rerun. The head draws the same coverage as 656519d on the yard's islands, as shown above, and its figures at 656519d follow below.

  • Gates at f861a51 (m5): sak-gate full run 1 passed: npm test 894/894 in 21.9 s, and test:phone 180/180 in 193 s.

Measured at 656519d

  • Base checks: the base b76502d's geometry, measured with the same sampling and offCap: 8,681 of 73,850 forestLoops segments leave the flat cap, up to 0.606, and 11,917 woods-cap and 3,546 highway triangles within a tile of the water have edges off it. On the head, none.

    • With the head's map.phone.ts, the base tree's coast-view test fails water in every finish and view: 8 to 40 water and wrapped-corner points beside the woods and the highway draw as land per view. The head passes it.
  • Mutation checks (git archive copies of the head, each running contour.test.ts and island.test.ts):

    • forestLoops without hold: the woods segment test fails on 12,560 samples, and the triangle test on 2,223 triangles.
    • Every highway quad drawn as its strip, unheld: the triangle test fails on 3,573 triangles, up to 0.025 off the cap.
    • Without hold and without the woods' turn through the lip's corner vertex: the segment test fails on 41,387 samples, the triangle test on 6,452 triangles, and the hand-built wrapped-corner test fails too. Without hold alone, the turn still puts the vertex there, so that test passes.
  • Renders: the woods and highway views at 1× and 0.5× in every finish with &grid, reduced motion, iPhone 15 landscape, from builds of b9556de (#3619's base, main's drawing), b76502d (the base, #3620's drawing) and the head.

    • Every page drew without errors, with the same draw calls on all three arms. The head draws 371 more triangles than the base (376 in Toybox, with its dashes).
    • The highway beside the water stops at the lip and follows its sawtooth along the grid, where the base laid its shoulder over the water tiles. The woods at the coast follow the grid too, where the base's woods cap cut across the water corners.
  • Partly explored maps, which the tests above do not cover (they use fully known maps): 46 maps (128² Island Lakes 0.25, 128² Land Lakes 1, 64² Island Lakes 1 and 64² Land Lakes 0.25, at seeds 1–6, each known in 3 or 8 random disks of radius 6–26). None of 124,451 woods-cap and highway triangles, each sampled on a 1/20 barycentric grid, lies off the flat cap.

  • Rebuild cost on s32: the Shore yard rebuild took 24.67 ms on main, 16.53 ms on the base b76502d and 20.20 ms on 656519d. Where 656519d's extra over the base went, in Node at 256² seed 42: new FlatCap about 1.1 ms; forestLoops from 2.3 to 4.1 ms, of which hold over the woods' 94 rings and 5,000 points was about 1.1 ms; and the highway's hold of 162 of its 19,450 quads, 324 triangles, about 1 ms.

  • Map Yard bench (src/bench/map.ts, WebKit iPhone 15 landscape, on s32): 5 sessions × 7 interleaved runs, base b76502d against head 656519d at rest, and the head with ?doom=battle, ?doom=battle&spare, ?doom=nuke and ?doom=nuke&spare. Medians of 35 runs, ms a frame:

    view base head head − base (phone) head battle − spare head nuke − spare
    1× 1.473 1.477 +0.003 (+0.02) +0.070 +0.060
    0.5× 2.187 2.193 +0.007 (+0.05) +0.063 +0.047
    0.25× 2.627 2.620 −0.007 (−0.05) +0.090 +0.080
    • The head draws the same calls as the base in every view, with 141 more triangles.
    • The per-session head − base deltas ran from −0.007 to +0.047 ms, but for one: session 4 at 0.25× read −0.120.
    • Run 338, a planner on the same runner, started at 19:17 and built sx through sessions 3–5 (one-minute load 13–16 after the bench), so those sessions carry its noise.
    • The base's doom arms were not run, to fit the step's two hours, so the head's peaks stand against its own spare arms only. The change alters only the woods and highway geometry beside the water, which the yard builds once before the doom plays.
  • The step changes no play, so the AI matches and the net bench were not run.

Tracker: [#3621](https://sak.swipelab.com/tasks/3621) Step 4d of plan [#3558](https://sak.swipelab.com/tasks/3558) (D4): no drawn land at y ≥ 0 lies inside a water or lake tile. #3620 put the land's waterline, flat cap and bank on the land tiles; this step holds the woods cap and the highway to that flat cap, along their segments and over their triangles, not only at their vertices. ## What changes - **The shared helper (src/shared/contour.ts):** `FlatCap` indexes the flat cap's outline, the land loops' lips, by tile. Each tile is marked as wholly on the cap, wholly off it, or holding some of its outline, so a run far from the coast costs one lookup per segment. - The cap lies on the left of each lip, as the interior of a ring of positive `signedArea` does. - `hold(ring)` returns the pieces of the region on the ring's left that lie on the cap, by the even-odd rule, each as a ring of its own. Each piece runs along the ring while it lies on the cap. From where the ring leaves the cap, it runs forward along that lip, through its corner vertices, to where the ring next comes back onto the same lip. This pairs each exit with an entry the way polygon clipping does, so a ring that spans a pinch, where two land loops part, gives one piece on each loop's cap. A ring wholly off the cap holds to nothing. - Each piece of the ring between two places where it meets the outline is judged by its middle point. A piece that lies on the outline counts as on the cap, so a ring that runs along the outline, as the woods do beside the water, is kept as it is. - **The woods (`forestLoops`):** it takes the `FlatCap` and returns every held piece of each outline. - On a forest–water edge, its point is the land loop's lip point for that edge, so it lies on the flat cap's edge. - Where it turns between two forest–water edges, it turns through the lip's corner vertex. At a water corner the woods wrap, that is the flat cap's wrapped-corner vertex. - The whole outline is then held to the cap. That holds its forest–land points and the segments joining them to the lip, where they would cut into the lip near the water. - **The highway (src/client/render/island.ts):** the shoulder, paving and dash ribbons keep their strip of quads where a quad's tiles lie wholly on the cap. Each other quad's two triangles are wound with their area on their left and held to the cap, and each piece is triangulated by Earcut. So a ribbon side that would pass the cap's edge follows it, corner vertices included, and a triangle over a pinch draws on both land tiles and not across the water between them. - `buildSurface` builds one `FlatCap` from the land loops it is given, and the woods and the highway share it. - changelog.md: the Current bullet #3620 added now says the woods and the highway keep to the flat ground too. ## Tests - **src/shared/contour.test.ts**, over the generated islands of src/mock/islands.ts (seeds 1–8 that generate, at 64² and 128², Island and Land, Lakes 0, 0.25 and 1): - every `forestLoops` segment, sampled every 0.05 along it, lies inside the flat cap, to 1e-3; - a hand-built map pins a water corner the woods wrap: the woods outline turns through the flat cap's corner vertex there; - `hold` over hand-built caps, each checked on a 0.01 grid against the ring ∩ the cap (`offCap`): a ring that leaves the cap and comes back holds to the part of it on the cap, along the lip between; a ring that spans a pinch holds to one piece on each land tile's cap. - **src/mock/island.test.ts**, over the same maps: every woods-cap triangle and every highway shoulder, paving and dash triangle lies inside the flat cap's outline, to 1e-3. Each triangle within a tile of a water or lake tile is sampled every 0.05 along its edges and on a 0.05 grid over its area within a tile of the water; each other triangle at its vertices. - A hand-built 8×8 map has two land blocks that meet only at a pinch, and a road that turns on the tile beside it, shifted 3/8 toward the pinch. Every highway triangle, sampled on a 0.05 grid, lies on the cap. - **Coverage, not only containment:** each map is drawn again with every water and lake tile made Land, where nothing but the map's edge holds the highway. On a 0.05 grid in each tile within a tile of the water, each highway layer (shoulder, paving and dash, told apart by lift) must cover exactly the points its twin's layer covers and `offCap` puts on the cap. A point within 0.004 of a triangle's edge, or off the cap by no more than 0.004, is not compared. The pinch map runs this check, and so does a test over the generated islands. It compares 2.63M points that either highway draws, 2.58M of them covered, and takes 3 s on m5. - The task names src/client/render/island.test.ts. src/client/boundary.test.ts refuses any `/server/` import under src/client, `generateIsland` included, so the test sits beside #3620's generated-island surface tests. - Both tests measure against `offCap` in src/mock/islands.ts: an even-odd test over the lips by rows, with the distance to the outline when a point lies off it. It shares no code with `FlatCap`. - **src/client/map.phone.ts:** at 1×, in every finish and coast view, every published water point and wrapped-corner point draws as water or foam, beside bare land, the woods and the highway alike. The land and convex-corner points still draw as land, and the woods view still holds a water corner the woods wrap. ## Evidence ### The review of f861a51 (run 375), answered at c035227 - **No test pinned that `ribbon` draws every piece `cap.hold` returns (test coverage).** c035227 adds the coverage check above to src/mock/island.test.ts. It is a test-only change, so the benches and renders below stand for this head and were not rerun. - **Mutant:** in a `git archive` copy of c035227, ribbon's loop over `cap.hold(…)` was cut to `cap.hold(…).slice(0, 1)`. contour.test.ts, src/mock/island.test.ts and src/client/render then failed exactly the two coverage checks, and passed the other 200 of 202 tests. - On the pinch map, 14 grid points go missing. - Over the generated islands, 693 points go missing, on 15 maps: 128² Island at seeds 1, 2, 5, 6 and 7, at each lake share. - **Control:** the same copy with island.ts restored passed both checks, with 0 points apart. - **Gates (m5):** `sak-gate full` run 5 at c035227 passed: `npm test` 895/895 in 26.2 s, and `test:phone` 180/180 in 200.7 s. - Four earlier gate runs failed only on "Test timed out in 5000ms", under load from other runs on the runner. Runs 1–3 ran an earlier version of the commit, whose new test took twice as long: `fast` 1 and 2 failed on craft's two-gunship landing test, and `full` 3 on that test and hud-css's text contrast. Run 4 was `full` at c035227, failing on the craft test alone while run 389's sx `full` gate ran beside it. - Alone, craft.test.ts passed 22/22 in 1.7 s. Under the same load, f861a51's suite and that earlier version's, run interleaved twice from `git archive` copies, failed the same 7 tests on timeouts. ### The review of 656519d (run 349), answered at f861a51 - **A highway over a pinch (finding 1):** the review's 8×8 map, two land blocks meeting only at the corner (4,4), with a road turning at (3,3) shifted by `encodeShift(s, s)`. Each road triangle was sampled on a 1/20 barycentric grid and measured with `offCap` and `wetDepth`. | s | 656519d: most off the cap | 656519d: samples in water (deepest) | f861a51 | |---|---|---|---| | 0 | 0 | 0 | 0, 0 | | 0.25 | 0.232 | 688 (0.134) | 0, 0 | | 0.375 | 0.276 | 1,327 (0.181) | 0, 0 | | 7/16 | 0.280 | 1,301 (0.185) | 0, 0 | - The new island.test.ts test, at s = 3/8, fails on 656519d's tree with 2,283 samples off the cap, and passes on the head. - **Each exit pairs with an entry on its own lip (findings 1 and 2):** `hold` follows the lip forward by the cap's side, not the shorter way round, and returns each piece as its own ring. - On a `git archive` copy of the head, walking the lip backward fails both new `hold` tests in contour.test.ts in under a second. The first has 9,009 grid points apart, and the pinch test fails too. - Going from each exit to the run's next entry, whatever its lip, as 656519d did, fails the pinch test (1 piece instead of 2, 1,899 points apart) and the island.test.ts pinch test (2,076 samples off the cap). - **`nearest` and the null exit and entry are gone (finding 3).** A ring's pieces now break only where it meets the outline, at a hit that carries its place on the outline. So every exit and entry has a place by construction. - **The held geometry equals the unheld geometry ∩ the cap.** Both probes ran by scanline on a 0.05 lattice, skipping points within 0.004 of an outline. - **The woods:** `forestLoops` against itself with a `hold` that keeps each ring as it is, ∩ the lips. 0 mismatches over 393M lattice points on the 96 maps of `generatedIslands()`, and 0 over 97M on 23 partly known maps (64² and 128², 3 or 8 random known disks each). The backward-walk mutant gives 93M mismatches. - **The highway:** the head's up-facing shoulder, paving and dash triangles against the base b76502d's unheld ones ∩ the cap, in tiles within a tile of the water. 0 mismatches over 2.59M points on the 96 maps, and 0 over 170k on the 23 partly known maps. The control, the base's own highway in place of the head's, gives 58,009. - **Fuzzing:** 3,000 tries each hold a random triangle up to 3 tiles across over a random 10×10 map with random shifts, checked against ring ∩ cap on a 0.02 grid. A try with no land or a degenerate triangle is skipped. The head fails none, and 723 of its triangles give more than one piece. 656519d fails 299. - **The drawing is unchanged on the yard's islands:** seed 68 (the coast views) and seed 42, Island and Land, at 128² with Lakes 0.25. The head's woods cap and highway cover the same lattice points as 656519d's in every layer, with a few triangles fewer (6,843 against 6,851 at seed 68). So the renders below, made at 656519d, stand for the head. - **Rebuild cost (Shore yard, Playwright WebKit, iPhone 15 landscape, on m5):** 5 sessions × 7 interleaved runs per arm, 140 pages with no page error, from `git archive` trees built by vite `build()` and served by `preview()`. Each figure is the median of the runs' rebuild means, in ms: | arm | rebuild | landLoops | buildSurface | shore | render | |---|---|---|---|---|---| | main 672fc28, with the head's shore.ts | 16.47 | 2.07 | 13.80 | 0.20 | 0.47 | | base b76502d | 11.27 | 2.40 | 8.27 | 0.20 | 0.47 | | 656519d, the reviewed head | 13.87 | 2.53 | 10.73 | 0.20 | 0.47 | | head f861a51 | 13.60 | 2.53 | 10.33 | 0.13 | 0.53 | - The head is 2.87 ms under main's rebuild (phone estimate −21.5 ms), inside the step's bound of main + 2.2 ms. It is 2.33 ms over the base's (phone estimate +17.5 ms), and 0.27 ms under 656519d's (phone estimate −2.0 ms). - Every session's median lay within 0.07 ms of these figures. The shore field's first build (17–18 ms) and reveal (0.4 ms) are the same on every arm. map.phone.ts's 40 ms rebuild bound holds. - main's arm differs from the head's shore.ts only by a local `WOODS_SHADE = 0.9`, because main's ground.ts does not export it. - The bench ran 22:29–22:31, right after gate run 1, in a quiet window: the one-minute load was 3.4 at its start. Before it, run 366, a reviewer on the same runner, had run sx at a one-minute load of 28–43 while this run waited, 22:14–22:22. - **The Map Yard frame bench was not rerun.** The head draws the same coverage as 656519d on the yard's islands, as shown above, and its figures at 656519d follow below. - **Gates at f861a51 (m5):** `sak-gate full` run 1 passed: `npm test` 894/894 in 21.9 s, and `test:phone` 180/180 in 193 s. ### Measured at 656519d - **Base checks:** the base b76502d's geometry, measured with the same sampling and `offCap`: 8,681 of 73,850 `forestLoops` segments leave the flat cap, up to 0.606, and 11,917 woods-cap and 3,546 highway triangles within a tile of the water have edges off it. On the head, none. - With the head's map.phone.ts, the base tree's coast-view test fails `water` in every finish and view: 8 to 40 water and wrapped-corner points beside the woods and the highway draw as land per view. The head passes it. - **Mutation checks** (`git archive` copies of the head, each running contour.test.ts and island.test.ts): - `forestLoops` without `hold`: the woods segment test fails on 12,560 samples, and the triangle test on 2,223 triangles. - Every highway quad drawn as its strip, unheld: the triangle test fails on 3,573 triangles, up to 0.025 off the cap. - Without `hold` and without the woods' turn through the lip's corner vertex: the segment test fails on 41,387 samples, the triangle test on 6,452 triangles, and the hand-built wrapped-corner test fails too. Without `hold` alone, the turn still puts the vertex there, so that test passes. - **Renders:** the woods and highway views at 1× and 0.5× in every finish with `&grid`, reduced motion, iPhone 15 landscape, from builds of b9556de (#3619's base, main's drawing), b76502d (the base, #3620's drawing) and the head. - Every page drew without errors, with the same draw calls on all three arms. The head draws 371 more triangles than the base (376 in Toybox, with its dashes). - The highway beside the water stops at the lip and follows its sawtooth along the grid, where the base laid its shoulder over the water tiles. The woods at the coast follow the grid too, where the base's woods cap cut across the water corners. - **Partly explored maps,** which the tests above do not cover (they use fully known maps): 46 maps (128² Island Lakes 0.25, 128² Land Lakes 1, 64² Island Lakes 1 and 64² Land Lakes 0.25, at seeds 1–6, each known in 3 or 8 random disks of radius 6–26). None of 124,451 woods-cap and highway triangles, each sampled on a 1/20 barycentric grid, lies off the flat cap. - **Rebuild cost on s32:** the Shore yard rebuild took 24.67 ms on main, 16.53 ms on the base b76502d and 20.20 ms on 656519d. Where 656519d's extra over the base went, in Node at 256² seed 42: `new FlatCap` about 1.1 ms; `forestLoops` from 2.3 to 4.1 ms, of which `hold` over the woods' 94 rings and 5,000 points was about 1.1 ms; and the highway's hold of 162 of its 19,450 quads, 324 triangles, about 1 ms. - **Map Yard bench (src/bench/map.ts, WebKit iPhone 15 landscape, on s32):** 5 sessions × 7 interleaved runs, base b76502d against head 656519d at rest, and the head with `?doom=battle`, `?doom=battle&spare`, `?doom=nuke` and `?doom=nuke&spare`. Medians of 35 runs, ms a frame: | view | base | head | head − base (phone) | head battle − spare | head nuke − spare | |---|---|---|---|---|---| | 1× | 1.473 | 1.477 | +0.003 (+0.02) | +0.070 | +0.060 | | 0.5× | 2.187 | 2.193 | +0.007 (+0.05) | +0.063 | +0.047 | | 0.25× | 2.627 | 2.620 | −0.007 (−0.05) | +0.090 | +0.080 | - The head draws the same calls as the base in every view, with 141 more triangles. - The per-session head − base deltas ran from −0.007 to +0.047 ms, but for one: session 4 at 0.25× read −0.120. - Run 338, a planner on the same runner, started at 19:17 and built sx through sessions 3–5 (one-minute load 13–16 after the bench), so those sessions carry its noise. - The base's doom arms were not run, to fit the step's two hours, so the head's peaks stand against its own spare arms only. The change alters only the woods and highway geometry beside the water, which the yard builds once before the doom plays. - The step changes no play, so the AI matches and the net bench were not run.
agra merged commit de104c3755 into task/3558-build-inside-the-city-and-a-flat-map 2026-10-24 01:15:51 +03:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
agra/mini-alert!136
No description provided.