nx_nxa_tier_region_gate_t143.nx
buildroot/runtime/nx_nxa_tier_region_gate_t143.nx
about
nx_nxa_tier_gate.nx -- THE GATE FOR THE INGEST TIER LADDER (nx_nxa_tier, /compare/modding MD5).
SUBJECT: the nx_nxa_tier ELF, forked for real on the banked pre-TEXM house asset (13 sections, TEXC present,
14,164 verts) -- a real artifact that is READ, never written. Every tooth asserts an exit code or a byte read
back out of the emitted tier through the format's own verifier (nxa_find checks the TOC and every section
checksum before returning), so a tier that merely EXISTS cannot pass.
THE DANGEROUS FAILURES THIS GATE EXISTS TO CATCH: a tier whose weights no longer sum to 4096 or name a joint
past the skeleton (the pose player would read that as a broken rig), a tier that quietly dropped SKEL or
TEXM (a rig-less or map-less cast member wearing a success receipt), a tier that grew or moved outside the
source's own bounding box, and a budget that silently UPSAMPLED. Each has a tooth; three have neg-controls.
FIXTURES AT RUNTIME in /tmp/nx_nxa_tier_region_gate_t143/, every output unlinked at SETUP and the unlink asserted, so the
gate is idempotent. The truncated fixture and the ladder conf are assembled here, never read from source.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_tool_run.nxnx_nxa.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 21 | const TG_SUBJECT_DEFAULT: *u8 = "_offc/nx_nxa_tier.elf" |
| 27 | const TG_SUBJECT_STAGED: *u8 = "nx_nxa_tier.sov.elf.new" |
| 28 | const TG_SUBJECT_STAGED_UP: *u8 = "../nx_nxa_tier.sov.elf.new" |
| 29 | const TG_SUBJECT_BUILD: *u8 = "_build/nx_nxa_tier.sov.elf" |
| 30 | const TG_SUBJECT_BUILD_DOWN: *u8 = "buildroot/_build/nx_nxa_tier.sov.elf" |
| 31 | const TG_PLAYER: *u8 = "/volume1/homes/elderwesto/nishihost/nx_nxa_play.elf" |
| 32 | const TG_ASSET: *u8 = "/volume1/homes/elderwesto/nishihost/knowledge/bank/ref9d.nxa.pretexm-20260823" |
| 33 | const TG_DIR: *u8 = "/tmp/nx_nxa_tier_region_gate_t143" |
| 34 | const TG_OUT1: *u8 = "/tmp/nx_nxa_tier_region_gate_t143/t1.nxa" |
| 35 | const TG_OUT2: *u8 = "/tmp/nx_nxa_tier_region_gate_t143/t2.nxa" |
| 36 | const TG_OUT3: *u8 = "/tmp/nx_nxa_tier_region_gate_t143/over.nxa" |
| 37 | const TG_OUT4: *u8 = "/tmp/nx_nxa_tier_region_gate_t143/tiny.nxa" |
| 38 | const TG_OUT5: *u8 = "/tmp/nx_nxa_tier_region_gate_t143/fromtrunc.nxa" |
| 39 | const TG_TRUNC: *u8 = "/tmp/nx_nxa_tier_region_gate_t143/trunc.nxa" |
| 40 | const TG_LADDER: *u8 = "/tmp/nx_nxa_tier_region_gate_t143/ladder.conf" |
| 41 | const TG_PFX: *u8 = "/tmp/nx_nxa_tier_region_gate_t143/lad" |
| 42 | const TG_LAD16: *u8 = "/tmp/nx_nxa_tier_region_gate_t143/lad_t16k.nxa" |
| 43 | const TG_LAD4: *u8 = "/tmp/nx_nxa_tier_region_gate_t143/lad_t4k.nxa" |
| 44 | const TG_LAD1: *u8 = "/tmp/nx_nxa_tier_region_gate_t143/lad_t1k.nxa" |
| 45 | const TG_LADDER_ROWS: *u8 = "# runtime fixture\ntier|t16k|16384|above the source, must be skipped\ntier|t4k|4096|the rig floor\ntier|t1k|1024|the far tier\n" |
| 47 | const TG_BUDGET: *u8 = "4000" |
| 48 | const TG_BUDGET_N: i64 = 4000 |
| 49 | const TG_OVER: *u8 = "20000" // at or above the source vertex count: must REFUSE |
| 50 | const TG_TINY: *u8 = "2" // under the 3-vertex floor: must REFUSE |
| 51 | const TG_TRUNC_BYTES: i64 = 600 // TOC intact, payload gone -- the corrupt-input control |
| 52 | const TG_LADDER_VERB: *u8 = "ladder" |
| 53 | const TG_EXIT_OK: i64 = 0 |
| 54 | const TG_EXIT_REFUSE: i64 = 3 |
| 55 | const TG_EXEC_NOT_FOUND: i64 = 127 |
| 56 | const TG_CAPCAP: i64 = 262144 |
| 57 | const TG_ARGVN: i64 = 8 |
| 58 | const TG_MODEDIR: i64 = 493 |
| 59 | const TG_WORD: i64 = 8 |
| 60 | const TG_HDR: i64 = 32 |
| 61 | const TG_TOCE: i64 = 32 |
| 62 | const TG_SKIN_W: i64 = 8 |
| 63 | const TG_SKIN_J: i64 = 4 |
| 64 | const TG_Q12: i64 = 4096 |
| 65 | const TG_MIN_VERTS: i64 = 3 |
| 66 | const TG_ASCII_ZERO: i64 = 48 |
| 67 | const TG_ASCII_NINE: i64 = 57 |
| 68 | const TG_BBOX_W: i64 = 6 |
functions
| 70 | func tg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 71 | func tg_rd64(b: *u8, off: i64) -> i64 { let p: *i64 = ((b as i64) + off) as *i64; return p[0] } |
| 72 | func tg_exists(path: *u8) -> i64 |
| 78 | func tg_load(path: *u8, lenout: *i64) -> *u8 |
| 85 | func tg_run3(subject: *u8, a1: *u8, a2: *u8, a3: *u8, out: *u8, olen: *i64) -> i64 |
| 94 | func tg_run4(subject: *u8, a1: *u8, a2: *u8, a3: *u8, a4: *u8, out: *u8, olen: *i64) -> i64 |
| 104 | func tg_run1(subject: *u8, a1: *u8, out: *u8, olen: *i64) -> i64 |
| 112 | func tg_kv(buf: *u8, n: i64, key: *u8) -> i64 |
| 138 | func tg_has(buf: *u8, n: i64, key: *u8) -> i64 { if tg_kv(buf, n, key) >= 0 { return 1 } return 0 } calls 1: tg_kv |
| 140 | func tg_toc_wl(b: *u8, tag: i64) -> i64 |
| 150 | func tg_copyable(tag: i64) -> i64 |
| 160 | func tg_bbox(b: *u8, flen: i64, out: *i64) -> i64 |
| 181 | func tg_write_bytes(path: *u8, b: *u8, n: i64) -> i64 |
| 191 | func tg_region_fixture(path:*u8, unique:i64)->i64 |
| 212 | func tg_regions(subject:*u8,ctr:*i64,cap:*u8,olen:*i64)->i64 |
| 236 | func tg_toon(source:*u8,tier:*u8,budget:i64,ctr:*i64)->i64 |
| 261 | func if_zero(v:i64)->i64{if v==0{return 1};return 0} called by 1: tg_toon |
| 262 | func tg_positive(a:*u8)->i64{var n:i64=0;var i:i64=0;while a[i]!=(0 as u8){let c:i64=a[i] as i64;if c<48||c>57{return 0};n=n*10+c-48;i=i+1};return n} called by 1: main |
| 264 | func main(argc: i64, argv: *i64) -> i64 |