Merge remote-tracking branch 'origin/main' into t1181-step-canvas

This commit is contained in:
2026-07-25 03:13:18 +02:00
16 changed files with 1186 additions and 63 deletions
+17 -3
View File
@@ -1654,9 +1654,23 @@ mod tests {
);
// Ground truth: derive_at_metres at the SAME settlement world metres,
// via the terrain cache's own re-derive path (run_layer1) so the
// TerrainAnalysis is byte-identical to what the resolver used.
let (_l1, ta) = crate::atlas::layer1::run_layer1(&heightmap);
// via the terrain cache's own re-derive path so the TerrainAnalysis is
// byte-identical to what the resolver used — INCLUDING which hydrology
// moisture ceiling gets solved with. `resolve_settlement_morphology_zone`
// threads `Some(&body_params)` into `get_or_derive` (T-1184), which
// derives the body's real moisture ceiling rather than falling back to
// `run_layer1`'s body-agnostic default; this ground truth must use the
// SAME `run_layer1_with_moisture` path (not bare `run_layer1`) or the
// two `TerrainAnalysis`es solve hydrology at different moisture inputs
// — moot for this fixture's LAKE EXTENT (moisture-independent, see
// `run_layer1_with_moisture_changes_endorheic_split_not_lake_extent`),
// but the two paths must agree by construction, not by coincidence of
// this specific body having no moisture-sensitive basin near the
// sampled position.
let (_l1, ta) = crate::atlas::layer1::run_layer1_with_moisture(
&heightmap,
district_profile::derive_moisture_ceiling_q(&body_params),
);
let expected = district_profile::derive_at_metres(
body_seed,
"TestBody",