code wiki / (root) / nx_coverbeat.nx

nx_coverbeat.nx

buildroot/runtime/nx_coverbeat.nx

8484 B163 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_coverbeat.nx -- RUN THE COVERAGE INSTRUMENTS AND PROVE IT RAN THEM. RUNG R3 of the SOTA plan (nishifamily.com/code/sotaplan): the instruments exist and nothing runs them. Every finding on 2026-07-31 existed only because someone happened to look. A gate nobody runs is itself uncovered -- and that recursion has to bottom out in a beat. WHY THIS IS NOT JUST A SHELL LOOP. Two failure modes have to be impossible by construction: 1. THE SILENT NO-OP. A beat that reports fail=0 without having executed anything is the quietest failure in the system -- observed live in the learnings rail, where a harvest reported fail=0 for weeks while moving zero learnings. So this beat counts what it ATTEMPTED and what it ACTUALLY REAPED, prints both, and goes RED when they disagree. `ran` is evidence; `fail=0` is not. 2. THE FLATTERING AVERAGE. A rollup that means-averages its gates lets a healthy plane hide a dead one. The HEADLINE IS THE WORST VERDICT, never the average -- if any instrument is RED the beat is RED, and the log line names which. SCHEDULING: this is a ONESHOT. Launch it from cron exactly like the existing sovereign beats, e.g. */30 * * * * elderwesto /volume1/homes/elderwesto/nishihost/nx_coverbeat.elf >> logs/coverbeat.log 2>&1 It is deliberately idempotent and side-effect-free apart from its own log line, so running it twice in a minute is harmless -- a beat that cannot be safely re-run cannot be safely scheduled. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_coverbeat.nx

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

main sys_openat_append sys_now_realtime_sec sys_mmap sys_clock_gettime_real cb_p cb_w cb_len sys_write cb_run sys_fork sys_mmap ↻ sys_openat_wr sys_dup3 sys_execve_clean sys_close sys_execve sys_exit sys_wait4 wait_exit_code cb_pn sys_mmap ↻ sys_write ↻ cb_w ↻ sys_close ↻

structs

none

consts

26const CB_LOG: *u8 = "logs/coverbeat.log"
27const CB_MODE: i64 = 420

functions

29func cb_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: cb_w
30func cb_w(fd: i64, s: *u8) -> i64 { let n: i64 = cb_len(s); sys_write(fd, s, n); return 0 }
called by 2: cb_pmain calls 2: cb_lensys_write
31func cb_p(s: *u8) -> i64 { return cb_w(1, s) }
called by 1: main calls 1: cb_w
32func cb_pn(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
56func cb_run(path: *u8) -> i64
77func main() -> i64