code wiki / (root) / nx_forge_loop_gate.nx

nx_forge_loop_gate.nx

buildroot/runtime/nx_forge_loop_gate.nx

8938 B183 linesdepth 8pulls 14 transitivereach 0 importersview sourcekind gate/prooftopic forge
docsdependenciesstructsconstsfunctions

about

nx_forge_loop_gate.nx -- gate for the A1 closed maker-checker loop (nx_forge_loop). Deterministic, NO model: a forked stub maker (socket bound+listening BEFORE fork = raceless) serves scripted /gen responses per cycle and CAPTURES each request body, proving: T1 GREEN@1 passthrough: good candidate -> rc=1 T1b cycle-1 request carries NO repair header (clean first prompt) T2 REPAIR CONVERGENCE: cycle1 = let-reassign BUILD-FAIL (the 1.5B fbench-T2 failure class; the compiler names the fix) -> cycle2 = fixed candidate -> rc=2 T2b cycle-2 request MUST carry "PRIOR ATTEMPT FAILED" + the verbatim compiler word ("reassign") = the little-coder +18% retry lever, mechanized and asserted T3 NEG: a maker that IGNORES the repair ctx (same broken candidate every cycle) must NOT converge -> rc=-21 (anti-rubber-stamp tooth) T4 NEG: no serve listening -> rc=-30 (fail-loud, no silent fallback) Fixture /gen JSONs are BUILT at gate time from the fixture .nx programs via fc_json_esc_bytes (always in sync with the sources). license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_forge_loop.nx nx_gate_verdict.nx nx_forge_loop_gate.nx

imports: nx_forge_loop.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main std_putln std_puts std_slen sys_write flpg_mkjson fc_json_esc_bytes sys_openat_wr fc_wb sys_write ↻ flpg_case flpg_bind sys_socket sys_bind sys_listen sys_fork flpg_serve sys_accept sys_read sys_openat_wr ↻ fc_wb ↻ std_itoa sys_mmap flp_run std_slen ↻ fg_mkpath sys_openat_wr ↻ std_puts ↻ std_pdec sys_mmap ↻ std_itoa ↻ sys_write ↻ flp_cycle fm_compose_prompt sys_read ↻ flp_build_gen_body fm_build_gen_body fc_json_esc_bytes ↻ std_itoa ↻ std_itoa ↻

structs

none

consts

none

functions

19func flpg_bind(port: i64) -> i64
38func flpg_serve(lfd: i64, n: i64, resps: *i64, caps: *i64) -> i64
75func flpg_mkjson(progpath: *u8, outpath: *u8) -> i64
98func flpg_case(organ: *u8, n: i64, resps: *i64, caps: *i64, port: i64, maxc: i64) -> i64
117func flpg_cap_has(cappath: *u8, needle: *u8) -> i64
called by 1: main calls 1: std_slen
126func main(argc: i64, argv: *i64) -> i64