code wiki / _hdl_build / nx_hostctl_supervise_gate.nx

nx_hostctl_supervise_gate.nx

buildroot/runtime/_hdl_build/nx_hostctl_supervise_gate.nx

4857 B78 linesdepth 7pulls 12 transitivereach 0 importersview sourcekind gate/prooftopic hostctl
docsdependenciesstructsconstsfunctions

about

nx_hostctl_supervise_gate.nx -- KAT for the upgraded supervisor decision logic (gaps #5 health-probe + #4 restart-guard, wired into nx_hostctl.cmd_supervise). Proves: a dead daemon -> restart; an alive+SERVING daemon -> leave it; an alive-but-HUNG daemon -> restart (the case PID-liveness misses); and the crash-loop guard allows exactly BURST restarts per window then backs off. exit 0 = pass, N = assertion N failed.

dependencies 2 imports · 0 importers

nx_hostctl.nx nx_assert.nx nx_hostctl_supervise_gate.nx

imports: nx_hostctl.nxnx_assert.nx

imported by: nobody (leaf or entry point)

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

main hc_needs_restart hp_probe sys_socket sys_set_socket_timeout sys_mmap sys_setsockopt sys_munmap sys_mmap ↻ hp_sockaddr nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll sys_write sys_read sys_munmap ↻ sys_close hgg_mock sys_socket ↻ sys_setsockopt ↻ hp_sockaddr ↻ sys_bind sys_listen sys_fork sys_accept sys_read ↻ sys_sleep_ms sys_mmap ↻ sys_munmap ↻ sys_sleep_ms ↻ nx_kill sys_wait4 nx_puts_err sys_write ↻ nx_puti_err sys_mmap ↻ sys_write ↻ rg_should_restart

structs

none

consts

none

functions

9func hgg_mock(port: i64, mode: i64) -> i64
32func main() -> i64