code wiki / _hdl_build / nx_gate_mutation_sweep.nx
nx_gate_mutation_sweep.nx
buildroot/runtime/_hdl_build/nx_gate_mutation_sweep.nx
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
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
structs
| none |
consts
| 34 | const MS_BUILDROOT: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot" as *u8 |
| 35 | const K_MAGIC_3600: i64 = 3600 |
| 36 | const K_MAGIC_16384: i64 = 16384 |
| 37 | const K_MAGIC_1048576: i64 = 1048576 |
| 38 | const K_MAGIC_1024: i64 = 1024 |
functions
| 40 | func ms_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 42 | func ms_lc(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c } called by 1: ms_has_ci |
| 44 | func ms_cat(dst: *u8, off: i64, s: *u8) -> i64 called by 1: main |
| 50 | func ms_copyn(dst: *u8, src: *u8, n: i64) -> i64 called by 1: main |
| 57 | func ms_num(dst: *u8, off: i64, n: i64) -> i64 |
| 70 | func ms_has_ci(buf: *u8, len: i64, ndl: *u8) -> i64 |
| 87 | func ms_find(buf: *u8, len: i64, ndl: *u8) -> i64 |
| 103 | func ms_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 118 | func ms_write(path: *u8, buf: *u8, len: i64) -> i64 calls 1: sys_openat_wr |
| 127 | func ms_risky(name: *u8, nlen: i64, buf: *u8, len: i64) -> i64 |
| 145 | func ms_run_probe(subject: *u8, gatename: *u8, mstr: *u8, capfile: *u8, envp: *i64) -> i64 |
| 168 | func main(argc: i64, argv: *i64) -> i64 |