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
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
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
structs
| none |
consts
| 60 | const S9G_DOC_CONTENT: i64 = 850 // the long biography carrying the whole name once |
| 61 | const S9G_DOC_RESULTS: i64 = 851 // another engine's results page repeating the name |
| 62 | const S9G_DOC_RARE: i64 = 852 // the page carrying only the rare word |
| 63 | const S9G_DOC_SCATTER: i64 = 853 // both words present but far apart (co-occurrence is not a name) |
| 64 | const S9G_RANK_FOURTH: i64 = 3 // zero-based slot of the fourth result |
| 65 | const S9G_ENT_SLOTS: i64 = 4 // S11: entity announce box |
| 66 | const S9G_DOC_ABSENT: i64 = 999 // S11: a pinned cid that is not in the shard |
| 67 | const S9G_FILE_MODE: i64 = 420 // 0644 for the fixture table |
| 68 | const S9G_FE_101: i64 = 1789600000 // S12: planted fetch epochs (doc 103 deliberately carries none) |
| 69 | const S9G_FE_102: i64 = 1789650000 |
| 70 | const S9G_FE_NOW: i64 = 1789660000 // S12: the clock the arithmetic teeth read |
| 71 | const S9G_FE_YOUNG: i64 = 5 // S12: a third observed age for the odd-count median |
| 72 | const S9G_CH_Z: i64 = 122 // S11-b: the fixture jp name is zq |
| 73 | const S9G_CH_Q: i64 = 113 |
| 74 | const S9G_PAGE: i64 = 10 // one result page |
| 75 | const S9G_MATCHING: i64 = 14 // 850, 851, 852, 853 and the ten fillers all match the name query |
| 76 | const S9G_TOP3: i64 = 3 // the three planted pages the order teeth read |
| 77 | const S9G_TOTAL_SLOTS: i64 = 2 // dss_search_off_div's totalout pair |
| 78 | const S9G_RANK_THIRD: i64 = 2 // zero-based slot of the third result |
| 79 | const S9G_BUF_4K: i64 = 4096 // one page: the long-doc and S7 fixture builders |
functions
| 10 | func 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 |
| 11 | func dsg_catn(b: *u8, off: i64, v: i64) -> i64 called by 1: s7_build |
| 24 | func 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 } |
| 25 | func g_num(v: i64) -> i64 |
| 34 | func g_strlen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 39 | func s7_build(buf: *u8, head: *u8, tag: *u8, npre: i64, mid: *u8, npost: i64) -> i64 |
| 49 | func g_check(name: *u8, got_n: i64, cids: *i64, expect_n: i64, want_top: i64, ctr: *i64) -> i64 |
| 81 | func s9g_write_file(path: *u8, s: *u8) -> i64 |
| 91 | func main(argc: i64, argv: *i64) -> i64 |