feat(simulation): T-1170 A2/A3 + T-1168 A5 — course inventor, coast termination, riparian signal
A2 (river_course.rs): Stage A rung-independent valley-seeking control
path (chord/8 stations, k=5 bilinear-scored candidates + continuity
penalty); Stage B rung-indexed perpendicular warp on GLOBAL arc-length
(window-independence, Ruling 1e), band chord/2 down to min_wavelength_m
hard-truncate, sine taper to zero at anchors, amplitude min(8% chord,
half-cell) slope/class-scaled. SeedDomain::RiverCourse=17, distinct
salt. Wire: RiverCourse{edge_id,class,points,terminus} on
DistrictWindowLayer.courses (serde-default); bbox-culled, window-
cropped +1 station. TerrainAnalysisCache retains Layer1Output (the
gen_queue:626 discard, Ruling 4b). A3: mouth termination walks
stations sampling the window's OWN rung-consistent morphology verdict,
6-iteration bisect; land-at-anchor probes one segment then None;
EdgeDrain never probes. A5: near_perennial_water point-to-segment
predicate (D-239 §8 governed bands 1-3m class-scaled) threaded through
both batch and window paths; Region always false; never touches
moisture_q. Discipline closed: dormant zoom-ladder bench run + numbers
recorded in the design doc (District 3.009/1.785, Quarter 1.823
us/cell, Region window 0.617ms); course-cost bench CAUGHT a real
+12-36% per-cell riparian scan regression -> precomputed bbox O(1)
reject (60ns->2.2ns/call), final delta +3.4-6.9% at budget; three
determinism tests (overlapping-window byte-identity, cross-rung
amplitude bound, warp-stream cross-correlation r<0.3); goldens: window
sweep gained a verified course-bearing position (pure append), new
river_course golden at both rungs, believability verified unchanged.
Revert-verification discovered the pole-row branch is structurally
unreachable (flow_direction bounds-check) — the real edge-drain path
is k<0 flat-plateau; test fixture rewritten to exercise reality.
scale.rs stale comment fixed. Full cargo test green.
Tickets: T-1170, T-1168
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -254,6 +254,57 @@
|
||||
"moisture_q": 43,
|
||||
"vegetation": 1
|
||||
},
|
||||
{
|
||||
"label": "river_course",
|
||||
"rung": "district",
|
||||
"wx_m": 36277344,
|
||||
"wy_m": -6830545,
|
||||
"min_wl_m": 4096,
|
||||
"morphology": 8,
|
||||
"tectonic": 0,
|
||||
"glaciation": 1,
|
||||
"precipitation": 2,
|
||||
"slope_q": 2,
|
||||
"elev_q": 8,
|
||||
"ocean_fraction_q": 0,
|
||||
"temperature_dc": 14,
|
||||
"moisture_q": 49,
|
||||
"vegetation": 3
|
||||
},
|
||||
{
|
||||
"label": "river_course",
|
||||
"rung": "quarter",
|
||||
"wx_m": 36277344,
|
||||
"wy_m": -6830545,
|
||||
"min_wl_m": 1024,
|
||||
"morphology": 8,
|
||||
"tectonic": 0,
|
||||
"glaciation": 1,
|
||||
"precipitation": 2,
|
||||
"slope_q": 3,
|
||||
"elev_q": 4,
|
||||
"ocean_fraction_q": 0,
|
||||
"temperature_dc": 34,
|
||||
"moisture_q": 50,
|
||||
"vegetation": 3
|
||||
},
|
||||
{
|
||||
"label": "river_course",
|
||||
"rung": "region",
|
||||
"wx_m": 36277344,
|
||||
"wy_m": -6830545,
|
||||
"min_wl_m": 0,
|
||||
"morphology": 8,
|
||||
"tectonic": 0,
|
||||
"glaciation": 1,
|
||||
"precipitation": 2,
|
||||
"slope_q": 0,
|
||||
"elev_q": 11,
|
||||
"ocean_fraction_q": 0,
|
||||
"temperature_dc": -2,
|
||||
"moisture_q": 49,
|
||||
"vegetation": 3
|
||||
},
|
||||
{
|
||||
"label": "airless_dry/coastal_a",
|
||||
"rung": "district",
|
||||
@@ -509,6 +560,57 @@
|
||||
"moisture_q": 0,
|
||||
"vegetation": 0
|
||||
},
|
||||
{
|
||||
"label": "airless_dry/river_course",
|
||||
"rung": "district",
|
||||
"wx_m": 36277344,
|
||||
"wy_m": -6830545,
|
||||
"min_wl_m": 4096,
|
||||
"morphology": 8,
|
||||
"tectonic": 0,
|
||||
"glaciation": 0,
|
||||
"precipitation": 0,
|
||||
"slope_q": 3,
|
||||
"elev_q": 5,
|
||||
"ocean_fraction_q": 0,
|
||||
"temperature_dc": -2147483648,
|
||||
"moisture_q": 0,
|
||||
"vegetation": 0
|
||||
},
|
||||
{
|
||||
"label": "airless_dry/river_course",
|
||||
"rung": "quarter",
|
||||
"wx_m": 36277344,
|
||||
"wy_m": -6830545,
|
||||
"min_wl_m": 1024,
|
||||
"morphology": 8,
|
||||
"tectonic": 0,
|
||||
"glaciation": 0,
|
||||
"precipitation": 0,
|
||||
"slope_q": 3,
|
||||
"elev_q": 6,
|
||||
"ocean_fraction_q": 0,
|
||||
"temperature_dc": -2147483648,
|
||||
"moisture_q": 0,
|
||||
"vegetation": 0
|
||||
},
|
||||
{
|
||||
"label": "airless_dry/river_course",
|
||||
"rung": "region",
|
||||
"wx_m": 36277344,
|
||||
"wy_m": -6830545,
|
||||
"min_wl_m": 0,
|
||||
"morphology": 8,
|
||||
"tectonic": 0,
|
||||
"glaciation": 0,
|
||||
"precipitation": 0,
|
||||
"slope_q": 0,
|
||||
"elev_q": 5,
|
||||
"ocean_fraction_q": 0,
|
||||
"temperature_dc": -2147483648,
|
||||
"moisture_q": 0,
|
||||
"vegetation": 0
|
||||
},
|
||||
{
|
||||
"label": "volcanic_coast/coastal_a",
|
||||
"rung": "district",
|
||||
@@ -763,5 +865,56 @@
|
||||
"temperature_dc": 555,
|
||||
"moisture_q": 30,
|
||||
"vegetation": 2
|
||||
},
|
||||
{
|
||||
"label": "volcanic_coast/river_course",
|
||||
"rung": "district",
|
||||
"wx_m": 36277344,
|
||||
"wy_m": -6830545,
|
||||
"min_wl_m": 4096,
|
||||
"morphology": 15,
|
||||
"tectonic": 2,
|
||||
"glaciation": 0,
|
||||
"precipitation": 2,
|
||||
"slope_q": 4,
|
||||
"elev_q": 14,
|
||||
"ocean_fraction_q": 0,
|
||||
"temperature_dc": 500,
|
||||
"moisture_q": 47,
|
||||
"vegetation": 3
|
||||
},
|
||||
{
|
||||
"label": "volcanic_coast/river_course",
|
||||
"rung": "quarter",
|
||||
"wx_m": 36277344,
|
||||
"wy_m": -6830545,
|
||||
"min_wl_m": 1024,
|
||||
"morphology": 15,
|
||||
"tectonic": 2,
|
||||
"glaciation": 0,
|
||||
"precipitation": 2,
|
||||
"slope_q": 6,
|
||||
"elev_q": 5,
|
||||
"ocean_fraction_q": 0,
|
||||
"temperature_dc": 547,
|
||||
"moisture_q": 49,
|
||||
"vegetation": 3
|
||||
},
|
||||
{
|
||||
"label": "volcanic_coast/river_course",
|
||||
"rung": "region",
|
||||
"wx_m": 36277344,
|
||||
"wy_m": -6830545,
|
||||
"min_wl_m": 0,
|
||||
"morphology": 15,
|
||||
"tectonic": 2,
|
||||
"glaciation": 0,
|
||||
"precipitation": 2,
|
||||
"slope_q": 0,
|
||||
"elev_q": 18,
|
||||
"ocean_fraction_q": 0,
|
||||
"temperature_dc": 480,
|
||||
"moisture_q": 47,
|
||||
"vegetation": 3
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user