code wiki / (root) / nx_meshgap_gate.nx

nx_meshgap_gate.nx

buildroot/runtime/nx_meshgap_gate.nx

8257 B149 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_meshgap_gate.nx -- THE COHERENCE TOOTH: does a shipped character hold together in space? WHY (measured 2026-08-23). The models page card FEMALE DARK KNIGHT renders as FRAGMENTED GEOMETRY -- hair floating far above the body, blobs below -- while EVERY NUMBER ON ITS CARD IS GREEN (33 geometry nodes merged, rig 113 joints, 3729 clusters = 33 x 113, albedo carried). The arithmetic closed and the picture was broken. Third time in one day the eye beat the teeth, and always for the same reason: every tooth measured a COUNT or a SUM, and none measured whether the thing HOLDS TOGETHER IN SPACE. THE BOUND IS DERIVED FROM A MEASURED POPULATION, NOT PICKED. All four ingested FBX donors were measured with nx_meshgap and the ranking matched the eye exactly, in order: toon3d8 max_gap_permil = 8 renders coherent dark_witch max_gap_permil = 20 renders coherent paladin max_gap_permil = 101 one boot detached (mild) dark_knight max_gap_permil = 298 severely fragmented The coherent population tops out at 20; the fragmented population starts at 101. Any bound in between separates them, so rather than pick a point in that range the bound is the GEOMETRIC MEAN of the two boundary values -- sqrt(20 * 101) = 44.9 -> 45 -- which sits at an equal RATIO margin (2.25x) above the worst coherent donor and below the best fragmented one. Ratio-symmetric is the right symmetry here because the measure is itself a ratio (permil of the axis's own span). AND THE BOUND CANNOT SILENTLY GO STALE: T5 re-derives the separation from the live corpus on every run and FAILS if the two populations ever stop being separated by this bound. A frozen number that nobody re-checks is how a threshold becomes folklore. THE NEG-CONTROLS ARE REAL RECORDED DEFECTS, NOT SYNTHETIC MUTANTS: dark_knight and paladin are genuinely fragmented assets sitting in the corpus right now. Biting against the estate's own history is stronger than any mutant, because it proves the tooth catches what actually happened.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_gatekit_lib.nx nx_meshgap_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 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 ↻ mgg_measure 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 sys_poll sys_read

structs

none

consts

34const MGG_ELF: *u8 = "./nx_meshgap.elf"
35const MGG_CAP: i64 = 65536
37const MGG_BOUND: i64 = 45
38const MGG_COHERENT_MAX: i64 = 20
39const MGG_FRAGMENTED_MIN: i64 = 101
41const MGG_TOON: *u8 = "knowledge/rigcorpus/toon3d8_rigged.nxa"
42const MGG_WITCH: *u8 = "knowledge/rigcorpus/dark_witch_rigged.nxa"
43const MGG_PALADIN: *u8 = "knowledge/rigcorpus/paladin_rigged.nxa"
44const MGG_KNIGHT: *u8 = "knowledge/rigcorpus/dark_knight_rigged.nxa"
45const MGG_KNIGHT_GEOM: *u8 = "knowledge/rigcorpus/dark_knight_geom.nxa"

functions

47func mgg_bound_str() -> *u8 { return "45" }
called by 1: main
51func mgg_gap(buf: *u8, n: i64) -> i64
called by 1: mgg_measure
81func mgg_measure(path: *u8, buf: *u8, blen: *i64, rcp: *i64) -> i64
called by 1: main calls 2: gk_run_capturemgg_gap
89func main(argc: i64, argv: *i64) -> i64