nx_mediajudge_gate.nx
buildroot/runtime/nx_mediajudge_gate.nx
about
nx_mediajudge_gate.nx -- the referee for nx_mediajudge_lib (aesthetictwin AT36, 2026-09-17). The fixture is the estate's own
seed-42 face rendered through nx_twinfit_lib (the render the outside oracle judged), judged through the media judge into a
scratch directory: the still decodes, the ruler places both eyes and the mouth, skin and symmetry are numbers, the
original copy lands byte-identical, the overlay PNG decodes back to the same frame with a RED marker at the measured
right lateral canthus and a GREEN pixel on the face box's top edge, the manifest carries a meta row, two tasset rows,
three tier rows and every judge row the numbers imply, the judge file carries the same rows in pipe grammar, and a
planted oracle row for the render makes the referee report its judgement. Controls: a flat field decodes but has no eye
pair (JUDGED-NO-EYE-PAIR, judge rows still emitted), prose is refused by every decoder, an absent file is unreadable.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_twinfit_lib.nxnx_mediajudge_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
| 15 | const MG_DIR: *u8 = "/tmp/mediajudge_gate" |
| 16 | const MG_STILL: *u8 = "/tmp/mediajudge_gate/seed42.png" |
| 17 | const MG_FLAT: *u8 = "/tmp/mediajudge_gate/flat.png" |
| 18 | const MG_JUNK: *u8 = "/tmp/mediajudge_gate/prose.txt" |
| 19 | const MG_JUNK_TEXT: *u8 = "no decoder should take this: it is prose, not an image\n" |
| 20 | const MG_ABSENT: *u8 = "/tmp/mediajudge_gate/absent/none.png" |
| 21 | const MG_ORACLE: *u8 = "/tmp/mediajudge_gate/seed42.oracle" |
| 24 | const MG_ORACLE_TEXT: *u8 = "oracle|/tmp/mediajudge_gate/seed42.png|-|512|384|1|2001,1619|2338,1670|2769,1679|3104,1619|2556,2470|2553,2559|2555,2593|2549,2744|2309,2518|2796,2528|2138,1614|2948,1619|2572,2291|2542,2954|2566,1024|85|101|390|1263|591|110|172,102,336,295\n" |
| 25 | const MG_ORIG_COPY: *u8 = "/tmp/mediajudge_gate/seed42.original.png" |
| 26 | const MG_OVERLAY: *u8 = "/tmp/mediajudge_gate/seed42.overlay.png" |
| 27 | const MG_MANIFEST: *u8 = "/tmp/mediajudge_gate/seed42.manifest.tsv" |
| 28 | const MG_JUDGE: *u8 = "/tmp/mediajudge_gate/seed42.judge" |
| 29 | const MG_PLANE: *u8 = "/tmp/mediajudge_gate/seed42.plane.tsv" |
| 30 | const MG_NOFACE_ORACLE: *u8 = "/tmp/mediajudge_gate/noface.oracle" |
| 32 | const MG_NOFACE_TEXT: *u8 = "oracle|/tmp/mediajudge_gate/seed42.png|-|512|384|0|2001,1619|2338,1670|2769,1679|3104,1619|2556,2470|2553,2559|2555,2593|2549,2744|2309,2518|2796,2528|2138,1614|2948,1619|2572,2291|2542,2954|2566,1024|85|101|390|1263|591|110|172,102,336,295\n" |
| 33 | const MG_ICI_EXPECT: i64 = 390 // the planted canthi: inner span 43 px over outer span 110 px, the oracle row's own 390 |
| 34 | const MG_ICI_TOL: i64 = 5 |
| 35 | const MG_GAP_ROWS_EXPECT: i64 = 5 // four eye axes and the lip ratio: the seed-42 render measures both eyes and the mouth |
| 36 | const MG_LIC_ROWS: i64 = 2 |
| 37 | const MG_COL_OURS: i64 = 2 // gap|axis|ours|best|holder in the judge file's pipe grammar |
| 38 | const MG_COL_BEST: i64 = 3 |
| 39 | const MG_FLAT_MANIFEST: *u8 = "/tmp/mediajudge_gate/flat.manifest.tsv" |
| 40 | const MG_HREFPFX: *u8 = "/compare/aesthetictwin/media/flat/" // the published form's site-absolute prefix (the page law) |
| 41 | const MG_HREF_ROW: *u8 = "tasset\t1\timg\t/compare/aesthetictwin/media/flat/flat.original.png" |
| 42 | const MG_SLUG: *u8 = "seed42" |
| 43 | const MG_SLUG_KEY: *u8 = "seed42\t" // the plane row prefix: the slug then a tab, what nx_asset_page emit selects on |
| 44 | const MG_FLAT_SLUG: *u8 = "flat" |
| 45 | const MG_MODE755: i64 = 493 |
| 46 | const MG_MODE644: i64 = 420 |
| 47 | const MG_I64: i64 = 8 |
| 48 | const MG_SEED: i64 = 42 |
| 49 | const MG_YAW: i64 = 0 |
| 50 | const MG_FLAT_W: i64 = 96 |
| 51 | const MG_FLAT_H: i64 = 64 |
| 52 | const MG_FLAT_GREY: i64 = 8355711 // 127,127,127 packed |
| 53 | const MG_RED: i64 = 255 |
| 54 | const MG_GREEN: i64 = 65280 |
| 55 | const MG_MIN_JUDGE_ROWS: i64 = 12 // 3 flags + 7 eye axes + lip + 3 skin + symmetry + 2 referee = 17 with eyes and a mouth; 12 is the floor with eyes |
| 58 | const MG_ORACLE_NME_EXPECT: i64 = 81 |
| 59 | const MG_ORACLE_NME_TOL: i64 = 5 |
| 129 | const MG_FROZEN: *u8 = "knowledge/fixtures/mediajudge_seed42.png" |
| 130 | const MG_FROZEN_BYTES: i64 = 94161 |
functions
| 61 | func mg_write(path: *u8, text: *u8) -> i64 |
| 68 | func mg_same_file(a: *u8, b: *u8) -> i64 |
| 81 | func mg_png_pixel(path: *u8, x: i64, y: i64, wh: *i64) -> i64 |
| 104 | func mg_count_rows(path: *u8, prefix: *u8) -> i64 |
| 132 | func mg_copy(src: *u8, dst: *u8) -> i64 |
| 143 | func mg_row_int(path: *u8, prefix: *u8, idx: i64) -> i64 |
| 167 | func main(argc: i64, argv: *i64) -> i64 |