code wiki / (root) / nx_uxf_tsv_persist_gate.nx

nx_uxf_tsv_persist_gate.nx

buildroot/runtime/nx_uxf_tsv_persist_gate.nx

10393 B207 linesdepth 7pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic uxf
docsdependenciesstructsconstsfunctions

about

nx_uxf_tsv_persist_gate.nx -- the D001 MIGRATION of nx_uxf_tsv_persist onto nx_gate_verdict (2026-09-06). THE FULL DATA PIPELINE ON REAL DATA: a real registry TSV becomes per-row canonical content-addressed records, is PERSISTED into the immutable segment store with an fsync, REOPENED FRESH FROM DISK, and every row is retrieved by its content-address through a binary search of the NXK1 index and compared BYTE FOR BYTE against the original. This is what makes the replace-the-TSVs claim a measurement rather than a plan. ALL FOUR ORIGINAL TEETH PRESERVED IN ORDER AND PREDICATE, plus one strengthening: the original asserted only that SOME rows were persisted, so a parser that produced a single row would have passed T1. The row count is now asserted against the known population of the fixture file, which is what makes T2 and T3 non-vacuous -- hits equal to nrows is trivially true when nrows is one. FIXTURE SCOPED, WHICH THE ORIGINAL DID NOT DO: it wrote /tmp/uxf_sci.docs and /tmp/uxf_sci.keys, names a production beat or a sibling gate could collide with, and the estate has measured that class -- a gate sharing its fixture reports on the FIXTURE rather than on the code. These paths carry this gate's own name. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 5 imports · 0 importers

nx_gate_verdict.nx nx_syscalls.nx nx_canon_cid.nx nx_uxf_cid.nx nx_seg_store.nx nx_uxf_tsv_persist_gate.nx

imports: nx_gate_verdict.nxnx_syscalls.nxnx_canon_cid.nxnx_uxf_cid.nxnx_seg_store.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr 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 ↻ gv_head gv_puts sys_write ↻ sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close gv_puts ↻ gv_verdict gv_note_bare_rate gv_bare_rate gv_at gv_obj_has_n gv_at ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap ↻

structs

none

consts

23const UP_CANON: i64 = 4096
24const UP_IDXBUF: i64 = 1048576
25const UP_ROWS: i64 = 256
26const UP_CIDSLOT: i64 = 128
27const UP_CIDLEN: i64 = 72
28const UP_PTRTAB: i64 = 512
29const UP_KEYBUF: i64 = 24
30const UP_WANT_ROWS: i64 = 18 // sci_units.tsv carries 18 data rows; asserted so T2 and T3 cannot pass on one
31const UP_TAB: i64 = 0x09
32const UP_LF: i64 = 0x0A
33const UP_HASH: i64 = 0x23

functions

35func up_keyname(idx: i64, dst: *u8) -> i64
called by 1: main calls 1: sys_mmap
48func up_bytes_eq(a: *u8, b: *u8, n: i64) -> i64 { var i: i64 = 0; while i < n { if a[i] != b[i] { return 0 } i = i + 1 } return 1 }
called by 1: main
51func up_get(idx: *u8, key: *u8, kl: i64, out: *i64) -> i64
called by 1: main calls 2: ss_r32ss_kcmp
69func main(argc: i64, argv: *i64) -> i64