nx_bodyfit_canon_gate.nx
buildroot/runtime/nx_bodyfit_canon_gate.nx
about
nx_bodyfit_canon_gate.nx -- DOES CANON MODE ACTUALLY TRANSFORM THE CANON, AND DOES IT REFUSE WHEN THE
GENOME DOES NOT DESCRIBE IT? nx_bodyfit grew a second genome decoder (per-part ring scaling), and a
decoder that silently COPIED its input would pass every downstream check there is: the body still
generates, the renderer still renders, the judge still scores, and the search still reports a
best-of-generation. Nothing in the pipeline can tell a working transform from a no-op, which is
exactly the shape of defect that survives review and ships.
nx_bodyfit_canon_gate (no args)
★★★THE IDENTITY CASE IS THE STRONGEST INVARIANT AVAILABLE: every gene at mid-envelope maps to a
per-mille scale of exactly 1000, so the emitted canon must be BYTE-IDENTICAL to the source -- every R
row, every negative offset, every P row, or the decoder is lossy somewhere.
★★BUT BYTE-IDENTITY ALONE IS PASSED BY A TRANSFORM THAT DOES NOTHING, so it is paired with a BITE
cell: the extreme genome MUST differ from the source while the identity genome MUST match. Either
tooth alone is vacuous; only the pair proves the transform both WORKS and IS NOT A COPY.
★IT ADDRESSES THE ARTIFACT BY THE PATH THE ORGAN ANNOUNCES (canon_path=), never by reconstructing the
filename from bodyfit.conf's envelope midpoints -- a reconstructed name breaks silently the moment any
bound is edited, and a gate that tests the wrong file reports GREEN about nothing.
exit 0 GREEN | 1 RED | 3 SKIP
license_tier: ORIGINAL. No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.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
| 25 | const BG_BODYFIT: *u8 = "/volume1/homes/elderwesto/nishihost/nx_bodyfit.elf" |
| 26 | const BG_CANON: *u8 = "knowledge/canon_merge2.dat" |
| 27 | const BG_CANON_PATH: *u8 = "knowledge/bodyfit_canon.path" |
| 28 | const BG_OUTCAP: i64 = 262144 |
| 30 | const BG_TIMEOUT_MS: i64 = 300000 |
| 32 | const BG_MIDGENE: i64 = 500 |
functions
| 34 | func bg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 35 | func bg_trim_path(b: *u8, n: i64) -> i64 { var k: i64 = n; var done: i64 = 0; while k > 0 { if done == 0 { let c: i64 = b[k-1] as i64; if c == 10 { k = k - 1 } else { if c == 13 { k = k - 1 } else { if c == 32 { k = k - 1 } else { done = 1 } } } } } b[k] = 0 as u8; return k } called by 1: main |
| 36 | func bg_count_parts(p: *u8) -> i64 { let ln: *i64 = sys_mmap(16) as *i64; let b: *u8 = sys_read_file(p, ln); if (b as i64) == 0 { return 0 - 1 }; var i: i64 = 0; var bol: i64 = 1; var n: i64 = 0; while i < ln[0] { if bol == 1 { if b[i] == (80 as u8) { n = n + 1 } }; if b[i] == (10 as u8) { bol = 1 } else { bol = 0 }; i = i + 1 }; return n } |
| 39 | func bg_num(d: *u8, off: i64, v: i64) -> i64 |
| 56 | func bg_find(h: *u8, n: i64, needle: *u8) -> i64 |
| 76 | func bg_extract(h: *u8, n: i64, key: *u8, dst: *u8, dcap: i64) -> i64 |
| 99 | func bg_same(a: *u8, b: *u8) -> i64 |
| 121 | func bg_eq(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 } called by 1: main |
| 122 | func bg_ne(a: i64, b: i64) -> i64 { if a != b { return 1 } return 0 } |
| 123 | func bg_ge0(a: i64) -> i64 { if a >= 0 { return 1 } return 0 } called by 1: main |
| 124 | func bg_gt0(a: i64) -> i64 { if a > 0 { return 1 } return 0 } called by 1: main |
| 125 | func bg_exists(p: *u8) -> i64 |
| 133 | func bg_run_canon(subj: *u8, v: i64, n: i64, out: *u8, olen: *i64) -> i64 |
| 150 | func main(argc: i64, argv: *i64) -> i64 |