code wiki / _hdl_build / nx_account_admin_exceed_gate.nx
nx_account_admin_exceed_gate.nx
buildroot/runtime/_hdl_build/nx_account_admin_exceed_gate.nx
about
nx_account_admin_exceed_gate.nx -- the MEASURED S-CLASS EXCEED referee for the HR-driven account-administration
capability (nx_hr_admin + nx_hr_entitle + nx_lan_signup). It scores our capability against a FAITHFUL naive
baseline -- not a strawman: each baseline is literally what the system did/does without this work --
* naive entitlements = he_include with super=0 (the EXACT pre-superuser olgd_emit_access logic);
* naive signup = a global "registration_open" flag (return 1 when open -- the old single-flag world);
* naive roster = a mutable list where suspend DELETES the row (only the current row survives -> history=1);
* naive realms = one shared user list (a handle known anywhere is "known" everywhere).
Every number below is COMPUTED by the organ from real operations (never self-asserted). A LIAR-KILL negative
control proves the classifier only says EXCEEDS on a real measured gap: an axis where naive == ours MUST score
PARITY, not EXCEEDS. GREEN iff all 4 real axes EXCEEDS and the neg-control is PARITY.
HONEST SCOPE (printed): the exceed is on SAFETY / SOVEREIGNTY / BY-CONSTRUCTION correctness vs a flat-file+flag
baseline -- NOT a feature-parity claim against a mature IAM (Okta/Workday); those features are ABSENT and declared.
dependencies 8 imports · 0 importers
imports: nx_hr_entitle.nxnx_g_puts_lib.nxnx_hr_admin.nxnx_lan_signup.nxnx_hr.nxnx_hr_sov.nxnx_seg_store.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
| 22 | func g_mkpfx(base: *u8, ms: i64, out: *u8) -> i64 { var o: i64=0; while base[o]!=(0 as u8){out[o]=base[o];o=o+1} let t: *u8=sys_mmap(28); var m: i64=ms; var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var z: i64=k-1; while z>=0{out[o]=t[z];o=o+1;z=z-1} out[o]=0 as u8; return o } |
| 23 | func ex_histcount(prefix: *u8, cred: *u8) -> i64 { let kinds: *i64=sys_mmap(256*8) as *i64; let ptrs: *i64=sys_mmap(256*8) as *i64; let lens: *i64=sys_mmap(256*8) as *i64; let srcs: *i64=sys_mmap(256*8) as *i64; return ss_scan_all(prefix, cred, kinds, ptrs, lens, srcs) } |
| 25 | func g_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 } |
| 26 | func g_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } |
| 27 | func g_wn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 } |
| 28 | func gtrunc(path: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 0x1a4); if fd>=0 { sys_close(fd) } return 0 } |
| 29 | func g_writefile(path: *u8, s: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 0x1a4); if fd<0 { return 1 } var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd, s, n); sys_close(fd); return 0 } |
| 30 | func g_append(path: *u8, s: *u8) -> i64 { let fd: i64 = sys_openat_append(path, 0x1a4); if fd<0 { return 1 } var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd, s, n); sys_close(fd); return 0 } |
| 31 | func g_ip4(out: *u8, a: i64, b: i64, c: i64, d: i64) -> i64 { out[0]=a as u8; out[1]=b as u8; out[2]=c as u8; out[3]=d as u8; return 0 } called by 1: main |
| 32 | func g_count_lines(path: *u8) -> i64 { let buf: *u8=sys_mmap(65536); let n: i64=hr_read(path, buf, 65536); var c: i64=0; var i: i64=0; while i<n { if buf[i]==(10 as u8) { c=c+1 } i=i+1 } return c } |
| 33 | func g_file_has(path: *u8, needle: *u8, nl: i64) -> i64 { let buf: *u8=sys_mmap(65536); let n: i64=hr_read(path, buf, 65536); if nl==0 {return 1} var i: i64=0; while i+nl<=n { var j: i64=0; var ok: i64=1; while j<nl { if buf[i+j]!=needle[j]{ok=0;j=nl} else {j=j+1} } if ok==1 {return 1} i=i+1 } return 0 } |
| 39 | func naive_signup_open() -> i64 { return 1 } called by 1: main |
| 42 | func verdict(ours: i64, naive: i64, higher_better: i64) -> i64 called by 1: axis |
| 48 | func vname(v: i64) -> i64 { if v==2 { g_puts("EXCEEDS" as *u8) } else { if v==1 { g_puts("PARITY" as *u8) } else { g_puts("BEHIND" as *u8) } } return 0 } |
| 49 | func axis(name: *u8, ours: i64, naive: i64, hb: i64) -> i64 |
| 56 | func main() -> i64 |