nx_nxa_retarget_gate.nx
buildroot/runtime/nx_nxa_retarget_gate.nx
about
nx_nxa_retarget_gate.nx -- THE DONOR RETARGET GATE: handedness is DERIVED, limb length is
preserved BY CONSTRUCTION, and a witness that cannot testify ABSTAINS BY NAME.
WHY ITS NEGATIVE CONTROLS ARE STRONGER THAN ANY MUTANT I COULD CONSTRUCT: every RED below is a
REAL DEFECT THIS ORGAN ACTUALLY SHIPPED AND THIS LANE ACTUALLY CAUGHT, on the real corpus, within
hours. Nothing here is synthetic.
- CHIRALITY. Before the mesh-derived anterior cue, frame_det came out +1 / +1 / -1 / -1 across
four ordinary humanoids -- i.e. TWO OF FOUR DONORS WERE POSED MIRRORED, left and right
swapped, and NO LIMB-LENGTH TOOTH COULD CATCH IT because a mirror preserves every length it
checks. The cause: handedness was resolved by argmin over mapping distance, and a bilaterally
symmetric point set (every rig here scores sym_permil=1000) is near-ISOMETRIC UNDER MIRRORING,
so both options tie and the argmin picks arbitrarily.
- VACUOUS BANDS. The anterior cue takes two witnesses, a foot band and a head band, and requires
them to agree. With the band height derived from GLOBAL mean joint spacing, paladin measured
foot=head=2184 and dark_knight foot=head=-140 -- BYTE-IDENTICAL, because both bands covered
the entire mesh. TWO WITNESSES THAT ARE SECRETLY THE SAME WITNESS AGREE ONE HUNDRED PERCENT
OF THE TIME. dark_knight's whole verdict rested on -140 units of whole-mesh noise.
- UNPOPULATED BANDS. Disjointness turned out to be NECESSARY BUT NOT SUFFICIENT: toon3d8's
toe-tip bone is 1 unit long, so its foot band held exactly 2 VERTICES and an entire handedness
verdict rested on them. A band must also be POPULATED, and the floor comes from the asset --
a region holding fewer points than the rig has joints is stray vertices, not a shape.
The three donors that now REFUSE are therefore the gate's own neg-controls: they prove the teeth
can fail, on real assets, for three DISTINCT named reasons.
usage: nx_nxa_retarget_gate (no args -- reads the real corpus)
license_tier: ORIGINAL expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_gatekit_lib.nxnx_tool_run.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
| 33 | const RG_ELF: *u8 = "./nx_nxa_retarget.elf" |
| 34 | const RG_SRC: *u8 = "sites/nishifamily/world/ref9d.nxa" |
| 35 | const RG_WITCH: *u8 = "knowledge/rigcorpus/dark_witch_rigged.nxa" |
| 36 | const RG_KNIGHT: *u8 = "knowledge/rigcorpus/dark_knight_rigged.nxa" |
| 37 | const RG_TOON: *u8 = "knowledge/rigcorpus/toon3d8_rigged.nxa" |
| 38 | const RG_PAL: *u8 = "knowledge/rigcorpus/paladin_rigged.nxa" |
| 39 | const RG_POSE: *u8 = "0" |
| 40 | const RG_CAP: i64 = 65536 |
| 42 | const RG_EXIT_REFUSE: i64 = 3 |
| 44 | const RG_PLAY: *u8 = "./nx_nxa_play.elf" |
| 45 | const RG_TMP: *u8 = "/tmp/nx_nxa_retarget_gate" |
| 46 | const RG_TMP_MODE: i64 = 493 // 0755: gate scratch under /tmp/<gate>/, never a production path |
| 47 | const RG_POSE_OUT: *u8 = "/tmp/nx_nxa_retarget_gate/witch_pose.nxa" |
| 48 | const RG_POSE_OUT2: *u8 = "/tmp/nx_nxa_retarget_gate/witch_pose_again.nxa" |
| 49 | const RG_BAKE_OUT: *u8 = "/tmp/nx_nxa_retarget_gate/witch_bake.nxa" |
| 50 | const RG_EMIT: *u8 = "emit=pose" |
| 51 | const RG_NOPOSE: *u8 = "777" // a pose id the emitted library does not hold: identity replay |
| 52 | const RG_ARGVN: i64 = 8 |
| 53 | const RG_TMO_MS: i64 = 600000 // a hang guard, not a budget: a witch retarget measures in seconds |
| 54 | const RG_PERMIL: i64 = 1000 |
| 55 | const RG_SQRT3_PERMIL: i64 = 1733 // player = MAX-AXIS displacement, retarget = EUCLIDEAN norm: axis <= norm <= sqrt(3)*axis, a geometric identity |
| 56 | const RG_TOC_BYTES: i64 = 32 // one TOC entry (nx_nxa.nx: 4 words) |
| 57 | const RG_POSE_HDR_W: i64 = 3 // POSE payload over an EMPTY library: [count, pose_id, nentries] then 8 words per entry |
| 58 | const RG_WPE: i64 = 8 |
functions
| 61 | func rg_call(elf: *u8, a1: *u8, a2: *u8, a3: *u8, a4: *u8, a5: *u8, a6: *u8, buf: *u8, cap: i64, bl: *i64) -> i64 |
| 68 | func rg_num_after(buf: *u8, n: i64, key: *u8) -> i64 |
| 86 | func rg_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } |
| 88 | func main(argc: i64, argv: *i64) -> i64 |