nx_likeness_gate.nx
buildroot/runtime/nx_likeness_gate.nx
about
nx_likeness_gate.nx -- the referee for nx_likeness_lib (aesthetictwin AT45, 2026-09-18). On the real reference set (four clothed,
frontal Diora Baird stills, aligned from the outside oracle rows) and the real renders the operator judged: the band is derived
from at least three same-person pairs and the canvas from the smallest reference eye span; a reference against itself reads zero
on every axis; the anchor still resampled into a rolled, scaled frame (a planted control whose landmarks are carried by the same
similarity) reads INSIDE with its geometry within two canvas pixels, and its mouth landmarks shifted by a tenth of the eye span
read the shift back (the geometry axis can fire); the canon face and a seed render -- renders of nobody in particular -- read
OUTSIDE the band; the two renders the operator rejected as not her (diora_baird_close.png, diora_baird_threequarter.png) read
OUTSIDE, and they read it MEASURED, not as an absence of alignment; each score's partition sums; the lk_score door agrees with
the in-process path. Values are printed with gv_kv. Fixtures live under /tmp/nx_likeness_gate/ (created at setup); the reference
stills, the oracle rows and the renders are read from the estate's own paths and are PRECONDITIONS (SKIP when absent, never RED).
THE FIRST RUN'S ACCEPT RULE WAS STRICTER AND IT FAILED, WHICH IS RECORDED HERE RATHER THAN TUNED AWAY: the renders were required
to read OUTSIDE on the structure axes. Measured 2026-09-18 on this set they do not -- the same person's own photographs spread
more on every classical structure ruler than a render differs from a photograph at an 84 px canvas (struct_l1 band 2891 against
renders 2128..2759; shading 846 against 441..595; texture layout 644 against 559..654; texture energy 52 against 6..12) -- and
the rejections rest on skin chroma (a*) and, for the three-quarter render, on texture layout. That separation count is published
as a value (structure_family_separates_renders_of_4) and is the open accept bar of the structure contender queued on the board.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_likeness_lib.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
| 22 | const LG_I64: i64 = 8 |
| 23 | const LG_MODE755: i64 = 493 |
| 24 | const LG_MODE644: i64 = 420 |
| 25 | const LG_DIR: *u8 = "/tmp/nx_likeness_gate" |
| 26 | const LG_LIST: *u8 = "/tmp/nx_likeness_gate/refs.list" |
| 27 | const LG_LIST_TEXT: *u8 = "@oracle knowledge/refintake/diora_baird.oracle\nknowledge/fetched/ri_diora_baird_3.jpg\nknowledge/fetched/ri_diora_baird_11.jpg\nknowledge/fetched/ri_diora_baird_12.jpg\nknowledge/fetched/ri_diora_baird_14.jpg\n" |
| 28 | const LG_ORACLE: *u8 = "knowledge/refintake/diora_baird.oracle" |
| 29 | const LG_REF3: *u8 = "knowledge/fetched/ri_diora_baird_3.jpg" |
| 30 | const LG_REF11: *u8 = "knowledge/fetched/ri_diora_baird_11.jpg" |
| 31 | const LG_REF12: *u8 = "knowledge/fetched/ri_diora_baird_12.jpg" |
| 32 | const LG_REF14: *u8 = "knowledge/fetched/ri_diora_baird_14.jpg" |
| 33 | const LG_ANCHOR: *u8 = "ri_diora_baird_14.jpg" |
| 34 | const LG_CANON: *u8 = "sites/nishifamily/compare/aesthetictwin/results/img/canon_close.png" |
| 35 | const LG_SEED1: *u8 = "sites/nishifamily/compare/aesthetictwin/results/img/seed_1.png" |
| 36 | const LG_REJ_CLOSE: *u8 = "sites/nishifamily/compare/aesthetictwin/results/img/diora_baird_close.png" |
| 37 | const LG_REJ_TQ: *u8 = "sites/nishifamily/compare/aesthetictwin/results/img/diora_baird_threequarter.png" |
| 38 | const LG_CTL_NAME: *u8 = "planted-roll-scale-control" |
| 39 | const LG_REFS: i64 = 4 |
| 40 | const LG_MIN_PAIRS: i64 = 3 |
| 43 | const LG_CTL_W: i64 = 300 |
| 44 | const LG_CTL_H: i64 = 260 |
| 45 | const LG_CTL_RX: i64 = 1200 |
| 46 | const LG_CTL_RY: i64 = 1400 |
| 47 | const LG_CTL_LX: i64 = 1800 |
| 48 | const LG_CTL_LY: i64 = 1100 |
| 49 | const LG_CTL_IOD: i64 = 671 // isqrt(600*600 + 300*300) deci-pixels |
| 50 | const LG_CTL_IOD_TOL: i64 = 1 |
| 51 | const LG_CANVAS_PX_TOL: i64 = 2 // the geometry of a resampled copy is held to two canvas pixels |
| 52 | const LG_SHIFT_DIV: i64 = 10 // the neg-control moves the five mouth points by a tenth of the control's eye span |
| 53 | const LG_MOUTH_PTS: i64 = 5 |
functions
| 55 | func lg_exists(path: *u8) -> i64 |
| 61 | func lg_write(path: *u8, text: *u8) -> i64 |
| 68 | func lg_find(set: *i64, base: *u8) -> i64 |
| 75 | func lg_render(ctx: *i64, set: *i64, path: *u8, sc: *i64, aligned_out: *i64) -> i64 |
| 90 | func lg_partition_ok(sc: *i64) -> i64 { return (sc[LK_S_INSIDE] + sc[LK_S_OUTSIDE] + sc[LK_S_UNMEASURED] == LK_AX_N) as i64 } called by 1: main |
| 93 | func lg_structure_outside(sc: *i64) -> i64 called by 1: main |
| 102 | func main(argc: i64, argv: *i64) -> i64 |