code wiki / _hdl_build / nx_papers_beat.nx

nx_papers_beat.nx

buildroot/runtime/_hdl_build/nx_papers_beat.nx

5109 B116 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_papers_beat.nx -- the paper lane's REGRESSION BEAT body (F1131). ★WHY A BODY AND NOT A SCHEDULER. The ecosystem already has ONE clock: nx_clock_run reads the clockjobs registry (name/interval/organ) and forks each due organ arglessly. Building a second scheduler would be duplication. This is only the BODY the shared clock calls, exactly parallel to nx_ecomat_beat -- one per lane, one clock for all of them. ★WHY IT LOGS. Standing law: a beat with no evidence line is a CLAIM, not a control. Four paper gates were green but ran only when a human invoked them, so nothing would have noticed a regression between sessions. This appends ONE line per beat naming every gate's exit code, so "the gates are green" becomes a checkable record instead of a memory. Each gate is run through _offc/nx_sov_build_run.elf, which BUILDS then RUNS it and returns the gate's own exit code -- so the beat also proves the lane still COMPILES, not merely that a stale binary still passes. Runs from the build root (chdir'd if present). nx_papers_beat [logpath] default knowledge/status/papers_beat.log exit 0 = every gate GREEN; 1 = at least one RED (the clock's caller can alarm on it) license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_papers_beat.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_chdir sys_mmap sys_mmap ↻ pbt_run sys_fork sys_mmap ↻ sys_openat_wr sys_dup3 sys_execve sys_exit sys_wait4 pbt_name bcat bcatn sys_mmap ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_write sys_close sys_exit ↻

structs

none

consts

22const PBT_MAGIC_1024: i64 = 1024
24const PBT_GATES: i64 = 5

functions

26func bw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
calls 1: sys_write
27func bslen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
28func bcat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64=0; var p: i64=o; while s[i]!=(0 as u8){ d[p]=s[i]; p=p+1; i=i+1 } return p }
called by 1: main
29func bcatn(d: *u8, o: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
41func pbt_run(name: *u8) -> i64
62func pbt_name(i: i64) -> *u8
called by 1: main
69func main(argc: i64, argv: *i64) -> i64