code wiki / _hdl_build / nx_build_bypass_gate.nx

nx_build_bypass_gate.nx

buildroot/runtime/_hdl_build/nx_build_bypass_gate.nx

6509 B134 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic build
docsdependenciesstructsconstsfunctions

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

nx_build_registry_lib.nx nx_syscalls.nx nx_build_bypass_gate.nx

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

main bp br_len sys_write bga_touch sys_openat_wr sys_close bga_trunc sys_openat_wr ↻ sys_close ↻ br_submit br_submit_lin sys_mmap fa_cat fa_appendz fa_append sys_mmap ↻ sys_openat_append sys_flock fa_write_all sys_write ↻ sys_close ↻ fa_len sys_mmap ↻ bga_audit sys_openat_rd sys_mmap ↻ bga_getdents bga_isorgan br_len ↻ br_registered sys_mmap ↻ br_get_state sys_mmap ↻ br_read sys_openat_rd ↻ sys_read sys_close ↻ br_extract br_find

structs

none

consts

none

functions

15func bp(s: *u8) -> i64 { let n: i64 = br_len(s); sys_write(1, s, n); return 0 }
called by 1: main calls 2: br_lensys_write
16func bpn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
26func bga_getdents(fd: i64, buf: *u8, count: i64) -> i64 { return __syscall(217, fd, buf, count, 0, 0, 0) }
called by 1: bga_audit
27func bga_touch(path: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 420); if fd >= 0 { sys_close(fd) } return 0 }
called by 1: main calls 2: sys_openat_wrsys_close
28func bga_trunc(path: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 420); if fd >= 0 { sys_close(fd) } return 0 }
called by 1: main calls 2: sys_openat_wrsys_close
31func bga_isorgan(name: *u8, prefix: *u8) -> i64
called by 1: bga_audit calls 1: br_len
41func bga_in_allow(name: *u8, allow: *i64, allow_n: i64) -> i64
called by 1: bga_audit calls 1: br_streq
49func bga_audit(dir: *u8, prefix: *u8, registry: *u8, allow: *i64, allow_n: i64, flagged_out: *i64, fcap: i64) -> i64
84func main() -> i64