code wiki / (root) / nx_autofix_intake_gate.nx

nx_autofix_intake_gate.nx

buildroot/runtime/nx_autofix_intake_gate.nx

13045 B204 linesdepth 6pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic autofix
docsdependenciesstructsconstsfunctions

about

nx_autofix_intake_gate.nx -- THE FOREIGN-BUG INTAKE GATE (2026-07-16; envelope + untrusted-input admission added autodev AD3/AD6, 2026-08-27). Any lane appends `name|path[|origin=external|prov=h..| merged=yes]` rows to knowledge/forge/fix/mut_proposed.txt; this gate ADMITS each (deny by default), BUILDS+RUNS every LOCAL row in a SANDBOX and keeps only instances whose bug REPRODUCES (>=1 failing FNRES row) -- the equivalent-mutant discipline. EXTERNAL rows are DATA-ONLY (provenance-pinned AND maintainer-merged) and are NEVER built or run; anything else is refused BY NAME. Output: knowledge/forge/fix/mut_manifest.txt (nx_autofix_auto's episode list of LOCAL, reproducing instances). WHY THE REWRITE: the old gate exited 1 RED with no proposal plane (there was no mut_proposed.txt), and it built each candidate in place with no untrusted-input admission -- the two sev-8 poisoning rows (1784661149, 1784661346) demand deny-by-default before any ingestion. It now composes nx_autofix_lib: one admission ruler, one sandbox, one FNRES reader -- shared with the loop and the auto gate so they cannot disagree. SKIP (gv_need) when the proposal plane is absent: a host with no plane is not a failure. TEETH T0 precondition: the proposal plane resolves (else SKIP, never a false RED) T1 parsed >=1 proposed row T2 kept >=1 reproducing LOCAL instance T3 DISCARD TOOTH: the deliberate equivalent mutant (nx_autofix_mut_eqv, all-pass) is ABSENT from output T4 ADMISSION: a planted unmerged EXTERNAL row is refused BY NAME and never built (neg-control) T5 the verified manifest is written and every kept row was BUILT+RUN inside a sandbox (tree untouched) expect_exit: 0 license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_estate_path.nx nx_autofix_lib.nx nx_autofix_intake_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_estate_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 ↻ sys_mmap ↻ ep_artifact_path sys_openat_rd sys_close ep_join afl_exists sys_openat_rd ↻ sys_close ↻ gv_need gv_puts ↻ gv_verdict gv_note_bare_rate gv_bare_rate gv_at gv_obj_has_n gv_at ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻

structs

none

consts

28const AIG_CAP: i64 = 1048576
29const AIG_OUT: i64 = 65536
34const AIG_TAIL: i64 = 240 // bytes of grader output carried on a NO-FNRES discard (the cause, not the whole log)
35const AIG_PROPOSED: *u8 = "knowledge/forge/fix/mut_proposed.txt"
36const AIG_MANIFEST: *u8 = "knowledge/forge/fix/mut_manifest.txt"
41const AIG_BUILDER_ADMIT_REFUSED: i64 = 6

functions

32func has_failing(cap: *u8, n: i64, namebuf: *u8) -> i64 { return afl_fn_failing(cap, n, namebuf) }
called by 1: main calls 1: afl_fn_failing
43func main(argc: i64, argv: *i64) -> i64