code wiki / _hdl_build / nx_sclass_flow03_gate.nx

nx_sclass_flow03_gate.nx

buildroot/runtime/_hdl_build/nx_sclass_flow03_gate.nx

3854 B55 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic sclass
docsdependenciesstructsconstsfunctions

about

nx_sclass_flow03_gate.nx -- SCLASS-FLOW-03: "live heartbeats: board liveness != UNKNOWN" (the audit's Pillar-B complaint -- 1265 streams, the 3 'active' ones all liveness=UNKNOWN because nothing beats their heartbeats). Closed honestly: the PM program stream IS active (the loop runs it), so it beats a fresh heartbeat, and the board's OWN liveness instrument (hbm_scan_registry -- exactly what nx_ws_board renders) then reports it ALIVE. NEG-CONTROL (the anti-fabrication guard): a pre-existing stream nobody beats (WMS-R1) MUST still read UNKNOWN -- so "ALIVE" is earned by a real heartbeat, never painted on. REUSE: hb_beat_s / hbm_scan_registry / HBS_* / WS_PREFIX (nx_heartbeat_str). Sovereign, neg-controlled. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_heartbeat_str.nx nx_syscalls.nx nx_sclass_flow03_gate.nx

imports: nx_heartbeat_str.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 fw sys_write hb_beat_s sys_now_realtime_sec sys_mmap sys_clock_gettime_real hb_beat_s_at sys_mmap ↻ fa_cat fa_catn sys_mmap ↻ fa_appendz fa_append sys_mmap ↻ sys_openat_append sys_flock fa_write_all sys_write ↻ sys_close fa_len sys_mmap ↻ sys_now_realtime_sec ↻ hbm_scan_registry sys_mmap ↻ ws_manifest_p sys_mmap ↻ ss_get sys_mmap ↻ ss_scan sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_scan_seglist ss_len sys_mmap ↻ ss_cat ss_readall ss_r32 hb_last_beat_s

structs

none

consts

12const F3_HBP: *u8 = "knowledge/status/wms_heartbeat.log"

functions

14func fw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: fverdmain calls 1: sys_write
15func fn(v0: i64) -> i64 { var v: i64=v0; if v<0 { sys_write(1,"-" as *u8,1); v=0-v } let t: *u8=sys_mmap(24); var k: i64=0; if v==0{t[0]=48 as u8;k=1} while v>0{t[k]=(48+(v%10)) as u8;v=v/10;k=k+1} let b: *u8=sys_mmap(24); var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 }
called by 1: main calls 2: sys_writesys_mmap
16func fstreq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8){ if a[i]!=b[i]{return 0} i=i+1 } if b[i]!=(0 as u8){return 0} return 1 }
called by 1: main
17func fverd(v: i64) -> i64 { if v==HBS_ALIVE { fw("ALIVE" as *u8) } if v==HBS_STALLED { fw("STALLED" as *u8) } if v==HBS_UNKNOWN { fw("UNKNOWN" as *u8) } if v<0 { fw("(absent)" as *u8) } return 0 }
called by 1: main calls 1: fw
19func main() -> i64