code wiki / _hdl_build / nx_build_bypass_gate.nx
nx_build_bypass_gate.nx
buildroot/runtime/_hdl_build/nx_build_bypass_gate.nx
about
nx_build_bypass_gate.nx -- R2 of BACKEND-BUILD GOVERNANCE: the NO-BYPASS LAW + audit (PM control-plane),
the build-time twin of the publisher's nx_pub_bypass_gate. It disk-WALKS a directory of organs
(getdents64, the nx_ws_index_lib idiom) and cross-checks each against the build-registry (br_registered
from nx_build_registry_lib): any organ on disk NOT in the registry = a BYPASS (built without registering),
unless it is on the ALLOWLIST (exempt infra, the registrar's own analog of allowlisting the publisher).
HERMETIC GATE w/ NEGATIVE CONTROL (GREEN means the audit actually discriminates, and the allowlist works):
T1 reg=[A,B], C unregistered, no allowlist -> flagged == 1 (only C, the bypass)
T2 then register C too -> flagged == 0 (no bypass remains -> responds to state)
T3 fresh reg=[A,B], C unregistered, allowlist=[C] -> flagged == 0 (C exempt -> allowlist works)
Sovereign: imports nx_build_registry_lib (+ nx_syscalls). license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_build_registry_lib.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 15 | func bp(s: *u8) -> i64 { let n: i64 = br_len(s); sys_write(1, s, n); return 0 } |
| 16 | func bpn(v: i64) -> i64 |
| 26 | func bga_getdents(fd: i64, buf: *u8, count: i64) -> i64 { return __syscall(217, fd, buf, count, 0, 0, 0) } called by 1: bga_audit |
| 27 | func bga_touch(path: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 420); if fd >= 0 { sys_close(fd) } return 0 } |
| 28 | func bga_trunc(path: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 420); if fd >= 0 { sys_close(fd) } return 0 } |
| 31 | func bga_isorgan(name: *u8, prefix: *u8) -> i64 |
| 41 | func bga_in_allow(name: *u8, allow: *i64, allow_n: i64) -> i64 |
| 49 | func bga_audit(dir: *u8, prefix: *u8, registry: *u8, allow: *i64, allow_n: i64, flagged_out: *i64, fcap: i64) -> i64 |
| 84 | func main() -> i64 |