code wiki / _hdl_build / nx_gate_mutation_sweep.nx

nx_gate_mutation_sweep.nx

buildroot/runtime/_hdl_build/nx_gate_mutation_sweep.nx

31636 B581 linesdepth 5pulls 10 transitivereach 0 importersview sourcekind tooltopic gate
docsdependenciesstructsconstsfunctions

about

nx_gate_mutation_sweep.nx -- BATCH mutation-scoring across the gate universe (the liar-killer worklist engine for the sensor-gap program, [[project-nishi-sensor-gap-census-2026-07-14]]). usage: nx_gate_mutation_sweep <pair-budget> [mutants-per-pair] 0 = DRY RUN (list pairs only) DISCOVERY (mechanical, evidence-based -- the confirmed naming law): for every runtime/_hdl_build/ nx_X_gate.nx, the pair (subject=nx_X, gate=nx_X_gate) qualifies iff: * subject nx_X.nx exists (in _hdl_build or runtime/) * the gate actually IMPORTS the subject (runtime-built needle `import "nx_X.nx"`, quote bytes composed) * the gate is not RISKY (listeners/network/bench markers), not build-only, not infra, not known-broken (gatebase_*.tsv.refused marker) For each qualifying pair (budget-bounded, resumable): fork the installed probe _offc/nx_gate_mutation_probe.elf <subject> <gate> <mutants> -- it runs the identity control + evenly spread ROR/AOR mutants and prints the mutation score. This sweep captures the probe output, parses the LAST THREE ints (killed / total / survived), and BANKS: knowledge/status/mutscore_<subject>.tsv subject \t gate \t killed \t total \t survived knowledge/status/mutscore_<subject>.out the full probe transcript (survivor op+line = the worklist) Ledger existence = resume-skip. SURVIVORS never fail the sweep -- they ARE the product (ranked liar-killer worklist). Pipeline-RED pairs (identity fail etc.) are tallied as findings. Never-brick: writes only mutscore_* ledgers/transcripts (+the probe's own archived copies). Sovereign nx_cc->nxasm; CWD=nxc2 root. license_tier: ORIGINAL

dependencies 7 imports · 0 importers

syscalls.nx runtime.nx nx_dirent.nx nx_fcntl.nx nx_handoff_gate.nx nx_lease.nx nx_sov_ledger.nx nx_gate_mutation_sweep.nx

imports: syscalls.nxruntime.nxnx_dirent.nxnx_fcntl.nxnx_handoff_gate.nxnx_lease.nxnx_sov_ledger.nx

imported by: nobody (leaf or entry point)

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

main nx_openat sys_chdir sys_mmap ls_cat ls_catn sys_mmap ↻ ls_pid ls_acquire ls_mkdir sys_mmap ↻ ls_dirpath ls_cat ↻ ls_pid ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real ls_claim sys_mmap ↻ ls_cat ↻ ls_catn ↻ sys_now_realtime_sec ↻ sys_openat_wr sys_write sys_close sys_renameat ls_read sys_openat_rd sys_read sys_close ↻ ls_parse2 ls_stamp_path ls_cat ↻ ls_read ↻ ls_parse2 ↻ print strlen print_i64 itoa nx_dirent_read

structs

none

consts

34const MS_BUILDROOT: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot" as *u8
35const K_MAGIC_3600: i64 = 3600
36const K_MAGIC_16384: i64 = 16384
37const K_MAGIC_1048576: i64 = 1048576
38const K_MAGIC_1024: i64 = 1024

functions

40func ms_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: ms_has_cims_find
42func ms_lc(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c }
called by 1: ms_has_ci
44func ms_cat(dst: *u8, off: i64, s: *u8) -> i64
called by 1: main
50func ms_copyn(dst: *u8, src: *u8, n: i64) -> i64
called by 1: main
57func ms_num(dst: *u8, off: i64, n: i64) -> i64
70func ms_has_ci(buf: *u8, len: i64, ndl: *u8) -> i64
called by 1: ms_risky calls 2: ms_slenms_lc
87func ms_find(buf: *u8, len: i64, ndl: *u8) -> i64
called by 1: main calls 1: ms_slen
103func ms_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 1: sys_read
118func ms_write(path: *u8, buf: *u8, len: i64) -> i64
calls 1: sys_openat_wr
127func ms_risky(name: *u8, nlen: i64, buf: *u8, len: i64) -> i64
called by 1: main calls 1: ms_has_ci
145func ms_run_probe(subject: *u8, gatename: *u8, mstr: *u8, capfile: *u8, envp: *i64) -> i64
168func main(argc: i64, argv: *i64) -> i64