code wiki / (root) / nx_replyreserve_gate.nx

nx_replyreserve_gate.nx

buildroot/runtime/nx_replyreserve_gate.nx

17503 B256 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_replyreserve_gate.nx -- GATE for the reply-reserve calibrator. Composes nx_replyreserve_lib and nx_loadceil_lib IN-PROCESS on PLANTED buffers, so every value is asserted with no real actlog and no forked binary. One real file is written, to a uniquely-named /tmp path this gate alone uses, because the tail-read tooth cannot be proven on a buffer -- it is a claim about lseek and a file. THE LOAD-BEARING TOOTH is not "a number came out". It is the pair that would let the trivial wrong implementation pass: a row on the right lane that carries NO reply_ms must count as MISSING, never as a zero sample. A collector that read an absent key as 0 would flood the distribution with zeros, drive the quantile to 0, and derive the floor -- a confident, wrong, and permanently-stable answer. The fixture carries 25 such rows and the gate asserts both the missing count AND that the minimum is not 0. NEG-CONTROLS: a reply_ms on a DIFFERENT lane must not enter the sample; too few samples must abstain and derive nothing; an empty buffer must be UNREADABLE and not a zero reserve; a reserve that reaches the window or the fraction cap must be REFUSED with the current value kept; a conf with no reserve row must refuse the rewrite rather than append a second row; and the whole-buffer conf reader must be shown to FAIL on the real conf shape, which is why the line-anchored one exists.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_replyreserve_lib.nx nx_replyreserve_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_replyreserve_lib.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 ↻ vrr_fixture vrr_row rr_cat rr_catn rr_catc gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_subjects gv_puts ↻ gv_num ↻ gv_need gv_puts ↻ gv_check gv_puts ↻ rr_derive lc_recommend_kv

structs

none

consts

22const VRR_FIX: *u8 = "/tmp/nx_replyreserve_gate_tail.fixture" as *u8
23const VRR_SMALLCAP: i64 = 4096
26const VRR_SHUFFLE_STRIDE: i64 = 7919

functions

29func vrr_row(b: *u8, o0: i64, lane: *u8, want_reply: i64) -> i64
called by 2: vrr_fixturemain calls 2: rr_catrr_catn
47func vrr_fixture(b: *u8, base: i64, n: i64, decoys: i64, bare: i64, decoyval: i64) -> i64
called by 1: main calls 1: vrr_row
59func vrr_conf(b: *u8, with_reserve_row: i64) -> i64
called by 1: main calls 2: rr_catrr_cline
74func main() -> i64