code wiki / _hdl_build / nx_record_gate.nx

nx_record_gate.nx

buildroot/runtime/_hdl_build/nx_record_gate.nx

6597 B154 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic record
docsdependenciesstructsconstsfunctions

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

nx_gate.nx nx_record.nx nx_record_gate.nx

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

main nxr_init nxr_w16 nxr_add_i64 nxr_w16 ↻ nxr_w32 nxr_w64 nxr_r16 nxr_get_i64 sys_mmap nxr_find nxr_valid nxr_r16 ↻ nxr_r32 nxr_r16 ↻ nxr_r32 ↻ nxr_r64 sys_munmap nxr_count nxr_r16 ↻ nxr_add nxr_w16 ↻ nxr_w32 ↻ nxr_r16 ↻ nxr_find ↻ nxr_valid ↻ gw sys_write rg_row gw ↻ gn sys_write ↻ sys_mmap ↻

structs

none

consts

17const RG_TEETH: i64 = 8
18const RG_BUF: i64 = 4096
19const RG_OUTS: i64 = 32
20const RG_FID_A: i64 = 10
21const RG_FID_B: i64 = 20
22const RG_FID_C: i64 = 30
23const RG_FID_UNKNOWN: i64 = 999
24const RG_VAL_A: i64 = 111
25const RG_VAL_B: i64 = 222
26const RG_VAL_C: i64 = 333
27const RG_DEFAULT: i64 = 0 - 7
28const RG_TAB: i64 = 9
29const RG_NL: i64 = 10
30const RG_CH_A: i64 = 97
31const RG_CH_B: i64 = 98
32const RG_CH_C: i64 = 99
33const RG_DIRTY_LEN: i64 = 5

functions

35func rg_row(name: *u8, ok: i64) -> i64
called by 1: main calls 1: gw
41func main() -> i64