# W-ROADS6, round 6

**Status: partial branch, not accepted.** The uploaded-ground gate and the time/draw-call budgets remain red. Do not merge as a complete no-hole fix.

Started 8 October 2026, 23:33 CET. Final evidence checkpoint 9 October 2026, 00:26 CET. Operator ceiling: 01:50 CET.

## Changed

1. Endpoint-preserving Chaikin curves are resampled at 1.5 m **inside addRoad, before the road index, branches and house plots**. Main roads get four passes, other cart streets three. Stair paths keep their geometry. Cart roads, including lanes, use the same 9% working grade envelope, below the 12% law. Tested maximum turn bound: 35 degrees per sample.
2. The ground renderer now partitions a shared terrain lattice into disjoint road, paving, pad and verge pieces. Rounded 16-sided junction fans claim the same surface, rather than overlapping road ribbons. Main roads use cobble; lanes use dirt. Vertex tones vary wet/wear patches and rural grassy spines. Worn edges are 0.8 or 1.05 m, including exposed frontage apron edges. A shader fades existing road maps into the meadow map, without any new texture. Grass and verges share one draw call.
3. Squares have eight unequal, slightly skewed sides. Frontage slots iterate the whole polygon. Paving has a different scale/orientation from streets, a 0.87 m large-stone border and a 0.18 m dark gutter. Drainage fall is 0.1%, with less than 5 cm total square height change. Towns and villages now have a primary church parvis as well as cities. `plan.parvis = { poly, y, steps }` is exposed; square polygons and their heights remain public. Shallow treads are rendered where the level difference fits 1-3 steps.
4. Clipped material boundaries are welded and their intermediate points are inserted on both sides of an edge. This removes large T seams in the double-precision geometry. A shared outer lattice avoids separate inner/outer terrain tiles. River water is at its declared level, not lifted above the sampled bank. The primary landmark pad shares the civic paving datum, removing the tall grass cliff found at the cathedral's west front.

The original broad terrain plateau is retained when routing streets; only the final paving and carved-square boundary are organic. This keeps road routing from changing merely because a square corner was trimmed.

Owned source changes are in `ground.mjs`, road/square/grading portions of `settlement.mjs`, and the ground section of `settlement-render.mjs`. Source copies are synced to `browse/building/`. No dressing files or W-LIFE6 call lines were touched.

## Tests and numeric evidence

| Check | Result | File |
|---|---|---|
| Ground, including all tier/site/seed 1-5 door clearances | 8/8 pass | `W-ROADS6-ground-full.log` |
| Renderer with missing kits and repeatable colliders | 2/2 pass, no skips | `W-ROADS6-render-test.log` |
| Curvature, materials/verges, junction union, square/parvis data | 4 pass | `W-ROADS6-roads-full.log` |
| Uploaded Float32 ground gate | **FAIL: reversed grass triangles** | same file |
| Complete settlement suite, run once | **38 pass, 16 fail** | `W-ROADS6-settlement-full.log` |

The complete settlement run finished in 941,369 ms. Twelve failures report square-front distances; the existing test wraps square edges with `% 4` even for eight-sided polygons. Two more square-related trade/church tests calculate the square centre by dividing its vertex sum by four. Those checks need polygon-aware math, but have NOT been rewritten or declared false positives here. **Two failures are road/landmark overlaps**: city/river/seed 1 cathedral vs r4, and city/crossroads/seed 1 cathedral vs r5. Treat those as a real planner regression until fixed or measured against the actual landmark body. The long-segment Chaikin corner cut around the landmark close is a likely cause, not a proven repair. No second full-suite run was made.

The ground and renderer suites passed before the final cathedral datum correction. That final correction was checked with a direct datum sample and a fresh GPU parvis capture, not another full suite. In city/river/1: landmark floor 1.15 m, parvis 1.15 m, door ground 1.15056 m.

`W-ROADS6-numeric-probe.mjs` records numbers without stopping at the first failure. Its `W-ROADS6-numeric.json` measures actual Float32 triangle positions on all five required sweep cases. It was collected after reverting an unsuccessful early-quantization experiment, immediately before the final cathedral floor correction. No failed gate was retried after the second failure.

