code wiki / (root) / nx_cc_health.nx

nx_cc_health.nx

buildroot/runtime/nx_cc_health.nx

4781 B79 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic cc
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_cc_health.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 h_puts sys_write sys_mmap run_argv sys_fork sys_openat_wr sys_dup3 sys_mmap ↻ sys_execve sys_exit sys_wait4 file_has sys_openat_rd sys_mmap ↻ sys_read sys_close h_putn sys_mmap ↻ sys_write ↻ sys_exit ↻

structs

none

consts

9const H_MAGIC_1048576: i64 = 1048576
11const H_SHAPEPROBE: *u8 = "_offc/nx_shapeprobe.elf\x00"
12const H_BUILDRUN: *u8 = "_offc/nx_sov_build_run.elf\x00"
13const H_CAND: *u8 = "_offc/nx_shapeprobe_cand.elf\x00"
14const H_BUILDOUT: *u8 = "/tmp/cch_build\x00"
15const H_RUNOUT: *u8 = "/tmp/cch_run\x00"

functions

17func 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 }
called by 1: main calls 1: sys_write
18func 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 }
called by 1: main calls 2: sys_mmapsys_write
21func run_argv(path: *u8, argv: *i64, outpath: *u8) -> i64
36func file_has(path: *u8, needle: *u8) -> i64
53func main() -> i64