code wiki / (root) / nx_motion_serve_gate.nx

nx_motion_serve_gate.nx

buildroot/runtime/nx_motion_serve_gate.nx

17221 B238 linesdepth 3pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic motion
docsdependenciesstructsconstsfunctions

about

nx_motion_serve_gate.nx -- THE /motion SURFACE'S REFEREE (2026-09-06): the ONE lib's rulers on planted inputs (typing by magic, the multipart parser, form decoding, path shape, status rows, the renderers) and the job organ END TO END on a box fixture this gate writes itself -- rig, render, export, digest -- run TWICE, so determinism is a tooth and not a sentence, plus a refusal control (an OBJ upload must fail at the named stage with the named code). It never touches the served daemon or a live job directory: every artifact lands under /tmp/nx_motion_serve_gate/<clock>/. license_tier: ORIGINAL expect_exit: 0

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_nxa.nx nx_boneheat_lib.nx nx_motion_lib.nx nx_motion_serve_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_nxa.nxnx_boneheat_lib.nxnx_motion_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_head gv_puts sys_write ↻ sys_mmap ↻ mo_cat gv_check_eq gv_check gv_puts ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap mo_kind_of mo_starts mo_boundary mo_find mo_findfrom mo_slen gv_check ↻ mo_streq mo_part_find sys_mmap ↻

structs

none

consts

13const MG_ROOT: *u8 = "/tmp/nx_motion_serve_gate"
14const MG_RIG_ELF: *u8 = "_offc/nx_motion_rig.elf"
15const MG_BOX_HX: i64 = 2000 // a 40 x 40 x 120 mm box in 0.01 mm units: a bar, which the peeler reads as two limbs
16const MG_BOX_HY: i64 = 2000
17const MG_BOX_HZ: i64 = 6000
18const MG_BOX_VERTS: i64 = 8
19const MG_BOX_TRIS: i64 = 12
20const MG_CELLS: i64 = 48
21const MG_BUF: i64 = 65536
22const MG_SHA_LEN: i64 = 64

functions

24func mg_quad(tris: *i64, k: i64, a: i64, b: i64, c: i64, d: i64) -> i64
called by 1: mg_box
30func mg_box(path: *u8) -> i64
61func mg_jobdir(root: *u8, name: *u8, kindname: *u8, inbytes: *u8, n: i64) -> *u8
72func mg_run_rig(jobdir: *u8) -> i64
called by 1: main calls 4: sys_mmapmo_nummo_runmo_join
81func main() -> i64