nx_uxf_tsv_persist_gate.nx
buildroot/runtime/nx_uxf_tsv_persist_gate.nx
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
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
structs
| none |
consts
| 23 | const UP_CANON: i64 = 4096 |
| 24 | const UP_IDXBUF: i64 = 1048576 |
| 25 | const UP_ROWS: i64 = 256 |
| 26 | const UP_CIDSLOT: i64 = 128 |
| 27 | const UP_CIDLEN: i64 = 72 |
| 28 | const UP_PTRTAB: i64 = 512 |
| 29 | const UP_KEYBUF: i64 = 24 |
| 30 | const UP_WANT_ROWS: i64 = 18 // sci_units.tsv carries 18 data rows; asserted so T2 and T3 cannot pass on one |
| 31 | const UP_TAB: i64 = 0x09 |
| 32 | const UP_LF: i64 = 0x0A |
| 33 | const UP_HASH: i64 = 0x23 |
functions
| 35 | func up_keyname(idx: i64, dst: *u8) -> i64 |
| 48 | func 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 |
| 51 | func up_get(idx: *u8, key: *u8, kl: i64, out: *i64) -> i64 |
| 69 | func main(argc: i64, argv: *i64) -> i64 |