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 sys_socket sys_setsockopt hp_sockaddr sys_bind sys_listen sys_fork sys_sleep_ms sys_mmap sys_munmap sys_accept sys_read sys_sleep_ms ↻ 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 nx_puts_err sys_write ↻ hp_name nx_kill sys_wait4 hp_listening sys_socket ↻ sys_set_socket_timeout ↻ sys_mmap ↻

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
44func main() -> i64