code wiki / _hdl_build / nx_transient_monitor_gate.nx

nx_transient_monitor_gate.nx

buildroot/runtime/_hdl_build/nx_transient_monitor_gate.nx

2584 B38 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic transient
docsdependenciesstructsconstsfunctions

about

nx_transient_monitor_gate.nx -- SOVEREIGN gate for the transient/flakiness monitor. T1 a STABLE target (always exit 0) -> 6/6 pass -> STABLE (neg-control: not falsely flagged flaky) T2 a FLAKY target (alternating) -> 0<pass<6 -> FLAKY DETECTED (the transient is accounted, not hand-waved) T3 verdict logic liar-kill: 6/6=STABLE, 3/6=FLAKY, 0/6=BROKEN harness must: rm -f /tmp/tm_counter; build nx_tm_ok + nx_tm_flaky FIRST (this gate probes their /tmp elfs). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_transient_monitor.nx nx_transient_monitor_gate.nx

imports: nx_syscalls.nxnx_transient_monitor.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap tm_probe sys_mmap ↻ tm_run_once sys_now_ms sys_mmap ↻ sys_clock_gettime_mono sys_fork sys_mmap ↻ sys_openat_wr sys_dup3 sys_execve sys_exit sys_sleep_ms sys_mmap ↻ sys_munmap nx_kill sys_wait4 tm_verdict tg_w sys_write tg_wn sys_mmap ↻ sys_write ↻ tg_vname tg_w ↻

structs

none

consts

none

functions

10func tg_w(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: tg_vnamemain calls 1: sys_write
11func tg_wn(v: i64) -> i64 { let b: *u8=sys_mmap(24); var m: i64=v; var k: i64=0; if m==0{b[0]=48 as u8;k=1} let t: *u8=sys_mmap(24); while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var o: *u8=sys_mmap(24); var w: i64=0; var q: i64=k-1; while q>=0{o[w]=t[q];w=w+1;q=q-1} sys_write(1,o,w); return 0 }
called by 1: main calls 2: sys_mmapsys_write
12func tg_vname(v: i64) -> i64 { if v==0 {tg_w("STABLE" as *u8)} if v==1 {tg_w("FLAKY" as *u8)} if v==2 {tg_w("BROKEN" as *u8)} return 0 }
called by 1: main calls 1: tg_w
14func main(argc: i64, argv: *i64) -> i64