code wiki / _hdl_build / nx_papers_beat.nx
nx_papers_beat.nx
buildroot/runtime/_hdl_build/nx_papers_beat.nx
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
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
structs
| none |
consts
| 22 | const PBT_MAGIC_1024: i64 = 1024 |
| 24 | const PBT_GATES: i64 = 5 |
functions
| 26 | func 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 |
| 27 | func bslen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 28 | func 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 |
| 29 | func bcatn(d: *u8, o: i64, v: i64) -> i64 |
| 41 | func pbt_run(name: *u8) -> i64 |
| 62 | func pbt_name(i: i64) -> *u8 called by 1: main |
| 69 | func main(argc: i64, argv: *i64) -> i64 |