code wiki / _hdl_build / nx_external_search_gate.nx

nx_external_search_gate.nx

buildroot/runtime/_hdl_build/nx_external_search_gate.nx

7091 B96 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic external
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_external_search_gate.nx

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

main x_puts sys_write x_index sys_fork sys_openat_wr sys_dup3 sys_mmap sys_execve sys_exit sys_wait4

structs

none

consts

none

functions

9func 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 }
called by 2: x_rowmain calls 1: sys_write
10func 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 }
11func 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
12func 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 }
13func x_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 2: x_write_filex_find
14func 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 }
15func x_read_small(path: *u8, buf: *u8, cap: i64) -> i64
21func x_index(a1: *u8, a2: *u8, a3: *u8, a4: *u8) -> i64
32func x_client(sites: *u8, terms: *i64, nt: i64, out_path: *u8) -> i64
44func x_find(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: x_top_is calls 1: x_strlen
50func x_top_is(buf: *u8, n: i64, expected: *u8) -> i64
called by 1: x_row calls 1: x_find
61func x_row(sites: *u8, label: *u8, terms: *i64, nt: i64, expect: *u8, obuf: *u8) -> i64
70func main() -> i64
calls 2: x_putsx_index