nx_swarm_tend_gate.nx
buildroot/runtime/nx_swarm_tend_gate.nx
about
nx_swarm_tend_gate.nx -- gate for the active queue tender (SOTA queue ops, no fire-and-forget).
T1 PURE verdict table: no waiters->OK, fresh waiter->DRAINING, starved waiter->JAMMED.
T2 ACTIVE REAP: plant a HOLD for a DEAD pid + a HOLD for a LIVE pid (init=1) in the store, with
NO waiter present; tend_reap frees ONLY the dead one (writes DONE) -> the leaked-slot bug the
passive path can't fix (no waiter to trigger it). reaped==1; live holder untouched.
T3 JAM DETECTION live: plant a waiter with an ancient enqueue timestamp -> tend_health sees a
large oldest_wait_ms -> verdict JAMMED (the traffic-jam alarm fires before a silent timeout).
T4 clean: fresh empty queue -> OK, 0 reaped.
T5 MULTI-ENTRY index: dead holder + live holder coexist in q:ids; reap frees ONLY the dead one,
the live one stays counted. (The case a false "seg_store bug" diagnosis claimed impossible --
the real bugs were nx_cc empty-literal + const-syscall getpid, both fixed/worked around.)
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_swarm_tend.nxnx_gate_verdict.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
| none |
functions
| 16 | func tg_put(pid: i64, ty: *u8, prio: i64, est: i64, us: i64) -> i64 |
| 24 | func main(argc: i64, argv: *i64) -> i64 |