code wiki / _hdl_build / nx_engineer_reproduce.nx
nx_engineer_reproduce.nx
buildroot/runtime/_hdl_build/nx_engineer_reproduce.nx
about
nx_engineer_reproduce.nx -- the ENGINEER autonomously REPRODUCES Claude's fresh methods on NEW targets,
closing the training loop with ZERO Claude authoring the content. For each of the 5 fresh engineer methods
it EMITS a real .nx organ that genuinely APPLIES the method, GOD-BUILDS it (fork rv64im->nx_cc->nxasm, no
gcc), and keys on the emitted gate's OWN exit code. Each GREEN reproduction is a real compiled+asserting
organ on disk => nx_team_train re-grades ENGINEER toward 5/5. Emit/build pattern = the proven nx_god_cycle.
E0 find-existing-first -> check existence BEFORE authoring (dup REFUSE / novel ALLOW)
E1 extend-not-copy -> a base verdict + a RAISED bar that rejects a case the base accepted
E2 gate-with-liar-kill -> a verdict that FLIPS when its data is corrupted
E3 measured-exceed -> margin = improvements - regressions on a labeled set, liar-killed
E4 never-brick(#26) -> a hardware op without a never-brick proof is REJECTED despite good quality
Sovereign. license_tier: ORIGINAL
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
| 13 | const ER_MAGIC_4096: i64 = 4096 |
| 14 | const ER_MAGIC_8192: i64 = 8192 |
| 16 | const ER_RUNNER: *u8 = "_offc/nx_sov_build_run.elf" |
functions
| 18 | func ew(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 19 | func en(v: i64) -> i64 { if v==0 { sys_write(1,"0" as *u8,1); return 0 } var m: i64=v; if m<0 { sys_write(1,"-" as *u8,1); m=0-m } let t: *u8=sys_mmap(24); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } let o: *u8=sys_mmap(24); var w: i64=0; var q: i64=k-1; while q>=0 { o[w]=t[q]; w=w+1; q=q-1 } sys_write(1,o,w); return 0 } |
| 20 | func ecat(b: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var i: i64=0; while s[i]!=(0 as u8){ b[o]=s[i]; o=o+1; i=i+1 } return o } |
| 21 | func er_flush(path: *u8, b: *u8, len: i64) -> i64 { let fd: i64=sys_openat_wr(path, 420); if fd<0 { return 0-1 } sys_write(fd, b, len); sys_close(fd); return 0 } |
| 24 | func er_build(name: *u8) -> i64 |
| 41 | func er_emit_findfirst() -> i64 |
| 55 | func er_emit_extend() -> i64 |
| 71 | func er_emit_liarkill() -> i64 |
| 89 | func er_emit_measure() -> i64 |
| 134 | func er_emit_neverbrick() -> i64 |
| 150 | func er_one(label: *u8, name: *u8, emit_rc: i64) -> i64 |
| 157 | func main() -> i64 |