code wiki / (root) / nx_procgen_preset_test.nx

nx_procgen_preset_test.nx

buildroot/runtime/nx_procgen_preset_test.nx

9414 B165 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic procgen
docsdependenciesstructsconstsfunctions

about

nx_procgen_preset_test.nx -- smoke for bidirectional progressive disclosure. What this validates -- the STRUCTURAL invariants of the cardinal: 1. Tier 0 just-works (single call, no knobs, returns useful struct) 2. Tier 0 == Tier 1 with defaults (no hidden code path under Tier 0) 3. Determinism: same (seed, preset, dims) -> bit-identical heightmap 4. Presets actually affect output (different preset -> different heightmap) 5. Tier-2 raw composition reproduces Tier-1 result (visible recipe) 6. Defensive at boundaries: invalid preset / zero dims fall back cleanly 7. Sealed-enum preset validity gate 8. Height-band classifier composes with Perlin sealed-enum 9. Poisson density honors preset radius differences (after the r>=10 saturation fix landed -- previously this assertion blocked on a substrate compiler-bug masquerading as algorithm bug; see project-poisson-disk-bug-large-r-2026-05-15.md).

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_perlin.nx nx_procgen_preset.nx nx_procgen_preset_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_perlin.nxnx_procgen_preset.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_procgen_landscape_defau nx_procgen_landscape nx_procgen_preset_is_valid _preset_octaves _preset_persistence_q10 _preset_base_radius _apply_density nx_perlin_alloc sys_mmap _perlin_lcg_step sys_mmap ↻ _fill_heightmap nx_perlin_fbm_2d nx_perlin_2d _perlin_hash_2d _perlin_dot_2d _perlin_grad_2d_x _perlin_grad_2d_y _perlin_ease _perlin_lerp nx_sig_compose nx_sig_compose_cfg _sig_n_peaks _sig_peak_radius _sig_peak_amp _sig_argmin sys_mmap ↻ nx_poisson_disk_sample sys_mmap ↻ nx_prng_init nx_prng_next _pd_cos _pd_sin _pd_accept nx_sig_peak_t nx_sig_ridge_t _sig_seg_d2 nx_sig_basin nx_sig_peak

structs

none

consts

none

functions

22func main() -> nx_int {