code wiki / _hdl_build / nx_hr_migrate_gate.nx

nx_hr_migrate_gate.nx

buildroot/runtime/_hdl_build/nx_hr_migrate_gate.nx

6205 B75 linesdepth 12pulls 24 transitivereach 0 importersview sourcekind gate/prooftopic hr
docsdependenciesstructsconstsfunctions

about

nx_hr_migrate_gate.nx -- referee proving nx_hr_migrate is LOSSLESS: build a real nx_hr TAB-log (the storage torrent still uses) via base nx_hr, migrate it into a seg_store, and assert that EVERY cred resolves IDENTICALLY under the new store as the old (hrs_resolve_level == hr_resolve_level), the active roster count is preserved, and a member's FULL history (every version) survives. This is the de-risk artifact the torrent/HR teams need before flipping base nx_hr -> seg_store. GREEN iff every row matches. Durable -> knowledge/status/hr_migrate_gate.log.

dependencies 6 imports · 0 importers

nx_hr_migrate.nx nx_g_puts_lib.nx nx_hr.nx nx_hr_sov.nx nx_seg_store.nx nx_syscalls.nx nx_hr_migrate_gate.nx

imports: nx_hr_migrate.nxnx_g_puts_lib.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 ↻ gtrunc sys_openat_wr sys_close hr_enroll hr_cred_id sys_mmap ↻ nx_ncs_derive_user_id_hash sys_mmap ↻ hr_hexenc hr_append sys_mmap ↻ hr_puts hr_putn sys_mmap ↻ sys_write ↻ sys_close ↻ hr_set_role hr_append ↻ hrm_migrate sys_mmap ↻ hr_read sys_openat_rd sys_read sys_close ↻ hr_line_end hr_field_end hrm_dup hr_intrange hrs_migrate hrs_put_indexed hrs_seg_committed

structs

none

consts

none

functions

13func 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: chkmain calls 2: sys_mmapsys_write
14func 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
15func 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
16func gtrunc(path: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 0x1a4); if fd>=0 { sys_close(fd) } return 0 }
called by 1: main calls 2: sys_openat_wrsys_close
17func 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
18func scan_count(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
19func chk(got: i64, want: i64, label: *u8) -> i64
called by 1: main calls 2: g_putsg_num
25func main() -> i64