code wiki / _retired / nx_docportal_search_gate.nx

nx_docportal_search_gate.nx

buildroot/runtime/_retired/nx_docportal_search_gate.nx

7398 B120 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind archivedtopic docportal
docsdependenciesstructsconstsfunctions

about

nx_docportal_search_gate.nx -- END-TO-END measured gate: a document UPLOADED through the portal is findable on the site's onsite search, and a PRIVATE upload is NOT -- proven through the REAL production search engine (nx_search_inverted_persist inverted index, the same one nx_onsite_index/nx_onsite_search use), not a stand-in. Self-contained per the sovereign-exec doctrine (in-process; no forked CLI, no /tmp staging): 1. dp_ingest 2 PUBLIC docs + 1 PRIVATE doc into a throwaway domain (dpsearch). 2. build the inverted index from the portal-generated search source (knowledge/index/dpsearch_src.tsv) and round-trip it through save+load (the exact proven onsite_index/onsite_search path). 3. query the live index: T1 the search source has exactly 2 docs -> the private upload never entered it T2 "probate" is found -> public upload #0 is searchable T3 "divorce" is found -> public upload #1 is searchable T4 "retainer" is NOT found -> private upload is invisible to the public search BY CONSTRUCTION Verdict MEASURED from real query results. GREEN iff 4/4. Appends knowledge/status/docportal_search_gate.log. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_docportal_lib.nx nx_search_inverted_persist.nx nx_docportal_search_gate.nx

imports: nx_docportal_lib.nxnx_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 s_puts sys_openat_wr dp_ingest dp_ingest_policy dp_cid fnv1a_init fnv1a_update sys_mmap dp_prefix dp_cat dp_key dp_cat ↻ dp_catn sys_mmap ↻ dp_polkey dp_cat ↻ dp_catn ↻ dp_catn ↻ ss_begin ss_begin_cap sys_mmap ↻ ss_add ss_add2 ss_w32 ss_len ss_commit ss_segid_ok sys_mmap ↻ ss_cat ss_catn sys_mmap ↻ sys_write ss_write_seg ss_segid_ok ↻ sys_mmap ↻ ss_cat ↻ ss_catn ↻ sys_write ↻ ss_segname

structs

none

consts

none

functions

18func s_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
19func s_num(v: i64) -> i64
called by 1: main
27func s_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 }
called by 1: main
28func s_wn(fd: i64, v: i64) -> i64
called by 1: main
36func s_qcount(idx: *NxInvIndex, term: *u8, tl: i64) -> i64
called by 1: main calls 1: nx_inv_query_term
43func main() -> i64