code wiki / _hdl_build / nx_hr_visitor_gate.nx

nx_hr_visitor_gate.nx

buildroot/runtime/_hdl_build/nx_hr_visitor_gate.nx

4376 B55 linesdepth 12pulls 20 transitivereach 0 importersview sourcekind gate/prooftopic hr
docsdependenciesstructsconstsfunctions

about

nx_hr_visitor_gate.nx -- referee for NISHI HR visitor module (the front desk). PROVES: a normal visitor is NEUTRAL (served); a wanted/business visitor is WELCOME; a blocklisted, abusive-rate, or bot visitor is BLOCK; bot-UA + rate heuristics work; and the SECURITY PRIORITY -- a WELCOMED visitor who turns abusive is still BLOCKED. GREEN iff every row matches. Prints verdict=GREEN to STDOUT *and* returns the exit code. Durable -> knowledge/status/hr_visitor_gate.log. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_hr_visitor.nx nx_g_puts_lib.nx nx_syscalls.nx nx_hr_visitor_gate.nx

imports: nx_hr_visitor.nxnx_g_puts_lib.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_mmap rput gwrite sys_openat_wr sys_write ↻ sys_close chk g_puts ↻ g_num sys_mmap ↻ sys_write ↻ hv_classify hv_listed sys_mmap ↻ hr_read sys_openat_rd sys_read sys_close ↻ hr_line_end hr_field_end hr_eqrange hv_rate_abusive hv_is_bot hv_contains hv_is_bot ↻

structs

none

consts

none

functions

10func 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: chk calls 2: sys_mmapsys_write
11func 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 }
calls 1: sys_write
12func 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 }
13func rput(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ dst[off+i]=s[i]; i=i+1 } return off+i }
called by 1: main
14func gwrite(path: *u8, s: *u8, n: i64) -> i64 { let fd: i64 = sys_openat_wr(path, 0x1a4); if fd<0 { return 0 } if n>0 { sys_write(fd, s, n) } sys_close(fd); return 0 }
15func chk(got: i64, want: i64, label: *u8) -> i64
called by 1: main calls 2: g_putsg_num
21func main() -> i64