nx_cc_health.nx
buildroot/runtime/nx_cc_health.nx
about
nx_cc_health.nx -- SELF-HEALING COMPILER HEALTH WITNESS (the IMMUNIZE step + a machine-target the autonomy
engine drives). Runs the generate->build->run pipeline on a KNOWN-GOOD codegen shape (1000 distinct functions,
via nx_shapeprobe) and exits 0 IFF nx_cc still compiles it AND the program runs correct (prints FALLTHRU_OK).
Exits 1 (RED) if nx_cc regresses below that scale -- the permanent regression witness the fixed 10-row corpus
lacked. Because it's a clean exec-with-verified-exit, nx_exec_engine can drive it autonomously = the self-
healing compiler loop (generate -> detect -> witness) as an AUTONOMOUS capability. Composes _offc organs;
no Claude-touch of nx_cc (shared compiler = max blast, Engineer-owned). license_tier: ORIGINAL 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
| 9 | const H_MAGIC_1048576: i64 = 1048576 |
| 11 | const H_SHAPEPROBE: *u8 = "_offc/nx_shapeprobe.elf\x00" |
| 12 | const H_BUILDRUN: *u8 = "_offc/nx_sov_build_run.elf\x00" |
| 13 | const H_CAND: *u8 = "_offc/nx_shapeprobe_cand.elf\x00" |
| 14 | const H_BUILDOUT: *u8 = "/tmp/cch_build\x00" |
| 15 | const H_RUNOUT: *u8 = "/tmp/cch_run\x00" |
functions
| 17 | func h_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 18 | func h_putn(v: i64) -> i64 { let t: *u8=sys_mmap(24); var m: i64=v; var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} let o: *u8=sys_mmap(24); var i: i64=0; while i<k{o[i]=t[k-1-i];i=i+1} sys_write(1,o,k); return 0 } |
| 21 | func run_argv(path: *u8, argv: *i64, outpath: *u8) -> i64 |
| 36 | func file_has(path: *u8, needle: *u8) -> i64 |
| 53 | func main() -> i64 |