code wiki / _hdl_build / nx_seg_imp_build.nx
nx_seg_imp_build.nx
buildroot/runtime/_hdl_build/nx_seg_imp_build.nx
about
nx_seg_imp_build.nx -- build the NXW1 .imp IMPACT sidecar for every live segment of a shard, IN
PLACE (2026-07-25, the WAND rung, seq606). The cheap format-upgrade path: reads each segment's
.idx (terms+post slices) + .pos (the NXQ1 tf source) and writes seg-<id>.imp via temp->rename.
ADDITIVE-ONLY BY CONSTRUCTION (rules 13/26): no existing file is ever mutated, a crash leaves only
a .tmp, and a re-run skips segments already carrying the sidecar (idempotent, rule 10). A segment
without .pos (pre-phrase format) is SKIPPED LOUD -- compaction is that segment's upgrade path.
usage: nx_seg_imp_build <domain> [--force]
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_docportal_search_seg.nxnx_itoa_lib.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
| 11 | const SIB_MAGIC_65536: i64 = 65536 |
| 13 | const SIB_MAXSEGS: i64 = 8192 |
functions
| 15 | func sib_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 |
| 20 | func sib_num(v: i64) -> i64 { nxi_out(v); return 0 } |
| 23 | func sib_one(prefix: *u8, segname: *u8, force: i64) -> i64 |
| 67 | func main(argc: i64, argv: *i64) -> i64 |