nx_world_quality_grader_gate.nx
buildroot/runtime/nx_world_quality_grader_gate.nx
about
nx_world_quality_grader_gate.nx -- THE REFEREE FOR THE WORLD REFEREE, 2026-09-01.
nx_world_quality_grader.nx shipped on 2026-05-16 and was NEVER BUILT: catalog read
SOURCE-ONLY (S2) for it and for every one of its five consumers (nx_procgen_biome_test,
nx_procgen_water_test, nx_procgen_features_test, nx_procgen_signature_test,
nx_layer_verdict). A grader that has never compiled has never graded anything, and the
estate law for that is a build-and-run deficit, not a cleverness deficit.
IN-PROCESS over nx_world_quality_grader.nx, deliberately. A gate that fork/exec'd a
deployed elf would report NOT-REACHED for every mutant and its GREEN would prove nothing
about the code under test.
WHAT THIS PROVES, STATED SO IT CANNOT BE OVER-READ: the 8-axis decision core -- the
degenerate-input contract, the flatness INVERSION, the banded local-variation verdict,
the optional-axis abstention, the biome and feature-variety rulers, the letter rubric and
the refine-axis enum. It does NOT prove that the axes correlate with a human judgement of
a world beauty; that is a referee-panel question and is not claimed here.
THE SELF-TEST IN THE GRADER OWN main() IS NOT THIS GATE. It has no negative controls, no
denominators, and its exit code is a bare 0 -- nothing downstream can read a verdict from
it. Every tooth below that the self-test also covers is restated here so the verdict
travels in the EXIT CODE, and the ones it never had are the reason this file exists.
FIXTURES ARE BUILT IN MEMORY ON EVERY RUN AND TOUCH NO PATH AT ALL, so the run is
idempotent by construction and can never share a fixture with a production beat.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_gate_verdict.nxnx_world_quality_grader.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 30 | const WG_W: i64 = 8 // the self-test own grid, so outcomes stay comparable |
| 31 | const WG_H: i64 = 8 |
| 32 | const WG_RELIEF: i64 = 1000 // max_expected_relief handed to every grade below |
| 33 | const WG_FLAT_VALUE: i64 = 100 // the constant a degenerate world is filled with |
| 34 | const WG_MAPS_GRADED: i64 = 7 // DENOMINATOR: grades this run must actually perform |
| 35 | const WG_PEAK: i64 = 1000 // mountain apex before the radial falloff |
| 36 | const WG_FALLOFF: i64 = 50 // radial falloff per unit squared distance |
| 37 | const WG_JITTER: i64 = 50 // checkerboard jitter amplitude on the mountain map |
| 38 | const WG_CENTRE: i64 = 4 // WG_W/2: the mountain apex column |
| 39 | const WG_BIOME_DESERT: i64 = 8 // expected band LOW |
| 40 | const WG_BIOME_TFOREST: i64 = 5 // expected band MID |
| 41 | const WG_BIOME_SNOW: i64 = 12 // expected band HIGH |
| 42 | const WG_BIOME_ICE: i64 = 13 // expected band PEAK |
| 43 | const WG_KINDS: i64 = 4 // feature-kind histogram width |
| 44 | const WG_KIND_COUNT: i64 = 10 // per-kind count in the UNIFORM histogram |
| 45 | const WG_KIND_ALL: i64 = 40 // WG_KINDS * WG_KIND_COUNT, all in one kind |
| 46 | const WG_QUARTER: i64 = 4 // the grader own elevation-band divisor |
| 47 | const WG_TWO: i64 = 2 |
| 48 | const WG_THREE: i64 = 3 |
functions
| 50 | func wg_scan_min(m: *i64, n: i64) -> i64 |
| 60 | func wg_scan_max(m: *i64, n: i64) -> i64 |
| 70 | func main(argc: i64, argv: *i64) -> i64 |