code wiki / _hdl_build / nx_external_search_gate.nx
nx_external_search_gate.nx
buildroot/runtime/_hdl_build/nx_external_search_gate.nx
about
nx_external_search_gate.nx -- MEASURED gate for EXTERNAL / offsite search (the charter's scope=offsite, now
real). Rebuilds the external index from the sovereign-fetched-web corpus (knowledge/index/web_src.tsv, built
by nx_external_corpus from knowledge/fetched/*.raw) via the reusable ingestor, then forks the REAL
/tmp/nx_onsite_search.sov.elf and checks each query lands the RIGHT external page at rank #1 -- proving the
SAME engine serves offsite as onsite. MEASURED from the live client, never asserted. GREEN iff 4/4. Durable
knowledge/status/external_search_gate.log. license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| 9 | func x_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 10 | func x_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 } |
| 11 | func x_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 |
| 12 | func x_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 } |
| 13 | func x_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 14 | func x_write_file(path: *u8, data: *u8) -> i64 { let fd: i64=sys_openat_wr(path, 0x1a4); if fd<0 { return 0-1 } sys_write(fd, data, x_strlen(data)); sys_close(fd); return 0 } |
| 15 | func x_read_small(path: *u8, buf: *u8, cap: i64) -> i64 |
| 21 | func x_index(a1: *u8, a2: *u8, a3: *u8, a4: *u8) -> i64 |
| 32 | func x_client(sites: *u8, terms: *i64, nt: i64, out_path: *u8) -> i64 |
| 44 | func x_find(hay: *u8, n: i64, needle: *u8) -> i64 |
| 50 | func x_top_is(buf: *u8, n: i64, expected: *u8) -> i64 |
| 61 | func x_row(sites: *u8, label: *u8, terms: *i64, nt: i64, expect: *u8, obuf: *u8) -> i64 |
| 70 | func main() -> i64 |