fix(simulation): PR #194 review round — rung-floor dependency direction, golden body coverage, doc honesty
Tyre's I1 (his ruling: the cutoff's job is Nyquist, a property of the RUNG): MIN_WL_BANDS_M's District band now derives from 2*DISTRICT_M directly, decoupled from OCTAVE_WAVELENGTHS_M[3] — a detail_scatter retune can no longer silently redefine the Atlas rung floor. Direction- agnostic const assert pins the coincidence so drift on either side breaks the build for a deliberate human decision; golden_cutoffs_match_ the_scale_ladder now pins the District coupling too. I2: D-226 paraphrase replaced with cites to the T-1150 wire-contract note + T-1162 refinement resolution (2), plus a self-found stale 2048m claim fixed in the same comments. I4: golden extended with airless/dry (ceiling_q==0 short-circuit) and volcanic-coast (ridged warp) body rows via body_sweep_samples() — fixture regen verified 510 insertions, 0 deletions (existing rows byte-identical, purely appended). Q2 nit: vegetation_invention module doc now states majority-preservation as the coherence guarantee, not per-cell class stability (a boundary cell's flip IS the clearing mechanism). Forward-contract for T-1156: 0x5EED_C0DE promoted to named WINDOW_RELIEF_SALT const. 158 focused tests green; cargo check --tests clean. Tickets: T-1162, T-1161 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -405,17 +405,27 @@ fn clamp_window_n_v2(raw_n: u32, granularity: WindowGranularity) -> u32 {
|
||||
}
|
||||
|
||||
/// Quantized `window_min_wl_m` bands (T-1150, zoom ladder design doc §5;
|
||||
/// retuned T-1162 part (c)): `0` (no cutoff) plus every entry of
|
||||
/// [`crate::atlas::detail_scatter::OCTAVE_WAVELENGTHS_M`] (32,768/16,384/
|
||||
/// 8,192/4,096 m — District's own Nyquist floor, `2 × DISTRICT_M`), plus a
|
||||
/// FIFTH band at `1,024` m — Quarter's own Nyquist floor (`2 × QUARTER_M =
|
||||
/// 1,024`, matching a rung's content wavelength to what its `512` m sample
|
||||
/// spacing can actually resolve — nothing finer than the rung can express,
|
||||
/// nothing coarser than it deserves). `1,024` m is also the finest entry of
|
||||
/// the extended [`crate::atlas::coast_invention::WARP_OCTAVE_WAVELENGTHS_M`]
|
||||
/// band (T-1162 part a) and the coarsest entry of
|
||||
/// [`crate::atlas::detail_scatter::VOXEL_OCTAVE_WAVELENGTHS_M`] the sub-district
|
||||
/// relief wiring (T-1162 part b) admits at Quarter — one band serves both.
|
||||
/// retuned T-1162 part (c); band 4 re-derived per Tyre's PR #194 review I1).
|
||||
/// `0` (no cutoff) plus the two coarse legacy bands
|
||||
/// [`crate::atlas::detail_scatter::OCTAVE_WAVELENGTHS_M`]`[0..2]` (32,768/
|
||||
/// 16,384/8,192 m — carried over unchanged, no rung claims these as its own
|
||||
/// Nyquist floor), plus **District's own Nyquist floor** computed directly
|
||||
/// from the rung's spacing (`2 × DISTRICT_M = 4,096` m), plus **Quarter's own
|
||||
/// Nyquist floor** (`2 × QUARTER_M = 1,024` m).
|
||||
///
|
||||
/// **Dependency direction (Tyre, PR #194 I1):** the cutoff's semantic job is
|
||||
/// Nyquist truncation — a property of the RUNG (its sample spacing), never of
|
||||
/// any one invention field's octave choices. Band 4 is therefore derived from
|
||||
/// `scale::DISTRICT_M` directly, NOT from
|
||||
/// `detail_scatter::OCTAVE_WAVELENGTHS_M[3]` (the old T-1162 wiring) — that
|
||||
/// coupling ran backwards: a future `detail_scatter` retune could silently
|
||||
/// redefine the Atlas rung floor, and the coast warp already extends its OWN
|
||||
/// octaves below `OCTAVE_WAVELENGTHS_M`'s range (T-1162 part a), proving no
|
||||
/// single invention field's array is entitled to dictate the floor. The two
|
||||
/// values happen to coincide today (4,096 = `2 × DISTRICT_M` = also
|
||||
/// `OCTAVE_WAVELENGTHS_M[3]`) — the `const _: () = assert!(...)` immediately
|
||||
/// below pins that coincidence so a future drift on EITHER side breaks the
|
||||
/// build loudly instead of silently decoupling the two meanings.
|
||||
///
|
||||
/// **Pre-T-1162 bands unchanged in VALUE** (32,768/16,384/8,192/4,096 stay
|
||||
/// exactly where they were) — but **NOT unchanged in behavior at 8,192/4,096
|
||||
@@ -442,10 +452,25 @@ const MIN_WL_BANDS_M: [f64; 6] = [
|
||||
crate::atlas::detail_scatter::OCTAVE_WAVELENGTHS_M[0],
|
||||
crate::atlas::detail_scatter::OCTAVE_WAVELENGTHS_M[1],
|
||||
crate::atlas::detail_scatter::OCTAVE_WAVELENGTHS_M[2],
|
||||
crate::atlas::detail_scatter::OCTAVE_WAVELENGTHS_M[3],
|
||||
1_024.0,
|
||||
2.0 * DISTRICT_M as f64,
|
||||
2.0 * crate::atlas::scale::QUARTER_M as f64,
|
||||
];
|
||||
|
||||
/// Direction-agnostic guard (Tyre, PR #194 I1): `MIN_WL_BANDS_M`'s District
|
||||
/// band is now derived from `2 × DISTRICT_M`, deliberately decoupled from
|
||||
/// `detail_scatter::OCTAVE_WAVELENGTHS_M[3]` (see the doc above). The two
|
||||
/// values are expected to keep coinciding — `terrain_detail`'s finest octave
|
||||
/// IS meant to sit at District's Nyquist floor — but nothing in the type
|
||||
/// system enforces that anymore now that the dependency runs one direction
|
||||
/// only. This assert exists so that if either side ever drifts (a
|
||||
/// `detail_scatter` octave retune, or a `DISTRICT_M` scale-ladder change).
|
||||
/// the build breaks loudly and a human decides deliberately whether the
|
||||
/// coincidence should be restored or the two meanings were meant to diverge
|
||||
/// — never a silent redefinition of the Atlas rung floor.
|
||||
const _: () = assert!(
|
||||
crate::atlas::detail_scatter::OCTAVE_WAVELENGTHS_M[3] as i64 == 2 * DISTRICT_M as i64
|
||||
);
|
||||
|
||||
/// Snap a wire-supplied `window_min_wl_m` to the nearest fixed band in
|
||||
/// [`MIN_WL_BANDS_M`] (T-1150, design doc §5's gap-fix): "as specified,
|
||||
/// `window_min_wl_m` is viewport-continuous while the cache key/echo tuple is
|
||||
|
||||
Reference in New Issue
Block a user