code wiki / _hdl_build / nx_andelinwest_search_gate.nx

nx_andelinwest_search_gate.nx

buildroot/runtime/_hdl_build/nx_andelinwest_search_gate.nx

7219 B117 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic andelinwest
docsdependenciesstructsconstsfunctions

about

nx_andelinwest_search_gate.nx -- the REAL, MEASURED search gate for andelinwest.com. REPLACES the dishonest nx_andelinwest_search demo (which hardcoded 6 strings and SELF-SCORED "REFEREE=EXCEED" -- exactly the self-grading the operator's doctrine forbids). This gate (1) rebuilds the andelinwest index from the REAL site content (knowledge/index/andelinwest_src.tsv, derived from web_assets/_sites/andelinwest.site) via the reusable ingestor, then (2) forks the REAL /tmp/nx_onsite_search.sov.elf client and checks each EXAMPLE QUERY from the site's own search box ("divorce, will, injury, contract...") lands the RIGHT practice page at rank #1. The verdict is MEASURED from the live client's output, never asserted. GREEN iff 4/4. Durable log appends to knowledge/status/andelinwest_search_gate.log. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_andelinwest_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 a_puts sys_write a_exec5 sys_fork a_strlen sys_openat_wr sys_dup3 sys_mmap sys_execve sys_exit sys_wait4 a_num sys_mmap ↻ sys_write ↻ sys_exit ↻ a_write_file sys_openat_wr ↻ sys_write ↻ a_strlen ↻ sys_close

structs

none

consts

none

functions

11func a_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: a_rowmain calls 1: sys_write
12func a_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 2: a_rowmain calls 2: sys_mmapsys_write
13func a_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
14func a_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 }
15func a_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
17func a_write_file(path: *u8, data: *u8) -> i64
22func a_read_small(path: *u8, buf: *u8, cap: i64) -> i64
31func a_exec5(path: *u8, a1: *u8, a2: *u8, a3: *u8, a4: *u8, out_path: *u8) -> i64
45func a_client(sites: *u8, site: *u8, term: *u8, out_path: *u8) -> i64
58func a_find(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: a_rank_of calls 1: a_strlen
64func a_rank_of(buf: *u8, n: i64, expected: *u8) -> i64
called by 1: a_row calls 1: a_find
76func a_row(label: *u8, term: *u8, expect: *u8, sites: *u8, outp: *u8, obuf: *u8) -> i64
85func main() -> i64