code wiki / _hdl_build / nx_cdmap_pixjudge_gate.nx

nx_cdmap_pixjudge_gate.nx

buildroot/runtime/_hdl_build/nx_cdmap_pixjudge_gate.nx

18970 B282 linesdepth 9pulls 14 transitivereach 0 importersview sourcekind gate/prooftopic cdmap
docsdependenciesstructsconstsfunctions

about

nx_cdmap_pixjudge_gate.nx -- referee for the position map's PIXEL REFEREE (datavis DV2, 2026-09-15). Hand-built figures are drawn as ink through the sovereign font engine and the pixel critic is held to what a reader would see: a pristine figure reads clean; a PLANTED FONT-METRIC DRIFT -- two runs of wide glyphs reserved by the heuristic width and placed just past that reserve, so the self-grade's boxes are apart while the real ink overlaps -- must be caught by the pixel ruler AND missed by the box ruler on the same bytes (the DV2 done-rule); a label on ANOTHER player's mark is a defect while a label on its OWN mark is not; ink that leaves the plot frame is OFF; the agreement call is bound to the published number both ways; a missing face is a NAMED refusal, never a zero vector; and, when the live search page is on disk, the served figure's pixel grade is compared with the grade it published (an optional witness announced through gv_kv, never gv_need, so an absent page cannot SKIP the gate forever on one host). The face IS the subject's substrate, so its absence is gv_need: without a face nothing here measures anything. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_cdmap_pixjudge_lib.nx nx_syscalls.nx nx_gate_verdict.nx nx_cdmap_pixjudge_gate.nx

imports: nx_cdmap_pixjudge_lib.nxnx_syscalls.nxnx_gate_verdict.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 ↻ tf_load sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close tf_load_buf tf_rd16 tf_find_table tf_rd16 ↻ tf_rd32 tf_cmap_pick4 tf_rd16 ↻ tf_rd32 ↻ sys_mmap ↻ tf_rd16s tf_rd16 ↻

structs

none

consts

