code wiki / _hdl_build / nx_govern_sweep.nx
nx_govern_sweep.nx
buildroot/runtime/_hdl_build/nx_govern_sweep.nx
about
nx_govern_sweep.nx -- gov lane (F750). Governance sweep: reads a supervisor log TAIL and counts
respawn events = the CRASH-LOOP signature (a job dying instantly and respawned forever with NO
backoff) -- the anti-pattern vs the SOTA Kubernetes reconciliation loop (observe->compare-to-desired
->correct with EXPONENTIAL BACKOFF; requeue on repeated failure). Detect-and-report, fail-closed on
ungoverned churn. Declares its window (scale-law). No hardware writes (Rule 26).
nx_govern_sweep respawns <logpath> [threshold]
exit: 0 GOVERNED | 3 UNGOVERNED (crash-loop: respawns>threshold) | 4 ABSENT | 2 usage.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_itoa_lib.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
| 11 | const K_MAGIC_262144: i64 = 262144 |
functions
| 13 | func gv_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } |
| 18 | func gv_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 } |
| 19 | func gv_atoi(s: *u8) -> i64 { var v: i64 = 0; var i: i64 = 0; while s[i] != (0 as u8) { let c: i64 = s[i]; if c < 48 { i = i + 1 } else { if c > 57 { i = i + 1 } else { v = v * 10 + (c - 48); i = i + 1 } } } return v } called by 1: main |
| 20 | func gv_tail(path: *u8, buf: *u8, win: i64) -> i64 |
| 33 | func gv_count(buf: *u8, n: i64, pat: *u8) -> i64 called by 1: main |
| 47 | func main(argc: i64, argv: *i64) -> i64 |