code wiki / _hdl_build / nx_docportal_search_seg_gate.nx

nx_docportal_search_seg_gate.nx

buildroot/runtime/_hdl_build/nx_docportal_search_seg_gate.nx

64432 B937 linesdepth 5pulls 10 transitivereach 0 importersview sourcekind gate/prooftopic docportal
docsdependenciesstructsconstsfunctions

about

nx_docportal_search_seg_gate.nx -- GATE for the SOVEREIGN seg_store-native onsite search (nx_docportal_search_seg). Writes 3 PUBLIC docs into a test shard through the RAW sovereign store (doc:<cid> keys, text values so ss_write_seg builds .terms), then drives dss_search end-to-end over the REAL seg_store -- proving the sovereign path (ss_open -> ss_term postings -> ss_hget -> rank) with NO tsv anywhere. Negative controls: absent term -> 0, absent shard -> 0 (isolation, not a crash). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_docportal_search_seg.nx nx_gate_verdict.nx nx_docportal_search_seg_gate.n

imports: nx_docportal_search_seg.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main g_puts ss_begin ss_begin_cap sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ ss_add ss_add2 ss_w32 ss_len g_strlen s7_build dsg_cat dsg_catn ss_commit ss_segid_ok ss_commit_body ss_segid_ok ↻ sys_mmap ↻ ss_cat ss_catn sys_mmap ↻ sys_write ↻ ss_write_seg ss_sr_new sys_mmap ↻ ss_segid_ok ↻

structs

none

consts

60const S9G_DOC_CONTENT: i64 = 850 // the long biography carrying the whole name once
61const S9G_DOC_RESULTS: i64 = 851 // another engine's results page repeating the name
62const S9G_DOC_RARE: i64 = 852 // the page carrying only the rare word
63const S9G_DOC_SCATTER: i64 = 853 // both words present but far apart (co-occurrence is not a name)
64const S9G_RANK_FOURTH: i64 = 3 // zero-based slot of the fourth result
65const S9G_ENT_SLOTS: i64 = 4 // S11: entity announce box
66const S9G_DOC_ABSENT: i64 = 999 // S11: a pinned cid that is not in the shard
67const S9G_FILE_MODE: i64 = 420 // 0644 for the fixture table
68const S9G_FE_101: i64 = 1789600000 // S12: planted fetch epochs (doc 103 deliberately carries none)
69const S9G_FE_102: i64 = 1789650000
70const S9G_FE_NOW: i64 = 1789660000 // S12: the clock the arithmetic teeth read
71const S9G_FE_YOUNG: i64 = 5 // S12: a third observed age for the odd-count median
72const S9G_CH_Z: i64 = 122 // S11-b: the fixture jp name is zq
73const S9G_CH_Q: i64 = 113
74const S9G_PAGE: i64 = 10 // one result page
75const S9G_MATCHING: i64 = 14 // 850, 851, 852, 853 and the ten fillers all match the name query
76const S9G_TOP3: i64 = 3 // the three planted pages the order teeth read
77const S9G_TOTAL_SLOTS: i64 = 2 // dss_search_off_div's totalout pair
78const S9G_RANK_THIRD: i64 = 2 // zero-based slot of the third result
79const S9G_BUF_4K: i64 = 4096 // one page: the long-doc and S7 fixture builders

functions

10func dsg_cat(b: *u8, off: i64, s: *u8) -> i64 { var o: i64 = off; var i: i64 = 0; while s[i] != (0 as u8) { b[o] = s[i]; o = o + 1; i = i + 1 } return o }
called by 1: s7_build
11func dsg_catn(b: *u8, off: i64, v: i64) -> i64
called by 1: s7_build
24func g_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: g_checkmain
25func g_num(v: i64) -> i64
called by 2: g_checkmain
34func g_strlen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: s9g_write_filemain
39func s7_build(buf: *u8, head: *u8, tag: *u8, npre: i64, mid: *u8, npost: i64) -> i64
called by 1: main calls 2: dsg_catdsg_catn
49func g_check(name: *u8, got_n: i64, cids: *i64, expect_n: i64, want_top: i64, ctr: *i64) -> i64
called by 1: main calls 3: g_putsg_numgv_check
81func s9g_write_file(path: *u8, s: *u8) -> i64
called by 1: main calls 1: g_strlen
91func main(argc: i64, argv: *i64) -> i64