code wiki / (root) / nx_revimg_crawl_gate.nx

nx_revimg_crawl_gate.nx

buildroot/runtime/nx_revimg_crawl_gate.nx

14507 B277 linesdepth 12pulls 53 transitivereach 0 importersview sourcekind gate/prooftopic revimg
docsdependenciesstructsconstsfunctions

about

nx_revimg_crawl_gate.nx -- END-TO-END referee for the discovery DRIVER (nx_revimg_crawl) on a REAL multi-site, MULTI-FORMAT local image corpus. Proves the whole reverse-image discovery loop runs on actual decoded pixels (PNG + JPEG), not synthetic fingerprints: fixtures: seed0 = red vertical-stripes (PNG), seed1 = flat-128 (PNG) = the entity's media. site0 (official): copy of seed0 (PNG), copy of seed1 (PNG), red-checker (other media). site1 (fan): flat-128 JPEG = a CROSS-FORMAT copy of seed1 ; green-checker (other media). site2 (unrelated): red-checker-p5 -- none of the entity's media. row1 REAL MULTI-FORMAT INGEST -- the driver decodes all 6 files (incl the JPEG) into the corpus, and the JPEG entry fingerprints to the flat image (proves JPEG flows through the real pipeline). row2 CROSS-FORMAT CROSS-SITE MATCH -- seed1 is found on site0 (PNG) AND site1 (JPEG): the same media served in different formats on different sites MATCHES (a sha256 byte-hash could never). row3 HOST RANKING -- official site0 (2 seeds) outranks fan site1 (1); unrelated site2 is not a host. row4 HARVEST -- each host site's other media surfaces as new results. row5 PRECISION -- the unrelated site is never a host. GREEN iff 5/5. Durable verdict -> knowledge/status/revimg_crawl_gate.log. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_revimg_crawl.nx nx_crc32.nx nx_adler32.nx nx_revimg_crawl_gate.nx

imports: nx_revimg_crawl.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

main g_puts g_synth_rgb_sc g_clamp255 g_make_png gp_build_buf gp_wbe nx_crc32 nx_crc32_update nx_crc32_init nx_crc32_table_at adler32 g_write_bytes sys_openat_wr g_fill_rgb nx_revimg_seed_file nx_img_to_gray sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close nx_jpeg_decode_luma sys_mmap ↻ nx_jpeg_dec_ctx_init sys_mmap ↻ _jpeg_ascii_probe_sof sys_mmap ↻ nx_jpeg_seg_init nx_jpeg_seg_next nx_jpeg_classify_marker nx_jpeg_marker_is_lengthle nx_jpeg_sof_parse nx_jpeg_is_progressive prog_be16 nx_jpeg_prog_decode sys_mmap ↻ prog_be16 ↻ nx_jpeg_dqt_parse

structs

none

consts

none

functions

20func 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 }
called by 1: main
21func 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 }
called by 1: main
22func 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 }
called by 1: main
23func 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 }
called by 1: main
24func g_clamp255(v: i64) -> i64 { if v<0 { return 0 } if v>255 { return 255 } return v }
25func 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 }
called by 2: g_make_pngmain calls 1: sys_openat_wr
26func g_has_site(arr: *i64, n: i64, sid: i64) -> i64 { var i: i64=0; while i<n { if arr[i]==sid { return 1 } i=i+1 } return 0 }
called by 1: main
27func g_hits_of(sites: *i64, hits: *i64, n: i64, sid: i64) -> i64 { var i: i64=0; while i<n { if sites[i]==sid { return hits[i] } i=i+1 } return 0-1 }
called by 1: main
30func g_synth_rgb_sc(rgb: *u8, w: i64, h: i64, structIdx: i64, colorIdx: i64, p: i64, phase: i64) -> i64
called by 1: main calls 1: g_clamp255
56func g_fill_rgb(rgb: *u8, w: i64, h: i64, v: i64) -> i64
called by 1: main
65func g_synth_grad(rgb: *u8, w: i64, h: i64) -> i64
called by 1: main calls 1: g_clamp255
80func 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_buf
81func gp_build_buf(out: *u8, rgb: *u8, w: i64, h: i64) -> i64
called by 1: g_make_png calls 3: gp_wbenx_crc32adler32
122func g_make_png(path: *u8, rgb: *u8, png: *u8, w: i64, h: i64) -> i64
called by 1: main calls 2: gp_build_bufg_write_bytes
129func _build_gray_jpeg(jpeg: *u8) -> i64
called by 1: main
174func main() -> i64