code wiki / _hdl_build / nx_library_search_test.nx

nx_library_search_test.nx

buildroot/runtime/_hdl_build/nx_library_search_test.nx

6388 B92 linesdepth 6pulls 13 transitivereach 0 importersview sourcekind gate/prooftopic library
docsdependenciesstructsconstsfunctions

about

nx_library_search_test.nx -- the Researcher handles a LIBRARY OF INFORMATION, not one source, and searches it with S-class ranked retrieval. End to end, sovereign: 1. FETCH the index, RECOGNIZE it is a library (>=3 [doc] entries) 2. HARVEST every listed doc -- follow each entry, fetch it, MIRROR it into the Nishi Library 3. build the corpus FROM THE LOCAL MIRRORS (bot-block-proof) 4. answer 3 different SEARCH PROMPTS by TF-IDF RANKING the whole corpus -- each returns the single best-matching doc, where naive substring search would be ambiguous (e.g. "abandon" is in 2 docs) Exit 0 on 8/8. license_tier: ORIGINAL NOTE 2026-06-20: this is a LIVE-INTEGRATION test -- it requires a fixture HTTP server on 127.0.0.1:8099 serving a library index + the 3 docs. With no server up it reads 0/8 ("ambiguous across 0 docs") because the harvest fetches nothing -- that is an unmet fixture dependency, NOT a search-logic regression. The REPRODUCIBLE-BY-OUR-SYSTEM proof of the ranked-retrieval claim (no socket, real on-disk corpus, both TF-IDF + production BM25) is nx_library_search_gate (8/8 GREEN). Run THIS one only with the :8099 fixture live.

dependencies 4 imports · 0 importers

nx_browse_text.nx nx_library_search.nx nx_library_cache.nx nx_syscalls.nx nx_library_search_test.nx

imports: nx_browse_text.nxnx_library_search.nxnx_library_cache.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main st_puts sys_write sys_mmap br_addr_ipv4 nx_browse_text br_fetch_raw sys_socket nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll sys_close sys_mmap ↻ br_build_get sys_write ↻ br_drain sys_read br_render_response nx_http_resp_alloc sys_mmap ↻ nx_http_response_parse sys_mmap ↻ nx_http_resp_parse_status_ sys_mmap ↻ nx_http_resp_parse_dec nx_http_resp_is_digit nx_http_resp_skip_ows nx_http_resp_find_crlf nx_http_resp_classify_body sys_mmap ↻ nx_http_resp_parse_header_ nx_http_resp_find_byte nx_http_resp_skip_ows ↻ nx_http_resp_find_crlf ↻ nx_http_resp_cieq nx_http_resp_lower nx_http_resp_parse_dec ↻ nx_html_to_text

structs

none

consts

none

functions

21func st_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 calls 1: sys_write
22func st_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); 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 calls 2: sys_mmapsys_write
25func st_harv_path(out: *u8, k: i64) -> i64
called by 1: main
35func main() -> i64