code wiki / (root) / nx_pacetbl_probe.nx

nx_pacetbl_probe.nx

buildroot/runtime/nx_pacetbl_probe.nx

6238 B129 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind probe
docsdependenciesstructsconstsfunctions

about

nx_pacetbl_probe.nx -- READ-ONLY discriminator for the nx_crawl_pace_gate RED (debt filed 2026-09-01). license_tier: ORIGINAL THE ONE QUESTION THIS ANSWERS, AND WHY IT NEEDED AN ORGAN. nx_crawl_pace_gate fails 10/60 teeth, all with got=0, because its fixture read-back goes through pace_slot and pace_slot returns -1 for an absent host on a full table. Four mechanisms were hypothesised and all four were refuted by control, so the remaining split is exactly two families and NO amount of source reading separates them: A. THE WRITE DID NOT LAND -- the host's hash is nowhere in the table. B. THE READ CANNOT FIND IT -- the hash IS in the table, at some slot, and pace_slot still returns -1 or lands on the wrong slot. That is an open-addressing probe-chain defect: pace_slot_or_evict places a record at an ARBITRARY victim slot unrelated to hh % PACE_SLOTS, and linear probing from the home slot stops at the first empty record. The discriminator is a DIRECT LINEAR SCAN of all PACE_SLOTS records for the hash, compared against what pace_slot answers for the same hash. If the scan finds it and pace_slot does not, the answer is B and the defect is in retrieval, not in the write -- which inverts the remedy completely. WRITES NOTHING. It loads the table into an anonymous copy (pace_load_tbl already decouples from the file's mapping) and never calls pace_save_tbl, so running it against the live production table is safe and cannot perturb the very state it is measuring -- the diagnostic-that-joins-the-outage defect. The two hosts are the gate's own fixture literals, so this probe and the gate are asking about the SAME subject. If they are ever edited apart, this probe is measuring a different thing and says so by finding neither.

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_crawl_pace.nx nx_pacetbl_probe.nx

imports: nx_syscalls.nxnx_crawl_pace.nx

imported by: nobody (leaf or entry point)

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

main pp_puts sys_write pace_load_tbl 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 ↻ pace_load_tbl_into sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close sys_exit ↻ pace_ld pp_num sys_mmap ↻ sys_write ↻ pp_report pp_len pace_hash pp_scan_for pace_ld ↻ pace_slot pace_ld ↻

structs

none

consts

31const PP_H1: *u8 = "r13throttled.example.test"
32const PP_H2: *u8 = "r13polite.example.test"

functions

34func pp_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 2: pp_reportmain calls 1: sys_write
35func pp_num(v: i64) -> i64
called by 2: pp_reportmain calls 2: sys_mmapsys_write
48func pp_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: pp_report
51func pp_scan_for(tbl: *u8, hh: i64) -> i64
called by 1: pp_report calls 1: pace_ld
60func pp_report(tbl: *u8, label: *u8, host: *u8) -> i64
95func main() -> i64