code wiki / _hdl_build / nx_store_put_shrink_gate.nx

nx_store_put_shrink_gate.nx

buildroot/runtime/_hdl_build/nx_store_put_shrink_gate.nx

10951 B230 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic store
docsdependenciesstructsconstsfunctions

about

nx_store_put_shrink_gate.nx -- proves the shrink-refusal guard in nx_store_put's put verb BITES. ★WHY (debt 1785713373): the guard shipped 2026-08-02 (sha 494abaa2) with only its PASSING paths witnessed -- bootstrap, grow, replace all proven on a scratch plane. By the non-vacuity law a branch that has only ever passed has demonstrated nothing: killed=0 is UNPROVEN-BY-THIS-SAMPLE, never cannot-fail. This gate manufactures the exact damage class the guard exists for and asserts REFUSAL. ★THE FIXTURE RECIPE IS BORROWED, NOT INVENTED (nx_plane_repair_gate's hard-won lesson): sts_seed and nx_store_put always write a CORRECT q:n, so the damage is unreachable through the normal writers. Build it from the RAW primitives: ss_add N real rows, then a q:n that LIES and declares MORE. That is the exact live shape (declared > reachable) that a PARTIAL sts_load feeds into a whole-plane re-seed -- how commontask- went 37->10 and dedupq- 21->3. Forks the REAL promoted nx_store_put.elf via ar_resolve (never a hardcoded path -- the 127-vacuous lesson), so what is proven is the artifact that actually serves writes. license_tier: ORIGINAL expect_exit: 0

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_store_seed_lib.nx nx_artifact_root.nx nx_gate_verdict.nx nx_store_put_shrink_gate.nx

imports: nx_syscalls.nxnx_store_seed_lib.nxnx_artifact_root.nxnx_gate_verdict.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 w sys_write sg_make_damaged ss_begin_cap sys_mmap ↻ sys_mmap ↻ sts_rowkey ss_catn sys_mmap ↻ ss_add ss_add2 ss_w32 ss_len ss_commit ss_segid_ok sys_mmap ↻ ss_cat ss_catn ↻ sys_write ↻ ss_write_seg ss_segid_ok ↻ sys_mmap ↻ ss_cat ↻ ss_catn ↻ sys_write ↻ ss_segname ss_cat ↻ ss_catn ↻ ss_writefile sys_openat_wr sys_write ↻ sys_close sys_fsync sys_renameat ss_build_keys sys_mmap ↻ ss_r32

structs

none

consts

22const SG_REALROWS: i64 = 3
23const SG_LIE: i64 = 9
24const SG_EXIT_REFUSED: i64 = 4

functions

26func w(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 1: main calls 1: sys_write
27func wn(v: i64) -> i64 { let t: *u8=sys_mmap(28); var m: i64=v; var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} let b: *u8=sys_mmap(28); var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
30func sg_make_damaged(prefix: *u8, rows: i64, lie: i64) -> i64
58func sg_put(prefix: *u8, id: *u8) -> i64
90func sg_verb(prefix: *u8, tail: *i64) -> i64
116func sg_declared(prefix: *u8) -> i64
called by 1: main calls 3: sys_mmapss_getsts_atoi
123func main() -> i64