code wiki / (root) / nx_bodydensity_gate.nx

nx_bodydensity_gate.nx

buildroot/runtime/nx_bodydensity_gate.nx

9262 B167 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_bodydensity_gate.nx -- THE TESSELLATION RATCHET: adding triangles to a surface that has no new detail in it must NOT be scorable as a form improvement. WHY THIS GATE EXISTS. A density ladder measured 2026-08-23 (knowledge/bodydensity.conf) found that across a 58x TRIANGLE RANGE (23,472 -> 1,365,120) on one fixed canon, silhouette IoU moved +5 permil, shape moved ZERO, and the DETAIL judge PEAKED at 88,992 and then DECLINED. The generator's analytic loft has no high-frequency surface mechanism, so there is nothing for extra triangles to carry -- proven separately by pushing relief to 1000 at 1,365,120 tris and getting detail 327, IDENTICAL to relief 0 at the same density. ★★★★★★ THIS GATE DOES NOT FORBID RAISING DENSITY, AND MUST NEVER BE READ THAT WAY. Density and detail CO-SCALE. The order is: build surface detail, THEN raise density to carry it, THEN re-measure. A triangle budget is a CONSEQUENCE of the surface, never a target chosen ahead of it. 88,992 is where THE CURRENT GENERATOR SATURATES -- it is not a ship target and not a cap. When a high-frequency surface mechanism ships, THIS GATE IS RE-DERIVED against the new generator and its saturation point is EXPECTED TO MOVE UP. A tooth that pinned 88,992 forever would be a capability cap wearing a gate's clothes. ⚠ RULER BLINDNESS, DECLARED: nx_bodybench sees HIGH-frequency local normal variance. It is BLIND to LOW-frequency radius perturbation (relief moves geometry -- different sha256, identical byte count -- with zero score change at any density). NOBODY SHOULD TUNE RELIEF AGAINST IT. And it scores agreement with a CADAVER oracle, so it is a DIAGNOSTIC for the beauty climb, never the target: past a point, closing that gap moves AWAY from beauty. Subject: ./nx_bodybench.elf over the shipped artifacts. e2e fork via nx_gatekit_lib, never a hand-rolled pipe (the banked deadlock: an undrained capture pipe wedges forever). license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_gatekit_lib.nx nx_bodydensity_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_gatekit_lib.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_puts sys_write ↻ sys_mmap ↻ bd_run gk_run_capture gk_run_cap2 gk_run_cap3 sys_mmap ↻ sys_pipe2 sys_fork sys_close sys_setpgid sys_openat_rd sys_dup3 sys_execve sys_exit ↻ sys_sleep_ms sys_mmap ↻ sys_munmap nx_kill sys_now_realtime_ms sys_mmap ↻ sys_clock_gettime_real

structs

none

consts

32const BD_BB: *u8 = "./nx_bodybench.elf"
33const BD_OURS: *u8 = "knowledge/female_v1.nxmesh"
34const BD_LOW: *u8 = "knowledge/female_v1_low23k.nxmesh"
35const BD_ORACLE: *u8 = "knowledge/skin.nxmesh"
36const BD_CAP: i64 = 65536
40const BD_SELF_OK: i64 = 1000 // bodybench's own built-in non-vacuity proof
41const BD_DETAIL_SAT: i64 = 336 // detail at the saturation density (88,992 tris)
42const BD_DETAIL_LOW: i64 = 323 // detail at 23,472 tris -- BELOW saturation
44const BD_TOOTH_FORBIDS_DENSITY_GROWTH: i64 = 0
45const BD_REDERIVE_WHEN_SURFACE_MECHANISM_SHIPS: i64 = 1

functions

47func bd_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: bd_find
52func bd_run(a: *u8, b: *u8, buf: *u8, blen: *i64) -> i64
called by 1: main calls 1: gk_run_capture
59func bd_find(buf: *u8, n: i64, ned: *u8) -> i64
called by 1: bd_field calls 1: bd_slen
77func bd_num_at(buf: *u8, n: i64, p: i64) -> i64
called by 1: bd_field
96func bd_field(buf: *u8, n: i64, key: *u8) -> i64
called by 1: main calls 2: bd_num_atbd_find
100func main(argc: i64, argv: *i64) -> i64