code wiki / (root) / nx_fbx2nxa_gate.nx

nx_fbx2nxa_gate.nx

buildroot/runtime/nx_fbx2nxa_gate.nx

10665 B225 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_fbx2nxa_gate.nx -- THE FBX IMPORTER GATE: the unit factor is MEASURED, ANNOUNCED, APPLIED, and REFUSED when forged -- proven on the promoted binary over the FULL donor population. Subject: ./nx_fbx2nxa.elf (the serving-root binary; e2e fork, never an in-process re-derive). All four real donors carry UnitScaleFactor = 1.0 (GlobalSettings dumped 2026-08-23), so the factor legs are proven by FIXTURE: a byte-patched copy of the smallest donor with the D-value set to 2.0 (heights must EXACTLY double, within the derived truncation bound below) and to 0.0 (must REFUSE by name). A multiply-by-identity implementation cannot pass the 2.0 tooth -- that is the anti-vacuity. Neutrality: at factor 1.0 every donor's output must be BYTE-IDENTICAL to the shipped knowledge/rigcorpus/*_geom.nxa, all four, no sampling. NOT roster-admitted: imports the 73.6 MB toon donor in-process (multi-second subject; the voxchunk precedent -- the roster beat kills at its declared bound). The absent-record leg (-1 -> announced assumed 1.0) is DECLARED UNTESTED-BY-FIXTURE: no real FBX lacks the record and synthesizing a whole valid record-free FBX would test the synthesizer, not the importer. Covered by code-read; named here so nobody mistakes silence for proof.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_gatekit_lib.nx nx_fbx2nxa_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_head gv_puts sys_write 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 ↻ sys_mkdir sys_mmap ↻ fg_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

structs

none

consts

21const FG_ELF: *u8 = "./nx_fbx2nxa.elf"
22const FG_DIR: *u8 = "/tmp/nxf2gate"
23const FG_FIX2: *u8 = "/tmp/nxf2gate/witch_x2.fbx"
24const FG_FIX0: *u8 = "/tmp/nxf2gate/witch_x0.fbx"
25const FG_OUT1: *u8 = "/tmp/nxf2gate/witch_base.nxa"
26const FG_OUT2: *u8 = "/tmp/nxf2gate/witch_x2.nxa"
27const FG_OUTP: *u8 = "/tmp/nxf2gate/paladin.nxa"
28const FG_OUTK: *u8 = "/tmp/nxf2gate/knight.nxa"
29const FG_OUTT: *u8 = "/tmp/nxf2gate/toon.nxa"
30const FG_W_FBX: *u8 = "knowledge/rigcorpus/fbx/dark_witch.fbx"
31const FG_P_FBX: *u8 = "knowledge/rigcorpus/fbx/paladin.fbx"
32const FG_K_FBX: *u8 = "knowledge/rigcorpus/fbx/dark_knight.fbx"
33const FG_T_FBX: *u8 = "knowledge/rigcorpus/fbx/toon3d8.fbx"
34const FG_W_REF: *u8 = "knowledge/rigcorpus/dark_witch_geom.nxa"
35const FG_P_REF: *u8 = "knowledge/rigcorpus/paladin_geom.nxa"
36const FG_K_REF: *u8 = "knowledge/rigcorpus/dark_knight_geom.nxa"
37const FG_T_REF: *u8 = "knowledge/rigcorpus/toon3d8_geom.nxa"
38const FG_CAP: i64 = 65536
40const FG_BITS_TWO: i64 = 4611686018427387904
46const FG_TRUNC_BOUND: i64 = 20

functions

48func fg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: fg_hasfg_num_after
57func fg_run(fbx: *u8, out: *u8, buf: *u8, blen: *i64) -> i64
called by 1: main calls 1: gk_run_capture
61func fg_has(buf: *u8, ned: *u8) -> i64
called by 1: main calls 1: fg_slen
76func fg_num_after(buf: *u8, key: *u8) -> i64
called by 1: main calls 1: fg_slen
101func fg_same(a: *u8, b: *u8) -> i64
called by 1: main calls 2: sys_mmapsys_read_file
120func fg_patch(dst: *u8, bits: i64) -> i64
172func main(argc: i64, argv: *i64) -> i64