code wiki / (root) / nx_npc_atlas_gate.nx

nx_npc_atlas_gate.nx

buildroot/runtime/nx_npc_atlas_gate.nx

9508 B182 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_npc_atlas_gate.nx -- THE CLAY-FIX GATE (cw_npc_atlas, charsim+graphics watch contract). Subject: the SHIPPED world surface. Proves, on the LIVE docroot artifacts (never fixtures standing in for them): (1) the NPC asset carries TEXC (UVs) and TEXM (baked PBR maps) -- the DATA is real; (2) the TEXM albedo is a real, non-constant PNG -- a solid-color stub cannot pass; (3) the TEXC UVs are non-degenerate -- a constant-UV bake cannot pass; (4) every builtin world page carries the sampling path (aUV attribute, uAtl sampler, npc_atlas runtime marker) -- the WIRING is real; (5) bite: a page with the marker stripped is DETECTED (the detector fires on bad); (6) bite: the banked PRE-TEXM asset is DETECTED (a genuine pre-fix artifact, not a synthetic). DECLARED IMPRECISION (do not trust this gate as more than it is): pixel-level proof that the GPU actually sampled the texture is browser territory -- this gate proves data-real + wiring-real + refusal-real. The ship lane's cw_npc_atlas stage enforces the same contract IN THE PATH, so a clay ship cannot reach the docroot even between gate runs. Recipe-world pages are enforced by that ship stage; this gate re-checks the three BUILTIN pages independently (scope printed, not implied).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_npc_atlas_gate.nx

imports: nx_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_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 ↻ gv_head gv_puts sys_write ↻ sys_mkdir sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close gv_check gv_puts ↻ gv_verdict gv_note_bare_rate gv_bare_rate gv_at gv_obj_has_n gv_at ↻ gv_puts ↻ gv_num sys_mmap ↻

structs

none

consts

21const NAG_ASSET: *u8 = "sites/nishifamily/world/ref9d.nxa"
22const NAG_BANKED_PRETEXM: *u8 = "knowledge/bank/ref9d.nxa.pretexm-20260823"
23const NAG_PAGE1: *u8 = "sites/nishifamily/world/craft.html"
24const NAG_PAGE2: *u8 = "sites/nishifamily/world/beach.html"
25const NAG_PAGE3: *u8 = "sites/nishifamily/world/vale.html"
26const NAG_NPAGES: i64 = 3
28const NAG_PNG0: i64 = 137
29const NAG_PNG1: i64 = 80
30const NAG_PNG2: i64 = 78
31const NAG_PNG3: i64 = 71
33const NAG_HDRW: i64 = 6
34const NAG_RECW: i64 = 3
35const NAG_NMAPS: i64 = 4
36const NAG_RES_MIN: i64 = 8

functions

38func nag_rd64(b: *u8, off: i64) -> i64 { var v: i64 = 0; var k: i64 = 7; while k >= 0 { v = v*256 + (b[off+k] as i64); k = k - 1 } return v }
called by 2: nag_secmain
39func nag_tag4(b: *u8, off: i64, t: *u8) -> i64 { if b[off] == t[0] { if b[off+1] == t[1] { if b[off+2] == t[2] { if b[off+3] == t[3] { return 1 } } } } return 0 }
called by 1: nag_sec
40func nag_find(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: nag_page_ok
54func nag_sec(b: *u8, tag: *u8) -> i64
called by 1: main calls 2: nag_rd64nag_tag4
64func nag_page_ok(path: *u8) -> i64
called by 1: main calls 3: sys_mmapsys_read_filenag_find
74func main() -> i64