| Case | Missing cell hits | Reversed tiny triangles | Edge height flags >5 mm | Unmatched sampled edges |
|---|---:|---:|---:|---:|
| town/hill/1 | 0 | 31 | 10 | 4 |
| town/hill/5 | 0 | 5 | 0 | 0 |
| village/hill/1 | 0 | 2 | 0 | 0 |
| city/river/1 | 0 | 174 | 16 | 17 |
| village/plain/2 | 0 | 18 | 0 | 0 |

Largest reversed projected area: 0.00000934 m². Largest reported remaining edge height disagreement: 0.0279 m. Cuts shorter than 3 mm are excluded from the edge comparison, explicitly, because they can collapse on Float32 upload. This is **not** proof of a watertight final GPU mesh. The new gate correctly stays red. Coverage samples and projected total area alone would have missed the edge problem.

The discarded early-quantization experiment made the seams much worse. It was rolled back, not shipped. Its diagnostic data is retained separately in `W-ROADS6-numeric-discarded-upload.json`.

## GPU evidence, looked at

Only disposable previews were used: local `127.0.0.1:8985/settlement.html` returned HTTP 200, and the supplied GPU script staged its own private temporary site on port 8986. No real app/domain was opened.

- `W-ROADS6-before/`: 10 original street/overview shots across all five cases.
- `W-ROADS6-before-civic/`: four original town/hill/1 street, square, parvis and junction views.
- `W-ROADS6-final/`: 31 final street, curve, square, parvis, junction and overview/top shots across all five cases. `errors.json` is empty.
- Contact sheets: `W-ROADS6-before-contact.jpg`, `W-ROADS6-before-civic-contact.jpg`, `W-ROADS6-final-contact.jpg`.
- `W-ROADS6-GPU-METRICS.json` retains every capture's page stats, FPS badge data and ground timings.

I looked at both contact sheets and the final 31-shot contact sheet, plus full-size town curved street, city bridge approach and city cathedral parvis. The broad road edge cracks and jagged white clip shards found during development are gone from these views. The cathedral grass cliff is gone. Worn open edges now fade. This is self-review against the supplied goals and original views, not operator approval or a fixed photographic reference.

Remaining visible issues: curved rows still have safe-placement gaps; some town paving ends against open grass rather than a facade. Some parvis cameras are blocked by the existing lychgate. The cathedral's measured facade is inside its reserved footprint, leaving a narrow grass strip between the main parvis polygon and the actual facade. The bridge deck's dark underside/material is still conspicuous in its eye-level approach. No claim that these are finished old-town visuals.

## Budget, not met

Town/hill/1 original: 3,647,474 triangles, 341 calls; plan/build 710/663 ms.

Final identical auto tier/site/seed, overview/top badge: **3,210,362 triangles, 363 calls**. Plan/build in the first final capture: **759/1276 ms**; repeated top build: **722/1211 ms**.

- Triangles: down 437,112. Pass against the +0.4 M cap for town/hill/1.
- Calls: +22, not the allowed +10. **Fail by 12 calls.** Ground itself uses fewer material draws, but the changed plot arrangement selects different building batches.
- Plan + build: 2035 ms vs 1373 ms, **+48.2%**, not +30%. The repeat is 1933 ms, still +40.8%. **Fail.** Shared host load caused additional noisy timing spikes; those do not excuse the stable overage.
- Town/hill/5 final: 4,057,773 triangles and 360 calls. Its original 3,598,970 triangles grew by 458,803, also above a +0.4 M per-town cap.
- Final probe FPS samples were roughly 59.5-60.7. FPS is not a substitute for the generation-cost limit.

## Integration and undo

Commits 06027df, 060792d, b1668a6 cover curves, surfaces and squares. Commit 7aa8140 records ground joins and the failed upload/budget gates; e87e3b3 and d657334 retain diagnostic evidence. The final report update records the full-suite failure. Revert this worker's commits in reverse order to restore the old ground. Do not revert another worker's dressing changes.

If this branch is accepted without repair, rare uploaded edges can show slits, two city landmark plots clash with roads, generation is too slow, and some views exceed the call limit. The new failing test is deliberately retained to expose that risk.

Not done: no successful final uploaded no-hole gate; no proof for all possible seeds; no final budget acceptance; no keyboard movement/collision sweep; no changes to house assets, lighting, church furniture, vegetation, kits, styles, deployment or live apps. No nested agents. No memory files were edited. Temporary intermediate captures and the local server were cleaned up; final evidence and original captures are retained.

## 6b repair pass

Started 9 October 2026, 00:34 CET. Operator deadline 01:45 CET.

