code wiki / (root) / nx_meshrig_gate.nx

nx_meshrig_gate.nx

buildroot/runtime/nx_meshrig_gate.nx

12528 B266 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_meshrig_gate.nx -- IS THE BIND REAL, OR JUST A SKIN SECTION THAT EXISTS? Subject: ./nx_meshrig.elf (the serving-root binary; e2e fork, never an in-process re-derive). THE DEFECT THIS GATE EXISTS TO CATCH: a RIGID bind -- every vertex nailed to one bone at full weight -- satisfies "the asset has a SKIN section", loads in nx_nxa_play, reports zero_weight_verts=0, and produces candy-wrapper garbage the moment anything poses. It is the trivial wrong implementation, and presence-of-section cannot distinguish it from a real bind. Two numbers can: under a rigid bind EVERY vertex has exactly one influence and the mean dominant weight is 4096 (the q12 whole). THE NEG-CONTROL NEEDS NO CODE MUTATION, WHICH IS WHY IT IS TRUSTWORTHY: a skeleton with ONE bone IS a rigid bind, by construction. So the rigid case runs the SAME promoted binary down the SAME code path with a different fixture -- there is no mutant to restore and no risk of measuring a harness instead of the subject. A 4-joint skeleton must blend; a 2-joint skeleton must not. FIXTURES ARE ASSEMBLED AT RUNTIME under /tmp/nxmeshriggate/ (a gate must not share its fixture with a production beat, and a teardown does not run when a run crashes). The mesh fixture is emitted here as real NXMSH2 bytes, including a real IEEE754 f32 encoder, because a fixture the defect cannot fail is not a test. SUBPROCESS CAPTURE COMPOSES nx_gatekit_lib. This is not a style preference: a hand-rolled pipe/fork/exec in a sibling gate DEADLOCKED IN PRODUCTION today (50+ minutes in pipe_wait, zero CPU, artifact frozen at its header) because an undrained pipe blocks forever. The banked law is that fixtures and subprocess come from that lib; never re-roll them. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_gatekit_lib.nx nx_meshrig_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_mkdir mg_write_mesh sys_mmap ↻ mg_put32 mg_f32enc sys_openat_wr sys_write ↻ sys_close mg_write_text sys_openat_wr ↻ mg_slen sys_write ↻ sys_close ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_check gv_puts ↻ sys_mmap ↻ gk_run_capture

structs

none

consts

31const MG_ELF: *u8 = "./nx_meshrig.elf"
32const MG_DIR: *u8 = "/tmp/nxmeshriggate"
33const MG_MESH: *u8 = "/tmp/nxmeshriggate/col.nxmesh"
34const MG_SKP: *u8 = "/tmp/nxmeshriggate/multi.skel"
35const MG_SKN: *u8 = "/tmp/nxmeshriggate/onebone.skel"
36const MG_OUTP: *u8 = "/tmp/nxmeshriggate/multi.nxa"
37const MG_OUTN: *u8 = "/tmp/nxmeshriggate/onebone.nxa"
38const MG_OUTD: *u8 = "/tmp/nxmeshriggate/determinism.nxa"
39const MG_MODE: i64 = 420
40const MG_Q12: i64 = 4096
43const MG_CAP: i64 = 65536
44const MG_TRIB: i64 = 84
45const MG_NTRI: i64 = 24
46const MG_STAT: i64 = 1750
47const MG_M23: i64 = 8388607
119const MG_ABSENT: i64 = 0 - 999999999

functions

49func mg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
53func mg_f32enc(v: i64) -> i64
called by 1: mg_write_mesh
67func mg_put32(b: *u8, o: i64, w: i64) -> i64
called by 1: mg_write_mesh
77func mg_write_mesh(path: *u8) -> i64
109func mg_write_text(path: *u8, s: *u8) -> i64
120func mg_after(buf: *u8, blen: i64, key: *u8) -> i64
called by 1: main calls 1: mg_slen
156func mg_has(buf: *u8, blen: i64, needle: *u8) -> i64
called by 1: main calls 1: mg_slen
168func mg_filesize(path: *u8) -> i64
called by 1: main calls 2: sys_mmapsys_read_file
176func main(argc: i64, argv: *i64) -> i64