code wiki / (root) / nx_autofix_auto_gate_t138.nx

nx_autofix_auto_gate_t138.nx

buildroot/runtime/nx_autofix_auto_gate_t138.nx

19253 B264 linesdepth 6pulls 10 transitivereach 0 importersview sourcekind tooltopic autofix
docsdependenciesstructsconstsfunctions

about

nx_autofix_auto_gate.nx -- TEETH FOR THE FIX LOOP'S M0 RULERS (autodev AD3/AD4/AD5/AD6/AD7, 2026-08-27). SUBJECT: nx_autofix_lib (the rulers nx_autofix_auto composes as af_episode_ledger, af_sandbox_root, af_null_control, af_admit_untrusted, af_intake_board), driven in-process over fixtures built at runtime under /tmp/nx_autofix_auto_gate/<epoch>/ -- a gate must never share a fixture with a production beat, and nothing here opens a production plane for write. END TO END WHERE IT COUNTS: the sandbox teeth really fork the sovereign build runner on a fixture candidate, so a green here means a candidate was compiled and judged INSIDE an isolated root on this host, under a wall deadline and resource limits, with the tree copy provably untouched. TEETH T1 fixture-reached-condition: the seeded bug REPRODUCES in the sandbox (FNRES dbl 0 2) T2 AD7 the tree copy is byte-identical after the sandbox build (never opened for write) T3 AD7 a fix applied INSIDE the sandbox is what the judge sees (all pass after the edit) T4 AD7 neg-control-deadline-kills-the-group: a spinning candidate is killed at the wall T5 AD4 null controls hold on a real bug: empty patch and a replayed foreign fix both stay RED T6 AD4 BITE: on a candidate that cannot fail, the empty patch scores GREEN and the batch is refused T7 AD5 ledger rows append as decided and the newest batch parses to k/n with clusters that SUM T8 AD5 the write path resolves without a literal (estate journal or the stage ledger, named) T9 AD6 a local row is admitted for a sandbox run T10 AD6 a pinned, merged external row is admitted as DATA ONLY T11 AD6 BITE: an unmerged external row is refused BY NAME while the merged one is not T12 AD6 neg-control-unpinned-and-malformed-refused T13 AD3 the intake plane over fixture sources: partition sums, RED gate present, GREEN gate refused T14 AD3 neg-control-green-before-refused: the GREEN-before gate is absent from the plane rows T15 conf: the sandbox bounds come from knowledge/autofix.conf (or the announced defaults) and are > 0 license_tier: ORIGINAL Fixtures under /tmp only. No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_autofix_lib_t138.nx nx_autofix_auto_gate_t138.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_autofix_lib_t138.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_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_mkdir sys_mmap ↻ afl_cat afl_catn sys_mmap ↻ sys_munmap ag_join afl_cat ↻ ag_write sys_openat_wr afl_slen sys_write ↻ sys_close afl_copyfile sys_mmap ↻ sys_read_file sys_openat_rd

structs

none

consts

33const AG_DIR: *u8 = "/tmp/nx_autofix_auto_gate/"
34const AG_PATH: i64 = 4096
35const AG_CAP: i64 = 65536
36const AG_LINE: i64 = 2048
37const AG_TS_MAGIC: i64 = 1787000000 // fixture ledger timestamps: two batches, the newer wins
38const AG_FX_MS_FLOOR: i64 = 200 // the spin wall can never be below two poll ticks

functions

40func ag_write(path: *u8, text: *u8) -> i64
48func ag_join(dst: *u8, dir: *u8, name: *u8) -> i64 { var o: i64 = afl_cat(dst, 0, dir); return afl_cat(dst, o, name) }
called by 1: main calls 1: afl_cat
50func main() -> i64