code wiki / _hdl_build / nx_gatebuilt_gate.nx

nx_gatebuilt_gate.nx

buildroot/runtime/_hdl_build/nx_gatebuilt_gate.nx

7588 B195 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_gatebuilt_gate.nx -- THE UNBUILT-GATE CENSUS. For every authored *_gate.nx, does a promoted *_gate.elf actually exist? A gate that lives only in source makes its subject PERMANENTLY UNVERIFIABLE, and nothing in the ecosystem reports it. WHY (found by accident 2026-07-30, id 1785472297): I tried to VERIFY the FD_CLOEXEC port-hostage fix before eating three sev-9 rows that depend on it. `POST /api/gate_run target=nx_cloexec_gate` returned **exit_code=127 verdict=NOT-FOUND bytes=0** -- a fully-written gate (T1 control proving the disease state is reachable, T5 neg-control, T6 non-vacuity) that had NEVER BEEN COMPILED. Building it took one call and it came back 6/6 GREEN. Until then, three sev-9 incidents rested on a fix nobody could prove. A two-glob spot check then said the gap is systemic: ~2877 *_gate.nx sources vs ~187 *_gate.elf binaries. WHY NOTHING ELSE CATCHES IT -- an unbuilt gate is invisible in EVERY direction: nx_gate_rollup reads LOGS -> no binary means no log means the gate is ABSENT from the roster, not RED. nx_wirecensus S3 counts promoted-but-unregistered -- never authored-but-unbuilt. every debt row citing 'gate-proven' reads as evidence regardless. It is the exact INVERSE of PROVEN_UNWIRED (4952 capabilities BUILT+GATED+never called): there the gate exists and the capability is unused; here the capability is used and the gate does not exist. BOTH SCORE AS DONE. LAW: AN UNBUILT GATE IS INDISTINGUISHABLE FROM A PASSING ONE IN EVERY REPORT THAT MENTIONS IT. ENVELOPE, declared in the output and never silent: FLAT scan of the two named dirs (no recursion, so the _attic/_retired/_stage_local shadow trees are deliberately EXCLUDED and this counts LIVE gates only); existence is probed with openat, not a read, so it is cheap and cannot be fooled by an empty file being unreadable; the shown list is capped and the cap is printed. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_gatebuilt_gate.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap gb_puts sys_write gb_scan sys_openat_rd sys_mmap ↻ sys_getdents64 gb_is_gate_src gb_exists sys_openat_rd ↻ sys_close gb_puts ↻ sys_close ↻ gb_puti sys_mmap ↻ sys_write ↻

structs

none

consts

29const GB_DIR1: *u8 = "buildroot/runtime" as *u8
30const GB_DIR2: *u8 = "buildroot/runtime/_hdl_build" as *u8
31const GB_DIRBUF: i64 = 262144
32const GB_NAMEBUF: i64 = 512
33const GB_MAXSHOW: i64 = 25
34const GB_RECLEN_OFF: i64 = 16
35const GB_NAME_OFF: i64 = 19

functions

37func gb_puts(s: *u8)
called by 2: gb_scanmain calls 1: sys_write
43func gb_puti(x: i64)
called by 1: main calls 2: sys_mmapsys_write
70func gb_is_gate_src(nm: *u8, n: i64) -> i64
called by 1: gb_scan
82func gb_exists(path: *u8) -> i64
called by 1: gb_scan calls 2: sys_openat_rdsys_close
90func gb_scan(dir: *u8, ctr: *i64) -> i64
140func main(argc: i64, argv: *i64) -> i64