**Still partial, not a complete no-hole acceptance.** The unchanged 5 mm ground seam gate is red. The final GPU cost probe meets +30% in all three samples, but earlier probes exceeded it and the final margin is narrow. The one complete settlement run found a new coastal hall overlap; that is repaired and its original coastal tests now pass. The complete suite was not rerun after late repairs.

### Repairs committed, in requested order

- `053b44d`: square-front checks iterate every edge; trade/church and wealth-ring checks use the area centroid, not a four-corner sum or a vertex mean. The church-corner check measures the nearest real polygon edge. All old thresholds and seed cases remain. A new triangle/uneven-polygon/subdivided-edge centroid check protects the helper. The corrected civic test exposed a real cut-away contact corner and a pillory placed inside a door clearance. The square retains its civic contact corner, and prop placement checks door zones and the real square footprint before placing civic props. No civic test cases were dropped.
- `9def733`: if smoothing enters a landmark reservation, resample the original route to at most 12 m corner runs before Chaikin cutting. This keeps a rounded, sampled route around the cathedral rather than cutting across its body. The new footprint regression passes all 72 combinations of four tiers, six sites and seeds 1-3, including both named city clashes. Every landmark is checked, not only the cathedral.
- `4c143f1`: completed stitch positions are rounded to the actual upload format. Only collapsed/inverted upload needles narrower than 3 mm are removed, explicitly documented in the test. All five sweep sites and the original area/coverage/5 mm seam thresholds remain. Solid bridge abutments support the ends below the waterline.
- `127f70e`, `3812989`: CPU profiling found ground welding, spatial lookup, road projection and grading expensive. Numeric spatial keys, nested numeric weld maps, cached pad transforms and two-coordinate distance arithmetic cut allocation and string work. Already shared two-triangle edges need no missing-corner search. The stitch height and coverage contract is unchanged; this is not declared a successful seam repair.
- `85b38a4`: the first final other-test run exposed town/plain/8 p91 just outside the real centroid-based merchant ring. The planner was still classifying wealth around the former rectangular square centre. It now uses the polygon area centroid. The complete layout-model file then passes 10/10 without skips.
- `250220d`: the complete settlement run found town/coast/6 p1 tavern overlapping p198 market hall. Hall placement had checked only roads, not its full footprint against the real square and houses. Halls now fit wholly inside the real square, never overlap plots, and only fall back across a road when no road-free square quarter fits. The coastal civic-corner adjustment also keeps all eight turns convex. The new hall/landmark regression and explicit coastal case pass.
- `992232c`: the GPU bridge approach remained black despite its solid underside. The deck shared the ground material's vertex-colour flag but had no vertex colours. Giving it a separate stone material without that flag removes the black hole appearance. This follow-up changes only the ground/bridge section of the renderer.

Changed building modules are copied to `browse/building/`. No dress modules, heroes, town-look, render.mjs or settlement.html were edited.

### Ground remains red

Two seam approaches were unsuccessful: coarse welding distorted joins, and interior polygon fans did not close the remaining joins and cost more. Both experiments were rolled back. No third seam repair was attempted and no tolerance was loosened. The uploaded winding defect is removed, but this does not establish a watertight mesh.

`W-ROADS6b-ground-gate.log`: four road/square checks pass; seam check fails at town/hill/1, 0.007106 m against 0.005 m. `W-ROADS6b-final-numeric.log` / `W-ROADS6b-numeric.json` diagnose all five final sweep cases without stopping at the first failure:

| Site | Cell holes | Reversed triangles | Height disagreements >=5 mm | Largest | Unmatched edges |
|---|---:|---:|---:|---:|---:|
| town/hill/1 | 0 | 0 | 13 | 24.37 mm | 6 |
| town/hill/5 | 0 | 0 | 0 | 0 | 0 |
| village/hill/1 | 0 | 0 | 0 | 0 | 3 |
| city/river/1 | 0 | 0 | 32 | 29.72 mm | 36 |
| village/plain/2 | 0 | 0 | 0 | 0 | 5 |

Removed upload needles can leave very thin unmatched boundaries. Long unmatched edges and real height mismatches are NOT excused by the 3 mm rule. The seam gate must remain red until the actual mesh joins are repaired.

### GPU and generation cost

Only disposable worktree previews were used. `http://127.0.0.1:8985/settlement.html` returned HTTP 200. Supplied GPU tooling staged temporary copies on its private 8986 port and cleaned them up. No live app or domain was tested.

