code wiki / _hdl_build / nx_hr_provision_roster.nx

nx_hr_provision_roster.nx

buildroot/runtime/_hdl_build/nx_hr_provision_roster.nx

5191 B72 linesdepth 12pulls 24 transitivereach 0 importersview sourcekind tooltopic hr
docsdependenciesstructsconstsfunctions

about

nx_hr_provision_roster.nx -- provisions the REAL family roster into STAGING HR stores (the operator confirmed the handles + levels via AskUserQuestion: lowercase first names; brad/jensen/kelli = family members; andelinwest = a SEPARATE realm; elderwesto = sole super-admin). It does NOT create any OPAQUE passphrase -- each person creates their own when they sign up on the LAN (rule: Claude never fabricates a credential). It writes only the HR DIRECTORY (the level/invite SSOT), keyed by cred_id derived from the handle. IDEMPOTENT BY CONSTRUCTION (#10): it TRUNCATES then rebuilds, so every run yields byte-identical stores (safe to re-run; for INCREMENTAL changes after go-live use hra_invite/hra_suspend instead, which preserve history #13). Output (staged -> the operator/publisher promotes to the NAS, where each realm's daemon reads it): knowledge/publish/staging/nishi_hr.log (realm nishi_site_admin) -- the nishifamily.com roster knowledge/publish/staging/andelinwest_hr.log (realm andelinwest_admin) -- the andelinwest.com roster (sealed) Roster NOW (operator: "i should only see brad, jensen, kelli for now"): elderwesto(owner,active) + brad/jensen/ kelli(member,invited). Robert/Vanessa are provisioned as admins in the SEPARATE andelinwest store -> invisible to nishifamily until andelinwest.com onboards them.

dependencies 4 imports · 0 importers

nx_hr_admin.nx nx_g_puts_lib.nx nx_hr.nx nx_syscalls.nx nx_hr_provision_roster.nx

imports: nx_hr_admin.nxnx_g_puts_lib.nxnx_hr.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_realtime_sec sys_mmap sys_clock_gettime_real 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 ↻ hrs_encode_rec sys_mmap ↻

structs

none

consts

none

functions

20func 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 1: main calls 2: sys_mmapsys_write
21func gtrunc(path: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 0x1a4); if fd>=0 { sys_close(fd) } return 0 }
23func main() -> i64