code wiki / _hdl_build / nx_ready_census.nx
nx_ready_census.nx
buildroot/runtime/_hdl_build/nx_ready_census.nx
about
nx_ready_census.nx -- LIVENESS-vs-READINESS CENSUS across the whole supervised fleet (seq1314 oracle).
WHY: on 2026-07-29 nx_tools_api_serve was PROCESS-ALIVE with its LISTEN SOCKET GONE; every liveness-only
guard read it as healthy and the agent-facing MCP surface stayed dark for an hour. seq1299 fixed the
detector and wired it into ONE guard. This organ answers the fleet-wide question that fix raised:
"which OTHER services are currently claiming UP while nothing is listening?"
METHOD: mgmt_snap.json is the supervisor's OWN per-poll claim (SVC <name> <port> <state> ...). We take
each claim and CONNECT to the port -- connect-only, never writing a byte, so this can never disturb a
working daemon (the retired /healthz serving-probe crash-looped redirect.elf by writing to it).
A DISAGREEMENT (claim=UP, socket=REFUSED) is the exact 07-29 wound, caught by measurement.
★It is ALSO the empirical port oracle for seq1314: the supervisor's guard CALL-SITE COMMENTS are stale
(they say the docportal admin daemon is :8456; it is really :18456 -- wiring a guard from the comment
would kill a HEALTHY daemon every poll). mgmt_snap.json agrees with the live listen table; comments do not.
nx_ready_census [snapfile] exit 0 = all claims honest · 3 = disagreement · 2 = snapshot unreadable
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_health_probe.nxnx_itoa_lib.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 20 | const RC_CAP: i64 = 65536 |
| 22 | const RC_NAMECAP: i64 = 128 |
functions
| 24 | func rc_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 29 | func rc_n(v: i64) -> i64 { nxi_out(v); return 0 } |
| 31 | func main(argc: i64, argv: *i64) -> i64 |