code wiki / (root) / nx_forge_model_gate.nx

nx_forge_model_gate.nx

buildroot/runtime/nx_forge_model_gate.nx

6286 B154 linesdepth 7pulls 13 transitivereach 0 importersview sourcekind gate/prooftopic forge
docsdependenciesstructsconstsfunctions

about

nx_forge_model_gate.nx -- gate for the F3 rung-2 model backend (nx_forge_model.nx). Proves the model-stage mechanics sovereignly, no external model: T1 extract+strip from the canned /gen JSON fixture -> valid program bytes (fences gone) T2 NEG malformed response (no "text") -> fm_extract_text returns -1 T3 prompt compose -> contains a pack marker AND the task statement T4 LIVE loopback: fork an in-process stub serve, POST /gen to 127.0.0.1, extract -> program T5 INTEGRATION: the extracted program -> candidate file -> fg_run judges it GREEN byte-exact T6 fence-strip idempotent on unfenced text (no-op) license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_forge_model.nx nx_gate_verdict.nx nx_forge_model_gate.nx

imports: nx_forge_model.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 fm_extract_text std_slen fm_hexval fm_strip_fences std_slen ↻ std_puts std_slen ↻ sys_write std_pdec sys_mmap std_itoa sys_mmap ↻ sys_write ↻ std_putln std_puts ↻ fmg_write sys_openat_wr fc_wb sys_write ↻ fm_compose_prompt sys_read sys_fork fm_stub_serve_once sys_socket sys_bind sys_listen sys_accept sys_read ↻ std_itoa ↻ sys_sleep_ms sys_mmap ↻ sys_munmap fm_build_gen_body fc_json_esc_bytes std_itoa ↻ fm_post_gen sys_socket ↻ nx_http_client_sockaddr_ip nx_connect_bounded

structs

none

consts

13const FMG_PORT: i64 = 17719

functions

15func fmg_write(path: *u8, src: *u8, n: i64) -> i64
called by 1: main calls 2: sys_openat_wrfc_wb
23func main(argc: i64, argv: *i64) -> i64