code wiki / _hdl_build / nx_wpt_run_gate.nx
nx_wpt_run_gate.nx
buildroot/runtime/_hdl_build/nx_wpt_run_gate.nx
about
nx_wpt_run_gate.nx -- VERDICT gate for the WPT external-oracle harness (nx_wpt_run). Proves the harness
is CORRECT and has TEETH, deterministically, WITHOUT faking the pass-rate:
(1) internal MATCH control (spec-equivalent pair) -> diff==0 (detects equivalence)
(2) internal MISMATCH control (blue vs red) -> diff>1000 [LIAR-KILL: comparator can't pass everything]
(3) the REAL oracle is wired: knowledge/wpt/manifest.tsv present (>=1 row)
(4) the REAL vendored WPT files exist + are readable (oracle is real, not empty)
(5) running the 3 REAL reftests scores total==3 (oracle actually ran)
(6) >=1 REAL WPT reftest PASSES (proves real-match-detection on real files; the honest pass-rate is
REPORTED by nx_wpt_run, never floored here). 100% sovereign. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_render_html.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
| none |
functions
| 13 | func g_w(s: *u8) -> i64 { var k: i64=0; while s[k]!=(0 as u8){k=k+1} sys_write(1,s,k); return 0 } |
| 14 | func pn(v0: i64) -> i64 { var v: i64=v0; if v<0 { let m: *u8=sys_mmap(8); m[0]=45 as u8; sys_write(1,m,1); v=0-v } let b: *u8=sys_mmap(24); var k: i64=0; if v==0 {b[0]=48;k=1} while v>0 {b[k]=(48+(v%10)) as u8; v=v/10; k=k+1} let o: *u8=sys_mmap(24); var j: i64=0; while j<k {o[j]=b[k-1-j];j=j+1} sys_write(1,o,k); return 0 } |
| 15 | func u32le(d: *u8, p: i64) -> i64 { return (d[p]&0xff) + ((d[p+1]&0xff)<<8) + ((d[p+2]&0xff)<<16) + ((d[p+3]&0xff)<<24) } called by 1: bmp_diff |
| 17 | func bmp_diff(a: *u8, b: *u8) -> i64 |
| 45 | func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: reftest_html |
| 46 | func reftest_html(test_html: *u8, ref_html: *u8) -> i64 |
| 56 | func reftest_files(test_path: *u8, ref_path: *u8) -> i64 |
| 70 | func file_len(path: *u8) -> i64 { let lp: *i64 = sys_mmap(8) as *i64; let p: *u8 = sys_read_file(path, lp); if p == (0 as *u8) { return 0 } return lp[0] } |
| 71 | func chk(cond: i64, label: *u8, pass: *i64) -> i64 { g_w(" " as *u8); g_w(label); g_w(": " as *u8); if cond==1 { g_w("OK\n" as *u8); pass[0]=pass[0]+1 } else { g_w("FAIL\n" as *u8) } return cond } |
| 73 | func main() -> i64 |