code wiki / (root) / nx_swebench_local_gate.nx

nx_swebench_local_gate.nx

buildroot/runtime/nx_swebench_local_gate.nx

6416 B103 linesdepth 6pulls 9 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_swebench_local_gate.nx -- grade our autonomous fix loop by SWE-BENCH'S OWN CONTRACT (operator 2026-07-16), NOW PUBLISHING THROUGH THE RIGOR ENVELOPE (autodev AD1, 2026-08-27). SWE-bench = 2,294 real GitHub-issue problems (500 human-verified) across real Python repos. The contract: an instance is RESOLVED iff, after the patch, FAIL_TO_PASS tests pass AND PASS_TO_PASS tests still pass. The test suite is the only judge. Our nx_autofix_auto loop already IS this contract sovereignly: a candidate's per-function grader rows are FAIL_TO_PASS (the located failing function) + PASS_TO_PASS (every other function). HONEST SCOPE: a sovereign NishiLang ANALOG under SWE-bench's contract and metric over OUR foreign-bug set -- NOT a run of SWE-bench's Python instances. WHAT CHANGED (2026-08-27): the D001 migration that shipped here set ctr[1] = the EPISODE COUNT of the newest batch, so wherever the ledger existed this gate printed "passed 4/14 verdict=RED" -- FOUR of its own teeth against FOURTEEN episodes, a denominator mismatch that read RED on a healthy loop. ★A GATE'S PASS/TOTAL IS ITS TOOTH COUNT, NEVER ITS SUBJECT'S POPULATION. It is now per-tooth gv_check, and the resolve rate is published as a gv_envelope STRUCT (k, n, Wilson + hierarchical bootstrap, seed, harness) rather than a bare percentage -- the same ruler /compare/autograde and /compare/gen now share. SKIP when the ledger is unreachable (a host without the fix-loop stage is not a failure). expect_exit: 0 license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_stage_path.nx nx_autofix_lib.nx nx_swebench_local_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_stage_path.nxnx_autofix_lib.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ gv_check gv_puts ↻ swb_resolved sys_mmap ↻ afl_ledger_read_path ep_artifact_path sys_openat_rd sys_close ep_join sp_path sp_root sp_resolve_root sp_env sys_openat_rd ↻ sys_mmap ↻ sys_read sys_close ↻ sp_match sp_take_value sp_slen

structs

none

consts

23const SWBL_ENV_BYTES: i64 = 128
24const SWBL_HARNESS: i64 = 128

functions

26func swb_resolved(f2p_now: i64, f2p_total: i64, p2p_now: i64, p2p_total: i64) -> i64
called by 1: main
32func main() -> i64