code wiki / _hdl_build / nx_hr_audit.nx
nx_hr_audit.nx
buildroot/runtime/_hdl_build/nx_hr_audit.nx
about
nx_hr_audit.nx -- the owner-gated /hr/audit AUDIT-TRAIL view. The HR store is append-only (#13, history sacred):
every lifecycle event (invite / claim / suspend / role-change) is a preserved record with a timestamp + actor.
The /hr console shows the CURRENT roster; this surfaces the FULL HISTORY for accountability -- who did what, to
whom, when -- including SUPERSEDED records (e.g. a member shows invited -> active -> suspended as three rows).
Owner-gated like the console (a non-owner gets the stub, no history leak). Server-rendered, zero 3rd-party JS.
dependencies 5 imports · 3 importers
imports: nx_hr.nxnx_hr_sov.nxnx_seg_store.nxnx_uxf_decode.nxnx_syscalls.nx
imported by: nx_hr_audit_gate.nxnx_hr_console_render.nxnx_lan_signup_routes.nx
structs
| none |
consts
| 12 | const HAU_BUF: i64 = 1048576 |
| 22 | const HAU_HEAD: *u8 = "<!doctype html><html><head><meta charset=utf-8><meta name=viewport content=\"width=device-width,initial-scale=1\"><title>Nishi HR — audit</title><style>body{font-family:system-ui,sans-serif;max-width:760px;margin:5vh auto;padding:0 18px;color:#16202e}h1{font-size:1.2rem}table{border-collapse:collapse;width:100%;margin:12px 0;font-size:.92rem}th,td{text-align:left;padding:6px 9px;border-bottom:1px solid #e1e6f0}th{color:#667;font-size:.82rem}.s-active{color:#137333}.s-invited{color:#a56300}.s-suspended{color:#a50e0e}</style></head><body>" as *u8 |
functions
| 13 | func hau_atoi(s: *u8) -> i64 { var v: i64=0; var i: i64=0; while s[i]!=(0 as u8){ let c: i64=s[i] as i64; if c>=48 { if c<=57 { v=v*10+(c-48) } } i=i+1 } return v } called by 1: hau_emit |
| 15 | func hau_putrange(out: *u8, o: i64, src: *u8, s: i64, e: i64) -> i64 { var oo: i64=o; var i: i64=s; while i<e { out[oo]=src[i]; oo=oo+1; i=i+1 } return oo } |
| 16 | func hau_role(out: *u8, o: i64, lvl: i64) -> i64 |
| 25 | func hau_emit(hr_store: *u8, viewer_is_super: i64, out: *u8, cap: i64) -> i64 called by 3: mainmainlsd_route calls 9: hr_putshrs_index_countsys_mmaphrs_index_get_credss_scan_allcanon_decode+3 |