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

12063 B148 linesdepth 13pulls 26 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

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

nx_hr_entitle.nx nx_g_puts_lib.nx nx_hr_admin.nx nx_lan_signup.nx nx_hr.nx nx_hr_sov.nx nx_seg_store.nx nx_syscalls.nx nx_account_admin_exceed_gate.n

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

main g_puts sys_write sys_now_ms sys_mmap sys_clock_gettime_mono sys_mmap ↻ g_mkpfx sys_mmap ↻ hra_enroll hrs_enroll hrs_cred_id sys_mmap ↻ nx_ncs_derive_user_id_hash sys_mmap ↻ hrs_hexenc hrs_put_indexed hrs_seg_committed sys_mmap ↻ ss_manifest ss_manifest_file hrs_itoa sys_mmap ↻ hrs_streq hrs_status_code sys_mmap ↻ hrs_get ss_open sys_mmap ↻ ss_hget canon_decode hrs_field hrs_streq ↻ hrs_streq ↻ hrs_index_count ss_open ↻ sys_mmap ↻ ss_hget ↻ hrs_atoi_n sys_mmap ↻

structs

none

consts

none

functions

22func 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 }
called by 1: main calls 1: sys_mmap
23func 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) }
called by 1: main calls 2: sys_mmapss_scan_all
25func 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 }
called by 2: axismain calls 2: sys_mmapsys_write
26func 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 }
called by 1: main calls 1: sys_write
27func 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 }
called by 1: main calls 2: sys_mmapsys_write
28func gtrunc(path: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 0x1a4); if fd>=0 { sys_close(fd) } return 0 }
29func 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 }
30func 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 }
31func 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
32func 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 }
called by 1: main calls 2: sys_mmaphr_read
33func 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 }
called by 1: main calls 2: sys_mmaphr_read
39func naive_signup_open() -> i64 { return 1 }
called by 1: main
42func verdict(ours: i64, naive: i64, higher_better: i64) -> i64
called by 1: axis
48func 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 }
called by 2: axismain calls 1: g_puts
49func axis(name: *u8, ours: i64, naive: i64, hb: i64) -> i64
called by 1: main calls 4: verdictg_putsvnameg_num
56func main() -> i64