nx_forge_repair.nx
buildroot/runtime/nx_forge_repair.nx
about
nx_forge_repair.nx -- the REPAIR CYCLE for the local coder (2026-07-16): take the best failed candidate
(compiled+ran but wrong bytes = the closest miss), feed back ONLY what the MACHINE knows -- the program, the
verdict "ran but wrong output", and the exact required output -- and ask the local 1.5B for a corrected
program. Judged by the same byte-exact lane; a ledger record (localpass=) is written ONLY on green.
Honesty: zero Claude-authored diagnosis in the prompt (no "you used undefined variables" hints); the model
gets the same feedback a CI system would give. Rides the disk KV snapshot (minipack prefix cached; only the
task+candidate+feedback suffix prefills). This is the autofix stage-4 shape: error -> regenerate.
argv: [1]=candidate path (default knowledge/forge/fix/cand_mpT1.nx) [2]=maxnew (default 300)
license_tier: ORIGINAL expect_exit: 0 (measurement organ)
dependencies 2 imports · 0 importers
imports: nx_nofloat_serve_core.nxnx_forge.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
| 12 | const K_MAGIC_65536: i64 = 65536 |
| 13 | const K_MAGIC_32768: i64 = 32768 |
| 14 | const K_MAGIC_16384: i64 = 16384 |
| 15 | const K_MAGIC_16000: i64 = 16000 |
| 16 | const K_MAGIC_30000: i64 = 30000 |
functions
| 18 | func rp_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 35 | func rp_cat(buf: *u8, o: i64, s: *u8) -> i64 called by 1: main |
| 43 | func rp_strip(src: *u8, n: i64, out: *u8) -> i64 called by 1: main |
| 86 | func rp_write(path: *u8, buf: *u8, n: i64) -> i64 |
| 100 | func main(argc: i64, argv: *i64) -> i64 |