code wiki / _hdl_build / nx_research_gate.nx

nx_research_gate.nx

buildroot/runtime/_hdl_build/nx_research_gate.nx

5085 B98 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic research
docsdependenciesstructsconstsfunctions

about

nx_research_gate.nx -- THE RESEARCHER REGRESSION GATE (testing capability, not a feature). Re-verifies the invariants of the whole self-growing researcher system across EVERY index in the search-sources manifest, so a regression in any organ (grow/register/federated/...) is caught mechanically. Checks, per source: (A) the index LOADS; (B) ALIGNMENT idx.n_rows == docmap line count (the rowid->doc contract grow guarantees); (C) a smoke query returns postings (the engine answers). Plus global: (D) at least one source; (E) a dark/common term ("the") is found somewhere. Prints GREEN/RED per source + a verdict; exit 0 iff all GREEN. Read-only, no floats. expect_exit: 0 license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_search_inverted_persist.nx nx_research_gate.nx

imports: nx_search_inverted_persist.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gt_puts sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close gt_scan gt_line_end nx_inv_load sys_read_file ↻ gt_count_lines sys_read_file ↻ nx_inv_query_term nx_inv_hash_bytes_lower nx_inv_lookup_slot nx_inv_slot_at nx_inv_slot_hash nx_inv_slot_postings_count nx_inv_slot_postings_offse nx_inv_slot_write_cursor gt_num

structs

none

consts

10const GT_ROWIDS: i64 = 4096
11const GT_SRC: i64 = 8192

functions

13func gt_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
14func gt_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;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
15func gt_scan(buf: *u8, i: i64, end: i64) -> i64
called by 1: main
20func gt_line_end(buf: *u8, i: i64, end: i64) -> i64
called by 1: main
25func gt_count_lines(path: *u8) -> i64
called by 1: main calls 1: sys_read_file
38func main() -> i64