nx_langdiag_gate.nx
buildroot/runtime/nx_langdiag_gate.nx
about
nx_langdiag_gate.nx -- THE LANGUAGE-DIAGNOSTIC PROBE CORPUS, RUN NATIVELY (2026-08-14).
WHY THIS EXISTS. Every language probe shipped 2026-08-13 was driven by a hand-written shell
script under _ops/ -- build, run, grep, eyeball. That is the break-glass shape the estate's own
law forbids (NishiLang for everything; shell only to LAUNCH a sovereign ELF), and it carried a
measured weakness the shell could not fix:
THE BASH GAUNTLET'S CCFAIL CELLS ASSERT ONLY *THAT* A PROBE WAS REFUSED, NEVER *WHY*.
They check the emitted .s is empty. A refusal for a COMPLETELY DIFFERENT reason -- a typo in
the probe, an unrelated regression, a parser desync -- passes them silently. That is the
"a suite that only asks 'was it refused?' is blind by construction" failure this estate
already paid for once on the SSRF deny-tests.
This gate fixes it by composing the INCUMBENT base class rather than adding a second ruler:
nx_gate_lib's gl_case forks a real organ and asserts BOTH the exit code AND a required output
substring. Here the forked organ is the LIVE sovereign compiler and the substring is the
DISTINCTIVE PHRASE of the rule under test -- usually its capability= slug. So a refusal now has
to be the RIGHT refusal, and a compiler that refused everything generically fails this gate.
BITE-PROVEN 2026-08-14: planting a slug the rule never prints yields
FAIL const-overshift-refused-by-name exit=2 want_exit=2 want=<planted>
-- the EXIT CODE MATCHED and the REASON DID NOT, which is exactly the case a CCFAIL cell passes.
ACCEPT cases are equally load-bearing: they assert exit 0 AND a real assembly marker, because a
compiler that emitted NOTHING and exited 0 would pass an exit-code-only check. And they are the
discrimination control -- without them, a compiler that refuses every input passes every
refusal row above (bite-proven: pointing an accept row at a refusing probe goes RED).
SUBJECT: the compiler at _offc/nx_cc_sovereign.elf, i.e. the artifact that actually ships.
2026-09-02 (debt 1788309098 adjudicated): the gate read RED 9/11 from 2026-08-25 to 2026-09-02 on a
compiler that was CORRECT -- LN15 turned its two multi-line refusal witnesses into valid programs.
The two rules survive on irreducible witnesses (nx_probe_opstart_live, nx_probe_lone_operator) and
the joined forms moved to the acceptance side. A fixture that stops reaching its condition is the
quietest way a conformance case goes vacuous; the receipt for this repair is in lang.gates.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_lib.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
structs
| none |
consts
| 47 | const LDG_PB: i64 = 65536 |
| 48 | const LDG_EXIT_UNRESOLVED: i64 = 3 |
functions
| 51 | func ldg_have(p: *u8) -> i64 |
| 67 | func ldg_resolve_subject(cc: *u8) -> i64 |
| 78 | func ldg_row(nm: *u8, src: *u8, want_exit: i64, want: *u8, |
| 87 | func ldg_refuse(nm: *u8, src: *u8, want: *u8, counts: *i64, ctr: *i64, pb: *u8, po: i64) -> i64 |
| 91 | func ldg_accept(nm: *u8, src: *u8, counts: *i64, ctr: *i64, pb: *u8, po: i64) -> i64 |
| 95 | func main() -> i64 |