nx_skinsample_gate.nx
buildroot/runtime/nx_skinsample_gate.nx
about
nx_skinsample_gate.nx -- the referee for nx_skinsample_lib (aesthetictwin AT23, 2026-09-16). In-process on synthetic pixels
(no network, no real card): a known sRGB skin patch on a blue field measures to its known CIELAB values and typology angle
within a stated tolerance, the mask counts exactly the patch, an all-blue image is UNMEASURED rather than a colour, the
arctangent reproduces its known answers, white maps to L* 100 with no chroma, and a card write refuses to clobber an
existing row while appending four measured rows to a bare card. Values are printed with gv_kv; the verdict line stays LAST.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_skinsample_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
| 11 | const SG_W: i64 = 100 |
| 12 | const SG_H: i64 = 100 |
| 13 | const SG_PATCH: i64 = 50 |
| 14 | const SG_PATCH_X: i64 = 25 |
| 15 | const SG_PATCH_Y: i64 = 25 |
| 16 | const SG_R: i64 = 200 |
| 17 | const SG_G: i64 = 150 |
| 18 | const SG_B: i64 = 120 |
| 19 | const SG_BLUE: i64 = 255 |
| 20 | const SG_WHITE: i64 = 255 |
| 22 | const SG_EXP_L_E3: i64 = 66080 |
| 23 | const SG_EXP_A_E3: i64 = 14850 |
| 24 | const SG_EXP_B_E3: i64 = 23120 |
| 25 | const SG_EXP_ITA_DEG10: i64 = 348 |
| 26 | const SG_TOL_L_E3: i64 = 400 |
| 27 | const SG_TOL_AB_E3: i64 = 600 |
| 28 | const SG_TOL_ITA_DEG10: i64 = 8 |
| 29 | const SG_WHITE_L_E3: i64 = 100000 |
| 30 | const SG_TOL_WHITE_L_E3: i64 = 600 |
| 32 | const SG_ATAN45_L_E3: i64 = 60000 |
| 33 | const SG_ATAN45_B_E3: i64 = 10000 |
| 34 | const SG_ATAN45_DEG10: i64 = 450 |
| 35 | const SG_ATANHALF_L_E3: i64 = 55000 |
| 36 | const SG_ATANHALF_DEG10: i64 = 266 |
| 37 | const SG_TOL_ATAN: i64 = 2 |
| 38 | const SG_DIR: *u8 = "/tmp/skinsample_gate" |
| 39 | const SG_KDIR: *u8 = "/tmp/skinsample_gate/knowledge" |
| 40 | const SG_CARD_DIR: *u8 = "/tmp/skinsample_gate/knowledge/twincard" |
| 41 | const SG_CARD_FULL: *u8 = "/tmp/skinsample_gate/knowledge/twincard/fx.card" |
| 42 | const SG_CARD_BARE: *u8 = "/tmp/skinsample_gate/knowledge/twincard/fy.card" |
| 43 | const SG_CARD_FULL_TEXT: *u8 = "card|fx|Fixture Full|2026-09-16|fixture\naxis|skin|skin_L|C|60|observed|fx1|2026-09\n" |
| 44 | const SG_CARD_BARE_TEXT: *u8 = "card|fy|Fixture Bare|2026-09-16|fixture\n" |
| 45 | const SG_CARD_ROWS: i64 = 4 |
| 46 | const SG_BPP: i64 = 3 |
| 47 | const SG_MODE644: i64 = 420 |
| 48 | const SG_MODE755: i64 = 493 |
| 49 | const SG_I64: i64 = 8 |
functions
| 51 | func sg_fill(rgb: *u8, w: i64, h: i64, x0: i64, y0: i64, pw: i64, ph: i64, r: i64, g: i64, b: i64) -> i64 called by 1: main |
| 66 | func sg_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } called by 1: main |
| 67 | func sg_write(path: *u8, text: *u8) -> i64 |
| 75 | func main(argc: i64, argv: *i64) -> i64 |