16const G_FONT_PX: i64 = 13
17const G_EXP_N: i64 = 2
18const G_VB_W: i64 = 760
19const G_VB_H: i64 = 520
20const G_FRAME_X1: i64 = 730
21const G_W_CHARS: i64 = 6 // the drift plant: six W, the widest Latin glyph a sans face carries
22const G_DRIFT_A_X: i64 = 100
23const G_DRIFT_GAP: i64 = 2 // label B starts this far past label A's HEURISTIC reserve
24const G_JSON_BYTES: i64 = 512
25const G_CH_QUOTE: i64 = 34
26const G_PUB_MM: i64 = 1
27const G_PUB_SPREAD: i64 = 690
28const G_PUB_DEFECTS_WRONG: i64 = 3
29const G_FONT_NAS: *u8 = "knowledge/fonts/LiberationSans-Regular.ttf"
30const G_FONT_NAS_BOLD: *u8 = "knowledge/fonts/LiberationSans-Bold.ttf"
31const G_FONT_LAPTOP: *u8 = "web_assets/fonts/LiberationSans-Regular.ttf"
32const G_FONT_LAPTOP_BOLD: *u8 = "web_assets/fonts/LiberationSans-Bold.ttf"
33const G_LIVE_PAGE: *u8 = "sites/nishifamily/compare/search/index.html"
34const G_LIVE_API: *u8 = "sites/nishifamily/compare/search/api.json"
35const G_BLOCK: *u8 = "readability_cut"
36const G_FIX_BYTES: i64 = 2048
38const G_FIX_HEAD: *u8 = "<figure><svg class='cdmap' viewBox='0 0 760 520'>\n<rect x='70' y='30' width='660' height='430' rx='6' fill='var(--nx-color-panel)'/>\n<text x='70' y='475' fill='var(--nx-color-mut)' font-size='11'>700</text>\n"
39const G_FIX_TAIL: *u8 = "</svg></figure>\n"
40const G_MARKS_PRISTINE: *u8 = "<circle cx='180' cy='216' r='15' fill='var(--nx-color-accent)'/>\n<circle cx='483' cy='387' r='15' fill='rgb(230,159,0)'/>\n"
41const G_MARKS_FAR: *u8 = "<circle cx='600' cy='100' r='5' fill='rgb(1,1,1)'/>\n<circle cx='650' cy='100' r='5' fill='rgb(1,1,1)'/>\n"
42const G_MARK_EDGE: *u8 = "<circle cx='700' cy='216' r='5' fill='rgb(1,1,1)'/>\n"
43const G_LBL_NISHI_OK: *u8 = "<text x='201' y='220' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke' font-weight='700'>Nishi</text>\n"
44const G_LBL_MOJEEK_OK: *u8 = "<text x='504' y='391' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke'>Mojeek</text>\n"
45const G_LBL_NISHI_OWNMARK: *u8 = "<text x='170' y='220' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke' font-weight='700'>Nishi</text>\n"
46const G_LBL_MOJEEK_ONMARK0: *u8 = "<text x='150' y='236' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke'>Mojeek</text>\n"
47const G_LBL_EDGE: *u8 = "<text x='700' y='220' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke'>Marginalia</text>\n"
48const G_DRIFT_A: *u8 = "<text x='100' y='300' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke'>WWWWWW</text>\n"
49const G_DRIFT_B_OPEN: *u8 = "<text x='"
50const G_DRIFT_B_CLOSE: *u8 = "' y='300' font-size='13' fill='var(--nx-color-fg)' style='paint-order:stroke'>WWWWWW</text>\n"
51const G_WWWWWW: *u8 = "WWWWWW"
54const G_NOTE_CLEAR: *u8 = "<g class='cdnote'><title>note t1</title><rect x='400' y='100' width='170' height='40' rx='4'/>\n<text x='405' y='114' fill='var(--nx-color-fg)' font-size='11'>a clear note</text>\n<text x='405' y='128' fill='var(--nx-color-fg)' font-size='11'>second line</text>\n</g>\n"
55const G_NOTE_ONLABEL: *u8 = "<g class='cdnote'><title>note t2</title><rect x='500' y='378' width='170' height='26' rx='4'/>\n<text x='504' y='391' fill='var(--nx-color-fg)' font-size='11'>Mojeek again</text>\n</g>\n"
56const G_NOTE_ONMARK: *u8 = "<g class='cdnote'><title>note t3</title><rect x='148' y='206' width='40' height='26' rx='4'/>\n<text x='152' y='220' fill='var(--nx-color-fg)' font-size='11'>over</text>\n</g>\n"
57const G_NOTE_LINES: i64 = 2

functions

59func g_i64(n: i64) -> *i64 { return sys_mmap(n * CRG_I64_BYTES) as *i64 }
called by 2: g_box_grademain calls 1: sys_mmap
60func g_fixture(marks: *u8, a: *u8, b: *u8) -> *u8
called by 2: g_drift_fixturemain calls 2: sys_mmapgv_cat
66func g_fixture_note(marks: *u8, a: *u8, b: *u8, note: *u8) -> *u8
called by 1: main calls 2: sys_mmapgv_cat
73func g_drift_fixture(bx: i64) -> *u8
called by 1: main calls 4: sys_mmapgv_catgv_catng_fixture
79func g_q(d: *u8, o: i64) -> i64 { d[o] = G_CH_QUOTE as u8; return o + 1 }
called by 2: g_jkeyg_json
80func g_jkey(d: *u8, o: i64, k: *u8, v: i64) -> i64
called by 1: g_json calls 3: g_qgv_catgv_catn
85func g_json(d: *u8, defects: i64) -> i64
called by 1: main calls 3: gv_catg_qg_jkey
97func g_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: g_judgeg_box_grade
99func g_judge(fix: *u8, fhr: *i64, fhb: *i64, vec: *i64, recout: *i64) -> i64
called by 1: main calls 3: crg_rec_newcrg_judgeg_len
105func g_box_grade(fix: *u8, out: *i64) -> i64
116func main(argc: i64, argv: *i64) -> i64