code wiki / _hdl_build / nx_build_role_gate.nx
nx_build_role_gate.nx
buildroot/runtime/_hdl_build/nx_build_role_gate.nx
about
nx_build_role_gate.nx -- R3 of BACKEND-BUILD GOVERNANCE: the ROLE-SPLIT ENFORCEMENT gate. Encodes the
operator's PM+Librarian split as a DATA-DRIVEN authorization policy (mirrors nx_access_lib's ag_allow):
every governance responsibility CLASS has a required owning ROLE, and role_ok(class, owner) ALLOWS only
the correct pairing -- so a responsibility claimed by the WRONG role is DENIED. This is what keeps the
R0-census owner column honest going forward.
LIB (catalog/SSOT) owns: CATALOG, LIVE_VIEW, DEDUP
PM (control-plane) owns: SUBMIT, STATE, OWNERSHIP, AUDIT, NOBYPASS, POLICY
P+L (shared) owns: ROLE_ASSIGN (PM or LIB both acceptable)
GATE w/ NEGATIVE CONTROLS: correct pairings ALLOW; cross-role claims DENY. GREEN iff every case matches
its expected verdict (so the deny cases are load-bearing, not decorative).
Sovereign: imports only nx_syscalls. license_tier: ORIGINAL expect_exit: 0
dependencies 1 imports · 0 importers
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
structs
| none |
consts
| none |
functions
| 14 | func rg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: rg_p |
| 15 | func rg_p(s: *u8) -> i64 { let n: i64 = rg_len(s); sys_write(1, s, n); return 0 } |
| 16 | func rg_pn(v: i64) -> i64 |
| 25 | func rg_streq(a: *u8, b: *u8) -> i64 |
| 33 | func required_role(cls: *u8) -> *u8 |
| 47 | func role_ok(cls: *u8, owner: *u8) -> i64 |
| 61 | func check(cls: *u8, owner: *u8, expect: i64, st: *i64) -> i64 |
| 69 | func main() -> i64 |