code wiki / _hdl_build / nx_record_gate.nx
nx_record_gate.nx
buildroot/runtime/_hdl_build/nx_record_gate.nx
about
nx_record_gate.nx -- referee for NXR1 (nx_record.nx), the typed self-describing record encoding.
EVERY TOOTH HERE IS CHOSEN TO BE A THING A TSV ROW CANNOT DO. That is the point: this gate does not
merely show the codec round-trips, it shows the codec is STRUCTURALLY IMMUNE to the four failure modes
that make positional tab-delimited text unfit for the information plane (debt seq1326).
T3 = a TAB and a NEWLINE inside a value survive (TSV: corrupts the row / splits the record)
T4 = an absent field does NOT shift its neighbours (TSV: every later column reads as the wrong one)
T5 = an UNKNOWN field id is stepped over, not fatal (TSV: a new column breaks every old reader)
T8 = a type mismatch yields the default, not raw bytes (TSV: everything is text, so nothing is checked)
T7 is the NON-VACUITY tooth: it proves field 20 IS findable in the full record, so T4's "absent" is a
real absence and not this gate failing to find anything at all.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_gate.nxnx_record.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
| 17 | const RG_TEETH: i64 = 8 |
| 18 | const RG_BUF: i64 = 4096 |
| 19 | const RG_OUTS: i64 = 32 |
| 20 | const RG_FID_A: i64 = 10 |
| 21 | const RG_FID_B: i64 = 20 |
| 22 | const RG_FID_C: i64 = 30 |
| 23 | const RG_FID_UNKNOWN: i64 = 999 |
| 24 | const RG_VAL_A: i64 = 111 |
| 25 | const RG_VAL_B: i64 = 222 |
| 26 | const RG_VAL_C: i64 = 333 |
| 27 | const RG_DEFAULT: i64 = 0 - 7 |
| 28 | const RG_TAB: i64 = 9 |
| 29 | const RG_NL: i64 = 10 |
| 30 | const RG_CH_A: i64 = 97 |
| 31 | const RG_CH_B: i64 = 98 |
| 32 | const RG_CH_C: i64 = 99 |
| 33 | const RG_DIRTY_LEN: i64 = 5 |
functions
| 35 | func rg_row(name: *u8, ok: i64) -> i64 |
| 41 | func main() -> i64 |