code wiki / (root) / nx_mediajudge_gate.nx

nx_mediajudge_gate.nx

buildroot/runtime/nx_mediajudge_gate.nx

17662 B254 linesdepth 12pulls 83 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_gate_verdict.nx nx_twinfit_lib.nx nx_mediajudge_lib.nx nx_mediajudge_gate.nx

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

main gv_head gv_puts sys_write gv_ctr sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_mkdir sys_mmap ↻ gv_need gv_puts ↻ mj_load_cascades sys_mmap ↻ ff_load_face hx_load sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close hx_parse hx_find hx_slen hx_skip_ws

structs

none

consts

15const MG_DIR: *u8 = "/tmp/mediajudge_gate"
16const MG_STILL: *u8 = "/tmp/mediajudge_gate/seed42.png"
17const MG_FLAT: *u8 = "/tmp/mediajudge_gate/flat.png"
18const MG_JUNK: *u8 = "/tmp/mediajudge_gate/prose.txt"
19const MG_JUNK_TEXT: *u8 = "no decoder should take this: it is prose, not an image\n"
20const MG_ABSENT: *u8 = "/tmp/mediajudge_gate/absent/none.png"
21const MG_ORACLE: *u8 = "/tmp/mediajudge_gate/seed42.oracle"
24const 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"
25const MG_ORIG_COPY: *u8 = "/tmp/mediajudge_gate/seed42.original.png"
26const MG_OVERLAY: *u8 = "/tmp/mediajudge_gate/seed42.overlay.png"
27const MG_MANIFEST: *u8 = "/tmp/mediajudge_gate/seed42.manifest.tsv"
28const MG_JUDGE: *u8 = "/tmp/mediajudge_gate/seed42.judge"
29const MG_PLANE: *u8 = "/tmp/mediajudge_gate/seed42.plane.tsv"
30const MG_NOFACE_ORACLE: *u8 = "/tmp/mediajudge_gate/noface.oracle"
32const 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"
33const MG_ICI_EXPECT: i64 = 390 // the planted canthi: inner span 43 px over outer span 110 px, the oracle row's own 390
34const MG_ICI_TOL: i64 = 5
35const MG_GAP_ROWS_EXPECT: i64 = 5 // four eye axes and the lip ratio: the seed-42 render measures both eyes and the mouth
36const MG_LIC_ROWS: i64 = 2
37const MG_COL_OURS: i64 = 2 // gap|axis|ours|best|holder in the judge file's pipe grammar
38const MG_COL_BEST: i64 = 3
39const MG_FLAT_MANIFEST: *u8 = "/tmp/mediajudge_gate/flat.manifest.tsv"
40const MG_HREFPFX: *u8 = "/compare/aesthetictwin/media/flat/" // the published form's site-absolute prefix (the page law)
41const MG_HREF_ROW: *u8 = "tasset\t1\timg\t/compare/aesthetictwin/media/flat/flat.original.png"
42const MG_SLUG: *u8 = "seed42"
43const MG_SLUG_KEY: *u8 = "seed42\t" // the plane row prefix: the slug then a tab, what nx_asset_page emit selects on
44const MG_FLAT_SLUG: *u8 = "flat"
45const MG_MODE755: i64 = 493
46const MG_MODE644: i64 = 420
47const MG_I64: i64 = 8
48const MG_SEED: i64 = 42
49const MG_YAW: i64 = 0
50const MG_FLAT_W: i64 = 96
51const MG_FLAT_H: i64 = 64
52const MG_FLAT_GREY: i64 = 8355711 // 127,127,127 packed
53const MG_RED: i64 = 255
54const MG_GREEN: i64 = 65280
55const 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
58const MG_ORACLE_NME_EXPECT: i64 = 81
59const MG_ORACLE_NME_TOL: i64 = 5
129const MG_FROZEN: *u8 = "knowledge/fixtures/mediajudge_seed42.png"
130const MG_FROZEN_BYTES: i64 = 94161

functions

61func mg_write(path: *u8, text: *u8) -> i64
68func mg_same_file(a: *u8, b: *u8) -> i64
called by 1: main calls 2: sys_mmapsys_read_file
81func mg_png_pixel(path: *u8, x: i64, y: i64, wh: *i64) -> i64
104func mg_count_rows(path: *u8, prefix: *u8) -> i64
called by 1: main calls 2: sys_mmapsys_read_file
132func mg_copy(src: *u8, dst: *u8) -> i64
143func mg_row_int(path: *u8, prefix: *u8, idx: i64) -> i64
called by 1: main calls 2: sys_mmapsys_read_file
167func main(argc: i64, argv: *i64) -> i64