code wiki / (root) / nx_skullskin_gate.nx

nx_skullskin_gate.nx

buildroot/runtime/nx_skullskin_gate.nx

33129 B500 linesdepth 11pulls 57 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_skullskin_gate.nx -- gate for the skull-bound tissue-depth skin (aesthetictwin AT46, 2026-09-18). ACCEPT RULE, PRE-DECLARED BEFORE THE FIRST RENDER (the coordinator's rule, with the two bars this lane could measure): (i) the photo ruler (nx_photomark_lib, the promoted ruler's own library, in-process) must FIND a face on the skin render with BOTH canthi of BOTH eyes (the baseline diora_fit_close.png reads UNMEASURED: no eye pair, measured 2026-09-18); (ii) the scale-free axes the ruler measures are PRINTED (canthal tilt per side, intercanthal_index, intercanthal_eq_fissure) and the intercanthal index must sit inside the canon band knowledge/facecanon.conf declares (intercanthal_index 380..420). The NME against knowledge/refintake/diora_baird.oracle is NOT measurable in-lane: the oracle carries rows for the reference stills only and a render gets an oracle row only from the outside oracle (MediaPipe on the laptop); (iii) the skin's midline profile extrema sit at the canon's thirds: the glabella-to-subnasale span equals the subnasale- to-menton span within the tissue-depth table's own spread (max voting depth minus min voting depth); (iv) no skin vertex penetrates the skull: the depth field is positive at every vertex; min/median/max are printed; (v) neg-control-zero-depth-field: every depth zero -> the skin equals the skull (max displacement 0); neg-control-doubled-cheek-fat: doubling one compartment moves ONLY vertices inside its 3-sigma support (partition printed and summed). Values are emitted with gv_kv/gv_check_eq/gv_check_near for independent adjudication. The arithmetic teeth run on a synthetic sphere fixture with PLANTED anchors (closed-form expectations computed here, not by the library); the anatomy teeth run on the real generated skull (a precondition: supplied as argv[1], else ./nx_skullsdf.elf is run from the estate root, ~130 s at 2 mm cells; absent -> those teeth SKIP, never acquit). Fixtures under /tmp/nx_skullskin_gate/. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_tissuefield_lib.nx nx_photomark_lib.nx nx_skullskin_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_tissuefield_lib.nxnx_photomark_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_now_ms sys_mmap ↻ sys_clock_gettime_mono sys_mkdir tfl_tab_new sys_mmap ↻ tfl_conf_load sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close tfl_split tfl_has tfl_slen tfl_streq tfl_row

structs

none

consts

25const SKG_DIR: *u8 = "/tmp/nx_skullskin_gate"
26const SKG_SPHERE: *u8 = "/tmp/nx_skullskin_gate/sphere.nxmesh"
27const SKG_SKULL: *u8 = "/tmp/nx_skullskin_gate/skull.nxmesh"
31const SKG_SKULL_REPO: *u8 = "knowledge/gates/nx_skullskin_gate.skull.nxmesh"
32const SKG_SKULL_ROOT: *u8 = "buildroot/knowledge/gates/nx_skullskin_gate.skull.nxmesh"
33const SKG_SKIN: *u8 = "/tmp/nx_skullskin_gate/skin.nxmesh"
34const SKG_RENDER: *u8 = "/tmp/nx_skullskin_gate/skin_close.png"
35const SKG_CONF: *u8 = "knowledge/tissue_depth.conf"
36const SKG_CONF_PARENT: *u8 = "../knowledge/tissue_depth.conf"
37const SKG_CANON: *u8 = "knowledge/facecanon.conf"
38const SKG_CANON_PARENT: *u8 = "../knowledge/facecanon.conf"
39const SKG_SKULL_PARENT: *u8 = "../buildroot/knowledge/gates/nx_skullskin_gate.skull.nxmesh"
40const SKG_MODE755: i64 = 493
41const SKG_I64: i64 = 8
42const SKG_W: i64 = 512
43const SKG_H: i64 = 384
44const SKG_SEX_FEMALE_LEANING: i64 = 300
45const SKG_ROBUST: i64 = 500
46const SKG_CELL_UM: i64 = 2000
47const SKG_SPHERE_R: i64 = 800 // an 80 mm sphere: skull-sized, so the kernel widths are in the real range
48const SKG_RINGS: i64 = 24
49const SKG_SEGS: i64 = 32
50const SKG_MIN_ROWS: i64 = 20
51const SKG_EXP_TOL: i64 = 4 // Q16 units: the series truncation of two products
52const SKG_PLANT_D0: i64 = 50
53const SKG_PLANT_D1: i64 = 80
54const SKG_PLANT_D2: i64 = 120
55const SKG_FAT_MAG: i64 = 30
56const SKG_FAT_RADIUS: i64 = 200
57const SKG_PIPE: i64 = 124
58const SKG_NL: i64 = 10
59const SKG_RGB_BPP: i64 = 3
60const SKG_BYTE: i64 = 255
61const SKG_YAW_FRONTAL: i64 = 0

functions

63func skg_pow2(a: i64) -> i64 { return a * a }
called by 1: main
65func skg_sphere(M: *i64, r: i64) -> i64
112func skg_plant(T: *i64, M: *i64, name: *u8, v: i64, d: i64) -> i64
called by 1: main calls 1: tfl_row
126func skg_canon(id: *u8, out: *i64) -> i64
156func skg_skin_thirds(S: *i64, T: *i64, out: *i64) -> i64
called by 1: main calls 3: sys_mmaptfl_gettfl_profile
199func skg_fb_to_rgb(fb: *i64, n: i64, rgb: *u8) -> i64
called by 1: main
210func main(argc: i64, argv: *i64) -> i64