nx_restart_guard_gate.nx
buildroot/runtime/nx_restart_guard_gate.nx
about
nx_restart_guard_gate.nx -- KAT + measured-vs-systemd scorecard for the supervisor crash-loop guard.
MIGRATED 2026-09-02 onto nx_gate_verdict (D001): every tooth is a named gv_check, so /api/gate_run reads the verdict
from the exit code and harness.jrnl records a frame. Before this the gate returned N for the failing assertion and
printed its own verdict line, which /api/promote correctly refused. The teeth and their numbers are unchanged.
T1 healthy (restarts spread > interval) -> never trips
T2 crash-loop (6 restarts in 10s, burst=5) -> 1st-5th allowed, 6th TRIPS (give up)
T3 recovery (quiet > interval) -> window resets, restart allowed again
T4 exponential backoff (base*2^(n-1), capped) vs systemd's fixed RestartSec
T5 DETERMINISM (the exceed): same timestamps -> identical trip point on a re-run (replayable)
T6-T10 bind-grace: alive-but-never-listening (debt 1788361379, the 16 h /search outage class)
T11-T15 stale-cycle liveness: alive-by-NAME is not alive (the orphan /status child of a dead fleet supervisor)
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_restart_guard.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
| 18 | func rg_waits(n: i64, gap_ms: i64, cap_ms: i64, base_ms: i64) -> i64 |
| 26 | func main() -> i64 |