code wiki / _hdl_build / nx_govern_sweep.nx

nx_govern_sweep.nx

buildroot/runtime/_hdl_build/nx_govern_sweep.nx

3473 B68 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_itoa_lib.nx nx_govern_sweep.nx

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

main gv_w sys_write sys_exit gv_atoi sys_mmap gv_tail sys_openat_rd sys_lseek sys_read sys_close gv_count gv_wn nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap

structs

none

consts

11const K_MAGIC_262144: i64 = 262144

functions

13func 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 }
called by 1: main calls 1: sys_write
18func gv_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 }
called by 1: main calls 1: nxi_fd
19func 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
20func gv_tail(path: *u8, buf: *u8, win: i64) -> i64
33func gv_count(buf: *u8, n: i64, pat: *u8) -> i64
called by 1: main
47func main(argc: i64, argv: *i64) -> i64