nx_image_e2e_gate.nx
buildroot/runtime/nx_image_e2e_gate.nx
about
nx_image_e2e_gate.nx -- END-TO-END referee for search-by-image on REAL images.
Closes the loop R1a (query logic) + R1b (real-PNG ingest) could only prove separately: it builds a
REAL PNG corpus, runs the REAL ingestor (/tmp/nx_image_index.sov.elf) to fingerprint it into an index,
then runs the REAL query client (/tmp/nx_image_search.sov.elf) with a REAL PNG query and checks the
ranked match. "Real image in -> correct image out", fully sovereign, no production touched.
corpus = {/E/up (grad-up), /E/down (grad-down), /E/mid (stripes)} (real .png files)
query 1 = up RE-EXPOSED (+40 brightness, a real .png) -> must match /E/up at rank 1, Hamming 0,
and matches=1 (down @64 and mid @24 correctly excluded by the threshold) [the headline]
query 2 = grad-down .png -> must match /E/down at rank 1
query 3 = stripes .png -> must match /E/mid at rank 1, Hamming 0
GREEN iff 6/6. Durable verdict -> knowledge/status/image_e2e_gate.log. license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_crc32.nxnx_adler32.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
| 16 | func g_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 17 | func g_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); 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}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 } |
| 18 | func g_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } calls 1: sys_write |
| 19 | func g_wn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); 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}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 } |
| 20 | func g_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 22 | func g_write_bytes(path: *u8, buf: *u8, n: i64) -> i64 { let fd: i64=sys_openat_wr(path, 0x1a4); if fd<0 { return 0-1 } sys_write(fd, buf, n); sys_close(fd); return 0 } |
| 23 | func g_write_file(path: *u8, data: *u8) -> i64 { return g_write_bytes(path, data, g_strlen(data)) } |
| 24 | func g_read_small(path: *u8, buf: *u8, cap: i64) -> i64 |
| 33 | func g_find(hay: *u8, n: i64, needle: *u8) -> i64 |
| 45 | func g_contains(hay: *u8, n: i64, needle: *u8) -> i64 { if g_find(hay,n,needle)>=0 { return 1 } return 0 } calls 1: g_find |
| 46 | func g_rank_of(buf: *u8, n: i64, expected: *u8) -> i64 calls 1: g_find |
| 61 | func gp_wbe(buf: *u8, off: i64, val: i64) -> i64 { buf[off]=((val>>24)&255) as u8; buf[off+1]=((val>>16)&255) as u8; buf[off+2]=((val>>8)&255) as u8; buf[off+3]=(val&255) as u8; return 0 } called by 1: gp_build |
| 62 | func gp_val(kind: i64, x: i64, w: i64, bright: i64) -> i64 { var v: i64=0; if kind==0 { v=x*4 } if kind==1 { v=(w-1-x)*4 } if kind==3 { v=(x&2)*30 } v=v+bright; if v<0 { v=0 } if v>255 { v=255 } return v } called by 1: gp_build |
| 63 | func gp_build(out: *u8, w: i64, h: i64, kind: i64, bright: i64) -> i64 |
| 101 | func g_run_index(corpus: *u8, outidx: *u8, outcap: *u8) -> i64 |
| 115 | func g_run_search(sites: *u8, site: *u8, qpath: *u8, outcap: *u8) -> i64 |
| 129 | func main() -> i64 |