code wiki / _hdl_build / nx_restart_strategy_gate.nx

nx_restart_strategy_gate.nx

buildroot/runtime/_hdl_build/nx_restart_strategy_gate.nx

5686 B81 linesdepth 2pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic restart
docsdependenciesstructsconstsfunctions

about

nx_restart_strategy_gate.nx -- MEASURED gate for the S-class supervision restart strategy. Pure/offline. Proves the crash-loop CONTAINMENT the operator wants (vs today's infinite restart): a flapping daemon is QUARANTINED once it exceeds the OTP restart intensity, with exponential-backoff+jitter spacing and correct window aging. T1 within intensity -> RESTART T2 over intensity -> QUARANTINE (contained, not looped) T3 exponential backoff capped -> 100,200,400,800,... -> cap T4 window ages out old crashes -> a now-stable daemon is NOT quarantined for ancient crashes T5 jitter bounded [d/2, d] -> no thundering herd T6 the LIVE crash-loop case -> gallery/vroom-style rapid restarts -> QUARANTINE (the operator's exact bug, contained) GREEN iff 6/6. Appends knowledge/status/restart_strategy_gate.log. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_restart_strategy.nx nx_syscalls.nx nx_restart_strategy_gate.nx

imports: nx_restart_strategy.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 rs_should_restart rs_decide rs_restarts_in_window rs_backoff_ms rs_jitter_ms g_num sys_mmap ↻ sys_write ↻ sys_openat_append g_w sys_write ↻ g_wn sys_mmap ↻ sys_write ↻ sys_close sys_exit

structs

none

consts

none

functions

14func g_puts(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 1: main calls 1: sys_write
15func g_num(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
21func 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
22func g_wn(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
29func main() -> i64