code wiki / (root) / nx_zeroprint_gate.nx

nx_zeroprint_gate.nx

buildroot/runtime/nx_zeroprint_gate.nx

7435 B123 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_zeroprint_gate.nx -- teeth for nx_zeroprint (the zero-prints-as-NUL detector/repairer). The subject's whole job is to tell four look-alike shapes apart, so the fixture carries ALL FOUR and the gate asserts each bucket by name. Three of them MUST come back SAFE; a detector that flagged them would be a false-positive generator, and the estate's own first census of this defect (written in Python) did exactly that -- it could not see the else-form and over-counted by six. EVERY FIXTURE IS ASSEMBLED AT RUNTIME under /tmp/nx_zeroprint_gate/, never shared with a beat and never committed as a file: a detector that scans source WILL find its own test fixture, and a fixture written into the tree would make this gate flag itself forever. T1 is the anti-vacuity tooth: if the planted defect is NOT detected, nothing below proves anything. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_tool_run.nx nx_gate_verdict.nx nx_zeroprint_gate.nx

imports: nx_syscalls.nxnx_tool_run.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

structs

none

consts

19const ZG_DIR: *u8 = "/tmp/nx_zeroprint_gate" as *u8
20const ZG_ELF: *u8 = "./nx_zeroprint.elf" as *u8
21const ZG_CAP: i64 = 65536

functions

23func zg_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
24func zg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
25func zg_has(h: *u8, n: i64, needle: *u8) -> i64
38func zg_put(path: *u8, body: *u8) -> i64
45func zg_run(verb: *u8, out: *u8, olen: *i64) -> i64
54func main() -> i64