code wiki / (root) / nx_autograde_gate.nx

nx_autograde_gate.nx

buildroot/runtime/nx_autograde_gate.nx

14737 B314 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_autograde_gate.nx -- THE AUTONOMOUS TARGET GRADER (operator 2026-07-15: "we should get to autonomous grading so that compare works ... not self-driven by you or AI but just part of the nishi ecosystem that it's analyzing targets we set like gcc exceed and handling them with manual triggering via mcp and apis"). The problem it kills: grading driven by Claude (hand-editing matrices, eyeballing benches) is navel-gazing. This organ makes grading the ECOSYSTEM'S OWN job: it reads knowledge/autograde_targets.reg (the goals WE set -- data, operator-editable), then for each target MEASURES IT ITSELF -- either forks the bench fresh and parses its stdout, or grades the ecosystem's persisted ledger -- and emits MET / NOT-MET / UNMEASURED. It is manually triggerable (a workstream fires it via MCP/API). No Claude in the measurement loop. LOAD-BEARING ANTI-NAVEL-GAZING PROPERTY (by construction, gate-proven): a target with NO wired measurement grades UNMEASURED -- it can NEVER be reported MET without a real number. The grader measures reality; it cannot rubber-stamp a goal. And it must DISTINGUISH a met target from a not-met one (both present in the seed set), proving it grades the actual value, not a fixed verdict. T1 registry parsed (>=3 targets read as DATA) T2 measured >=2 targets with a REAL number (not everything unmeasured) T3 DISTINGUISHES reality: at least one MET and one NOT-MET (grades the value, does not rubber-stamp) T4 ANTI-NAVEL-GAZING: the unwired target (no ledger) grades UNMEASURED, NOT met -- no measurement => no credit T5 AUTONOMOUS FRESH RUN: the fork target actually executed (captured real stdout bytes), not asserted T6 PERSISTED graded verdicts to a durable autograde ledger (living trend) expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_tool_run.nx nx_gate_verdict.nx nx_autograde_gate.nx

imports: nx_tool_run.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 w sys_now_realtime_sec sys_mmap sys_clock_gettime_real sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close wn w ↻ fext pint_at slen streq tr_run_capture sys_mmap ↻ sys_pipe2 sys_fork sys_close ↻ sys_dup3 sys_execve_clean sys_close ↻ sys_execve sys_exit sys_read ↻ sys_wait4 wait_exit_code find_last slen ↻ bcat bcatn sys_openat_wr gv_ctr sys_mmap ↻ gv_verdict gv_puts sys_write

structs

none

consts

none

functions

25func w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: wnmain
26func wn(v: i64) -> i64
called by 1: main calls 1: w
39func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: find_lastmain
42func streq(a: *u8, b: *u8) -> i64
called by 1: main
56func fext(line: *u8, ls: i64, le: i64, k: i64, dst: *u8, dcap: i64) -> i64
called by 1: main
81func find_last(hay: *u8, hn: i64, needle: *u8) -> i64
called by 1: main calls 1: slen
98func pint_at(hay: *u8, hn: i64, p: i64) -> i64
called by 1: main
128func bcat(buf: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { buf[off+i] = s[i]; i = i + 1 } return off + i }
called by 1: main
129func bcatn(buf: *u8, off: i64, v: i64) -> i64
called by 1: main
140func main() -> i64