code wiki / (root) / nx_health_probe_gate.nx

nx_health_probe_gate.nx

buildroot/runtime/nx_health_probe_gate.nx

4786 B83 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic health
docsdependenciesstructsconstsfunctions

about

nx_health_probe_gate.nx -- loopback KAT for the serving health probe. Forks two mock servers (one that serves 200, one that ACCEPTS but never responds = hung) + probes an unused port. Proves the probe tells SERVING / HUNG / REFUSED apart -- crucially HUNG, which PID-liveness + a LISTEN check both miss. exit 0 = pass, N = assertion N failed.

dependencies 2 imports · 0 importers

nx_health_probe.nx nx_assert.nx nx_health_probe_gate.nx

imports: nx_health_probe.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 hpg_mock hp_sockaddr hp_probe sys_socket sys_set_socket_timeout sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_setsockopt sys_munmap sys_mmap ↻ hp_sockaddr ↻ nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll sys_munmap ↻ sys_write ↻ sys_read sys_munmap ↻ sys_close nx_puts_err sys_write ↻ hp_name hp_listening sys_socket ↻

structs

none

consts

9const HPG_PORT_BOUND: i64 = 19004
10const HPG_PORT_DEAD: i64 = 19005
12const HPG_HOLD_MS: i64 = 4000

functions

18func hpg_mock(port: i64, mode: i64) -> i64
called by 1: main calls 1: hp_sockaddr
44func main() -> i64