nx_intake_keep.nx
buildroot/runtime/nx_intake_keep.nx
about
nx_intake_keep.nx -- keep the public intake route ALIVE, without touching the supervisor.
THE PROBLEM. nx_site_intake_serve answers :8033 and every contact form on every generated site depends on
it -- the meal pages literally suppress their forms when it stops answering. But it is NOT in nx_hostctl's
guard list, and that list is COMPILED IN, so adding it means rebuilding and deploying the supervisor.
WHY NOT JUST DEPLOY THE SUPERVISOR. Measured, not assumed: hostctl's source is unchanged since 2026-07-31,
yet a fresh build differs from the live binary by +26,232 bytes -- so the delta is the TOOLCHAIN, not the
source. Rebuilding the supervisor means shipping whatever nx_cc has become, and nx_cc had an escaped gate
mutant land in it on 2026-08-06. A defect in a page is a page; a defect in the thing that respawns every
daemon is the host. That trade is bad at any blast radius, so this takes the other road.
THE OTHER ROAD. The tickless clock is ALREADY supervised by hostctl and dispatches from a DATA registry
(knowledge/store/clockjobs-, added via nx_store_put, read-only to the clock). So supervision becomes a row,
not a recompile -- the same "new capability is data" move the rest of this lane runs on.
FAIL-SAFE BY CONSTRUCTION: it spawns ONLY when the port refuses a connection, so a healthy daemon is never
disturbed and two keepers racing cannot produce two servers (the loser's bind fails and it exits).
INSTRUMENTED SO A HEALTHY RUN IS STILL VISIBLE: spawns append to a log (rare, meaningful), while every
successful check REWRITES a heartbeat file. A log alone would show zero rows on a healthy system and zero
rows on a dead keeper -- indistinguishable. The heartbeat is what separates "nothing to do" from "not running".
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 1 imports · 0 importers
imports: nx_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
| 26 | const IK_PORT: i64 = 8033 |
| 27 | const IK_MODE: i64 = 420 |
| 28 | const IK_ELF: *u8 = "./nx_site_intake_serve.elf" as *u8 |
| 29 | const IK_LOG: *u8 = "knowledge/status/intake_keep.log" as *u8 |
| 30 | const IK_BEAT: *u8 = "knowledge/status/intake_keep.beat" as *u8 |
functions
| 32 | func ik_p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 33 | func ik_n(v: i64) -> i64 |
| 46 | func ik_cat(d: *u8, o: i64, s: *u8) -> i64 { var x: i64 = o; var i: i64 = 0; while s[i] != (0 as u8) { d[x] = s[i]; x = x + 1; i = i + 1 } return x } |
| 47 | func ik_catn(d: *u8, o: i64, v: i64) -> i64 |
| 62 | func ik_port_open(port: i64) -> i64 |
| 79 | func ik_beat(now: i64) -> i64 |
| 91 | func ik_log(now: i64, pid: i64) -> i64 |
| 104 | func main(argc: i64, argv: *i64) -> i64 |