fix(simulation): PR #215 review fixes — hop-unit surcharge, D-210 amendment, citation + gap
The surcharge is now COASTAL_ACCESS_SURCHARGE_HOPS_PER_RING=1 added directly to length_cells (a pure hop count) — the old cost-unit constant div_ceil'd through MIN_CELL_COST silently produced 4 hops per ring, worst-case +24 (double the waypoint threshold) for physically short edges; worst case is now 6. A formula-pinning test asserts both the arithmetic and the constant. GJ251c's repro tightened to the documented 2 edges. The always-land citation now points at the real guarantee (features.rs::extract_attractors, D-209) — and checking the D-211 Phase-4 synthetic-overflow path exposed a real gap: it has no ocean-mask guard at all (T-1206 filed); documented, not papered over. D-210 gains a dated amendment recording the surrogate-anchor-at-cost carve-out and the relaxation-over-nudge adjudication. The bare 100 dependency dissolved with the unit fix. Edge counts on both repro bodies verified unchanged (reachability was never affected). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1103,6 +1103,8 @@ Technical foundation decisions that constrain implementation: engine, client-ser
|
||||
- **Raised by:** Generation cascade workshop (T-897)
|
||||
- **Cross-reference:** D-101 (ZonePalette modifier system — consumes sub_biome), D-195 (attractor types), D-209 (feature tag extraction — assigns sub_biome)
|
||||
|
||||
**Amended 2026-07-26 (T-1116 — surrogate-anchor-at-cost carve-out for the Layer-2 road graph):** the road graph's routing grid (`RouteGrid`, `road_graph.rs`) downsamples `terrain_modification_cost` onto coarse routing cells (up to `scale²` native pixels per cell) and marks a cell `IMPASSABLE` when it is water-majority. A settlement's exact placement pixel is always land (D-209's attractor extraction guards `!ocean_mask` on every real attractor type), but at this downsample granularity the settlement's *routing cell* can still be majority water — a coastal-cell/downsample artifact, not a placement error. **Ruling:** a routing anchor (A\* start/goal) whose own cell is water-majority MAY be surrogated to the nearest passable cell within a bounded search radius, priced as an explicit access-cost surcharge on the routed edge's reported length (never free, modeling a short quay/causeway link) — but general water-cell transit stays `IMPASSABLE` exactly as before; only the anchor *lookup* for a start/goal settlement is relaxed, not open-ocean pathfinding. This was adjudicated as a routing-layer relaxation rather than a D-211 placement nudge specifically because D-211's positions are seed-derived and already land-guaranteed for every *real* attractor path — moving them would touch a different layer's invariant to fix a downsample artifact that belongs to the router. **Known gap flagged, not fixed here:** D-211's Phase-4 synthetic-overflow path (`synthetic_attractor`) computes its position by grid arithmetic alone, with no terrain/`ocean_mask` check at all — unlike every real attractor type, a synthetic-overflow settlement is not guaranteed land. The routing relaxation above still degrades that case gracefully (surrogate-anchors it or leaves it unrouted beyond the search radius), but the placement guarantee gap itself is D-211's, unticketed as of this amendment.
|
||||
|
||||
### D-211: Attractor-Matching Five-Phase Pipeline for Settlement Placement
|
||||
- **Date:** 2026-05-01
|
||||
- **Decision:** Given a body's `Vec<GeographicAttractor>` and a set of cities from `atlas_city_names`, settlement placement runs a five-phase matching pipeline:
|
||||
|
||||
Reference in New Issue
Block a user