code wiki / _hdl_build / nx_page_verify_gate.nx
nx_page_verify_gate.nx
buildroot/runtime/_hdl_build/nx_page_verify_gate.nx
about
nx_page_verify_gate.nx -- proves the browser-grade page verifier END-TO-END on the REAL edge: the fixed
/render3d page must be GREEN (exit 0), and the PERMANENT negctl fixture (sites/nishifamily/render3d/negctl.html:
a .png that answers HTML + a relative ref) must be RED with EXACTLY 2 broken -- the two classes that caused the
2026-07-16 "the pngs are broken" incident. If the negctl leg ever passes, the verifier lost its teeth.
D001-MIGRATED 2026-08-18 onto nx_gate_verdict (per-tooth gv_check, exit carries the verdict, census-
readable). SUBJECT = the DEPLOYED verifier at its absolute nishihost path (the binary the estate actually
runs; the old /tmp subject was volatile and could silently test a stale or absent build).
license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_tool_run.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
| 20 | const PVG_EXIT_GREEN: i64 = 0 |
| 21 | const PVG_EXIT_RED: i64 = 1 |
| 22 | const PVG_EXIT_UNOBSERVABLE: i64 = 3 |
| 23 | const PVG_EXIT_EXEC_MISSING: i64 = 127 |
| 29 | const PVG_CLOSED_PORT_OVERRIDE: *u8 = "127.0.0.1:9" |
| 30 | const PVG_CAPTURE_CAP: i64 = 262144 |
| 31 | const PVG_ARGV_SLOTS: i64 = 8 |
| 32 | const PVG_WORD_BYTES: i64 = 8 |
| 45 | const PVG_BIGHEAD_BYTES: i64 = 10758232 // sites/nishifamily/world/ref9d.nxa, nx_fs size exact=1, 2026-09-05 |
| 46 | const PVG_BIGHEAD_MAGIC_PATH: *u8 = "sites/nishifamily/render3d/negctl_bighead_magic.nxa" |
| 47 | const PVG_BIGHEAD_NOMAGIC_PATH: *u8 = "sites/nishifamily/render3d/negctl_bighead_nomagic.nxa" |
| 48 | const PVG_BIGHEAD_MAGIC_PAGE: *u8 = "sites/nishifamily/render3d/negctl_bighead.html" |
| 49 | const PVG_BIGHEAD_NOMAGIC_PAGE: *u8 = "sites/nishifamily/render3d/negctl_bighead_nomagic.html" |
| 50 | const PVG_SEEK_SET: i64 = 0 |
| 51 | const PVG_SEEK_END: i64 = 2 |
| 52 | const PVG_NXA_MAGIC_LEN: i64 = 8 // NXANIM01, owned by nx_nxa.nx |
| 59 | const PVG_PATH_SEP: i64 = 47 // '/' |
| 60 | const PVG_ABSPATH_CAP: i64 = 4096 // one absolute fixture path |
| 152 | const PVG_CWD_CAP: i64 = 4096 |
| 153 | const PVG_NO_TIMEOUT: i64 = 0 // tr_run_capture_cwd: <=0 delegates to the unbounded capture (explicit opt-out contract) |
| 154 | const PVG_SLASH: i64 = 47 |
functions
| 61 | func pvg_abs(rel: *u8) -> *u8 |
| 75 | func pvg_file_size(rel: *u8) -> i64 |
| 85 | func pvg_write_bighead(rel: *u8, head: *u8) -> i64 |
| 99 | func pvg_write_page(rel: *u8, body: *u8) -> i64 |
| 110 | func hw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 118 | func pvg_has(b: *u8, n: i64, lit: *u8) -> i64 called by 1: main |
| 134 | func pvg_last_line_starts(b: *u8, n: i64, lit: *u8) -> i64 |
| 155 | func pvg_dirname(path: *u8, out: *u8) -> i64 |
| 167 | func run2cap(elf: *u8, a1: *u8, a2: *u8, out: *u8, olen: *i64) -> i64 |
| 175 | func pn(v: i64) -> i64 { let t: *u8=sys_mmap(24); var m: i64=v; if m<0{sys_write(1,"-" as *u8,1);m=0-m} var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} let b: *u8=sys_mmap(24); var j: i64=0; while j<k{b[j]=t[k-1-j];j=j+1} sys_write(1,b,k); return 0 } |
| 181 | func run1(elf: *u8, a1: *u8) -> i64 |
| 186 | func run2(elf: *u8, a1: *u8, a2: *u8) -> i64 |
| 192 | func main() -> i64 |