code wiki / _hdl_build / nx_pm_sclass_loop.nx
nx_pm_sclass_loop.nx
buildroot/runtime/_hdl_build/nx_pm_sclass_loop.nx
about
nx_pm_sclass_loop.nx -- THE LIVE PM ITERATION (operator: "iterate with the team ... in a live fashion").
One pass of the PM's S-class-exceed program: (1) SWEEP+DISPATCH every ready program stream (lease -> run
its real evidence-gate -> complete iff GREEN -- the autonomous flow), then (2) print the PROGRAM CONVERGENCE
SCORECARD read straight from the registry (how many of the 10 gap-items the MACHINE has driven to DONE) +
live flow (hbm_scan) + Pillar-C reproduction (the team's census == the audit, from the converge log), then
(3) heartbeat the loop. Gate-shaped: GREEN iff a real program item was completed by the machine this pass,
the scorecard's done-count is honest (liar-kill: a known-ACTIVE item is NOT counted DONE), and the live
signals are real (neg-control). This is the loop that, run again and again, converges the team onto the audit.
DRY DEBT (noted): the sd_* dispatch helpers are copied from nx_sclass_dispatch_gate; next rung = extract a
shared nx_sclass_dispatch lib (no main) and import it from both. REUSE: ws_*/ws_put_locked, fl_*, hb/hbm.
license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_ws_cas.nxnx_arbiter.nxnx_heartbeat_str.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
| 15 | const LP_MAGIC_1024: i64 = 1024 |
| 16 | const LP_MAGIC_4096: i64 = 4096 |
| 17 | const LP_MAGIC_86400: i64 = 86400 |
| 19 | const LP_RUNNER: *u8 = "_offc/nx_sov_build_run.elf" |
| 20 | const LP_HBP: *u8 = "knowledge/status/wms_heartbeat.log" |
| 21 | const LP_CVLOG: *u8 = "knowledge/status/pm_sclass_converge.log" |
functions
| 23 | func lw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 24 | func lcat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var i: i64=0; while s[i]!=(0 as u8){ dst[o]=s[i]; o=o+1; i=i+1 } return o } |
| 25 | func lnum(dst: *u8, off: i64, v0: i64) -> i64 { var o: i64=off; var v: i64=v0; if v<0 {dst[o]=45 as u8;o=o+1;v=0-v} let t: *u8=sys_mmap(24); var k: i64=0; if v==0{t[0]=48 as u8;k=1} while v>0{t[k]=(48+(v-(v/10)*10)) as u8;v=v/10;k=k+1} var i: i64=0; while i<k{dst[o+i]=t[k-1-i];i=i+1} return o+k } |
| 26 | func ln(v: i64) -> i64 { let b: *u8=sys_mmap(24); let e: i64=lnum(b,0,v); sys_write(1,b,e); return 0 } |
| 27 | func lstreq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8){ if a[i]!=b[i]{return 0} i=i+1 } if b[i]!=(0 as u8){return 0} return 1 } |
| 28 | func lkey(id: *u8, out: *u8) -> i64 { out[0]=119 as u8; out[1]=115 as u8; out[2]=58 as u8; var k: i64=0; while id[k]!=(0 as u8){ out[3+k]=id[k]; k=k+1 } out[3+k]=0 as u8; return 3+k } |
| 30 | func lp_run_gate(name: *u8) -> i64 |
| 47 | func lp_organ_exists(name: *u8) -> i64 |
| 60 | func lp_field(id: *u8, f: i64, out: *u8) -> i64 |
| 68 | func lp_set_field5_done(id: *u8) -> i64 |
| 90 | func lp_set_code(id: *u8, newcode: *u8) -> i64 |
| 113 | func lp_dispatch(id: *u8) -> i64 |
| 128 | func lp_row(id: *u8, owner: *u8) -> i64 |
| 138 | func lp_pillarC_reproduced() -> i64 |
| 151 | func main() -> i64 |