code wiki / _hdl_build / nx_sclass_flow03_gate.nx
nx_sclass_flow03_gate.nx
buildroot/runtime/_hdl_build/nx_sclass_flow03_gate.nx
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
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
structs
| none |
consts
| 12 | const F3_HBP: *u8 = "knowledge/status/wms_heartbeat.log" |
functions
| 14 | func fw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 15 | func 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 } |
| 16 | func 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 |
| 17 | func 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 } |
| 19 | func main() -> i64 |