`W-ROADS6b-GPU-METRICS.json` and `W-ROADS6b-final-evidence-GPU.log` retain measured stats. `W-ROADS6b-final-evidence/` holds the final 11 GPU captures; errors.json is empty. Same town/hill/1 auto detail, round-5 baseline 710 + 663 = 1373 ms, ceiling 1784.9 ms:

| Final capture | Plan | Build | Total | Change |
|---|---:|---:|---:|---:|
| first street | 671 ms | 1110 ms | 1781 ms | +29.7% |
| repeated top | 626 ms | 1019 ms | 1645 ms | +19.8% |
| repeated street | 742 ms | 1040 ms | 1782 ms | +29.8% |

The final probe meets the +30% ceiling in 3/3 samples. Earlier centroid-corrected samples were 1818, 1814 and 1761 ms (two failed); still earlier warm samples reached +26.7% and +27.4%. All are retained in the metrics file. Final acceptance has only 2.9 ms margin in its slowest sample: do not claim a robust timing guarantee. Final top has 3,227,512 triangles and 362 calls. The old +10-call cap remains exceeded relative to round 5's 341 calls; this task did not authorize dressing/building-batch changes to resolve it. These captures report zero hero houses because the hero kit is not loaded in this disposable viewer; no hero-equipped performance claim is made.

I looked at the five-site contact sheet, full-size town curve/junction/square, city parvis and the repaired city bridge. The black bridge deck becomes visibly continuous stone paving. No sky or void is visible through the ground in these sampled views. That does not override the failed numeric seam gate. The existing cathedral grass strip, grass at urban street margins and safe-placement gaps remain. The town's first junction camera landed on its square; the final evidence probe selects an actual junction outside every square.

### Tests and limitations

- `W-ROADS6b-landmark.log`: 1/1 regression pass over all 72 combinations.
- `W-ROADS6b-civic.log`: polygon-aware civic check passes all its original town/city sites.
- Centroid helper check: 1/1 pass, including reversed winding and unequal edge subdivision.
- `W-ROADS6b-final-render.log`: 2/2 pass, no skips, after the final bridge and cost changes.
- Other test files, first run: 130 pass, 1 fail, no skips (`W-ROADS6b-other-tests.log`). The wealth-ring failure was real and repaired in the planner, not weakened in the test. Full layout-model rerun: 10/10 pass, no skips (`W-ROADS6b-final-layout-model.log`).
- Final plan regressions after the centroid repair: 18/18 pass, no skips (`W-ROADS6b-final-plan-regressions.log`), covering the 72 landmark cases, ground/door clearances and dressing checks.
- Full settlement suite: **53 pass, 1 fail, no skips**, 1,175,649 ms (`W-ROADS6b-settlement-full.log`). It was started once at revision 127f70e, before the late wealth-centroid and hall repairs. Its one failure was the coastal tavern/hall overlap, not either named cathedral clash or the corrected square-front/trade/church checks.
- After hall repair, the original coast checks pass **8/8**, covering all four tiers and their original seeds; 46 unrelated tests were explicitly skipped by the name filter (`W-ROADS6b-final-coast.log`). This is a targeted run, not a second complete suite or a 54/54 final-suite claim.
- Latest hall/landmark checks: **2/2 pass**, all 72 tier/site/seed combinations plus town/coast/6 (`W-ROADS6b-final-landmark-hall.log`).
- A final civic/ground/dressing run initially failed because I had cleaned up the private Three.js installation too early: 24 pass, 1 missing-module failure, 2 skips (`W-ROADS6b-final-civic-ground.log`). The dependency was restored and the valid rerun passes **27/27, no skips** (`W-ROADS6b-final-civic-ground-installed.log`).

Undo only this pass's listed commits in reverse order. If wrong, roads can again enter landmarks, civic props can block doors, ground can show slits and generation can exceed budget. Do not undo merged dressing or house work. No deployment, nested agents, memory edits, keyboard/collision walk sweep, hero kit loading, or changes to prohibited files were made.

Final checkpoint: 9 October 2026, 01:20 CET. All task-owned test and GPU processes have finished. Private copied viewer dependencies, blob symlinks, servers and intermediate images were removed. Source copies compare byte-for-byte; no forbidden files changed. The ground seam repair is still incomplete, so this is not an accepted all-green repair.
