code wiki / _hdl_build / nx_hr_audit.nx

nx_hr_audit.nx

buildroot/runtime/_hdl_build/nx_hr_audit.nx

4842 B67 linesdepth 11pulls 22 transitivereach 5 importersview sourcekind librarytopic hr
docsdependenciesstructsconstsfunctions

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

nx_hr.nx nx_hr_sov.nx nx_seg_store.nx nx_uxf_decode.nx nx_syscalls.nx nx_hr_audit.nx nx_hr_audit_gate.nx nx_hr_console_render.nx nx_lan_signup_routes.nx

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

12const HAU_BUF: i64 = 1048576
22const HAU_HEAD: *u8 = "<!doctype html><html><head><meta charset=utf-8><meta name=viewport content=\"width=device-width,initial-scale=1\"><title>Nishi HR &mdash; 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

13func 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
15func 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 }
16func hau_role(out: *u8, o: i64, lvl: i64) -> i64
called by 1: hau_emit calls 1: hr_puts
25func hau_emit(hr_store: *u8, viewer_is_super: i64, out: *u8, cap: i64) -> i64