nx_gate_bite_gate.nx
buildroot/runtime/nx_gate_bite_gate.nx
about
nx_gate_bite_gate.nx -- THE GATE FOR THE MUTATION HARNESS ITSELF (2026-08-25).
SUBJECT: the nx_gate_bite ELF, forked for real against a fixture .nx written into a fresh run directory
(/tmp/nx_gate_bite_gate/r<usec>/), so this gate is idempotent by construction and nothing it measures was
inherited from an earlier run. Substitutable: argv[1] overrides the subject path -- which is exactly the
addressing nx_gate_bite's own `subject <target>` mode requires of the gates it bites, so this gate can be
bitten by the very capability it proves.
WHY THESE TEETH. nx_gate_bite gained a `subject <subject_target>` argument on 2026-08-25 because without
it the harness ALWAYS rebuilt the GATE and never the SUBJECT. For the 152 end-to-end gates in the estate
that meant every mutant returned NOT-REACHED, and a bite of the gate's own source returned a clean
verdict=GREEN that reads exactly like a subject proof and is not one. MEASURED before the fix on
nx_communitypulse_gate: 10 mutants, 10 NOT-REACHED, valid_mutants=0. After: valid_mutants=1, killed=1.
So this gate holds the NEW grammar to its documented shape and holds the OLD grammar unchanged.
EVERY INVOCATION HERE IS BUILD-FREE ON PURPOSE. `aimlist` mutates nothing and builds nothing, and both
refusals fire before the baseline build, so this gate runs in milliseconds and can sit on the roster:
A GATE THAT OUTLIVES EVERY CALLER'S TIMEOUT IS INDISTINGUISHABLE FROM A GATE THAT EMITS NOTHING.
The gate target passed below DELIBERATELY DOES NOT EXIST -- if any of these paths ever started building,
this gate would fail loudly here instead of silently costing the roster minutes.
license_tier: ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_gate_green.nxnx_tool_run.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 28 | const GBG_SUBJECT_DEFAULT: *u8 = "_offc/nx_gate_bite.elf" |
| 29 | const GBG_DIR: *u8 = "/tmp/nx_gate_bite_gate" |
| 30 | const GBG_MODE_DIR: i64 = 493 // 0755 |
| 31 | const GBG_CAP: i64 = 262144 |
| 32 | const GBG_PATH_CAP: i64 = 512 |
| 33 | const GBG_ARGV_SLOTS: i64 = 16 |
| 34 | const GBG_WORD: i64 = 8 // sizeof(i64) |
| 35 | const GBG_LP_BYTES: i64 = 16 // two i64 slots for the capture length out-param |
| 36 | const GBG_NUM_BYTES: i64 = 32 |
| 37 | const GBG_ASCII_ZERO: i64 = 48 |
| 38 | const GBG_DECIMAL: i64 = 10 |
| 39 | const GBG_DEC_LAST: i64 = 9 |
| 42 | const GBG_RUN_TIMEOUT_MS: i64 = 60000 |
| 43 | const GBG_EXIT_OK: i64 = 0 |
| 44 | const GBG_EXIT_USAGE: i64 = 2 |
| 45 | const GBG_EXIT_AIM_ABSENT: i64 = 4 |
| 46 | const GBG_SITES_ARG: *u8 = "4" |
| 48 | const GBG_FIX_LEAF: *u8 = "nx_gbfixture.nx" |
| 49 | const GBG_FIX_TARGET: *u8 = "nx_gbfixture" |
| 50 | const GBG_FIX_FUNC: *u8 = "gbf_pick" |
| 51 | const GBG_ABSENT_FUNC: *u8 = "gbf_no_such_function" |
| 52 | const GBG_WRONG_TARGET: *u8 = "nx_not_the_fixture" |
| 53 | const GBG_FAKE_GATE: *u8 = "nx_gate_bite_gate_absent_probe" |
| 54 | const GBG_FIXTURE_TEXT: *u8 = "// fixture for nx_gate_bite_gate -- the numeric sites below are DELIBERATE.\nfunc gbf_pick(a: i64) -> i64 {\n if a > 37 { return 4211 }\n if a > 11 { return 909 }\n return 5\n}\nfunc gbf_other(b: i64) -> i64 { return b + 77 }\n" |
| 55 | const GBG_MARK_SITES: *u8 = "total_numeric_sites=" |
| 56 | const GBG_MARK_SUBJ: *u8 = "subject_target=" |
| 57 | const GBG_MARK_MISMATCH: *u8 = "NOTE subject-source-is-not-the-target" |
| 58 | const GBG_MARK_USAGE: *u8 = "usage: nx_gate_bite" |
| 59 | const GBG_MARK_GRAMMAR: *u8 = "[subject <subject_target>]" |
| 60 | const GBG_MARK_AIMABSENT: *u8 = "AIM-ABSENT" |
functions
| 65 | func gbg_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off + i] = s[i]; i = i + 1 } return off + i } |
| 66 | func gbg_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 76 | func gbg_path(dir: *u8, leaf: *u8) -> *u8 |
| 84 | func gbg_write_text(path: *u8, s: *u8) -> i64 |
| 94 | func gbg_nil() -> *u8 { return 0 as *u8 } |
| 98 | func gbg_run(subject: *u8, a1: *u8, a2: *u8, a3: *u8, a4: *u8, a5: *u8, a6: *u8, a7: *u8) -> i64 |
| 113 | func gbg_has(needle: *u8) -> i64 { return tr_contains(gbg_cap_g, gbg_len_g[0], needle) } |
| 118 | func gbg_num_after(needle: *u8) -> i64 |
| 140 | func main(argc: i64, argv: *i64) -> i64 |