nx_langspec_gate.nx
buildroot/runtime/nx_langspec_gate.nx
about
nx_langspec_gate.nx -- THE REFEREE for lang.plan rung LR5 (written specification plus conformance
suite, watch symbol spec_conformance_run).
THE ROW NAMES ONE TOOTH AND THIS GATE IS BUILT AROUND IT: "a planted deviation goes RED". A
conformance runner that cannot fail is a certification costume, so the load-bearing question is not
whether the suite passes -- it is whether the runner would NOTICE if the compiler stopped obeying
the specification. That is asserted here by PLANTING a divergence between a written clause and the
shipped compiler and requiring the runner to report DEVIATION and name the case.
FIXTURES ARE ASSEMBLED AT RUNTIME into /tmp/nx_langspec_gate/, never committed beside the organ:
a gate that shares a fixture with a production beat measures the fixture, and a detector that scans
source finds its own fixture. The fixture spec, its three suites and its OWN conf are written here
by this gate on every run, so the gate carries its own thresholds and never has to lower the live
coverage ratchet to make its fixtures pass -- lowering the production floor to fit a test is
editing the detector to flatter the measurement.
WHY A SEPARATE CONF FIXTURE MATTERS. The production ratchet stands at full coverage. A fixture spec
deliberately carries one clause NO case exercises, because the unexercised list is the rung's real
deliverable and a list that is always empty cannot be shown to work. Its own conf sets a floor the
fixture meets, so the two facts stay independent.
SUBJECT: the SHIPPED runner (nx_langspec.elf, resolved from the cwd or from _offc/), driving the
SHIPPED compiler. Nothing here simulates either. The absent-compiler control proves it: point the
runner at a compiler that does not exist and it must ABSTAIN, not acquit and not convict.
exit: gv_verdict (0 GREEN / 1 RED / 3 SKIP). license_tier: ORIGINAL. No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_ccgate_lib.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
| 31 | const LG_DIR: *u8 = "/tmp/nx_langspec_gate\x00" |
| 32 | const LG_CC: *u8 = "_offc/nx_cc_sovereign.elf\x00" |
| 33 | const LG_CC_ABSENT: *u8 = "_offc/nx_cc_this_compiler_does_not_exist.elf\x00" |
| 34 | const LG_PROD_SPEC: *u8 = "knowledge/specs/nishilang.spec\x00" |
| 35 | const LG_PROD_SUITE: *u8 = "knowledge/specs/nishilang.suite\x00" |
| 36 | const LG_PROD_CONF: *u8 = "knowledge/specs/nishilang_conformance.conf\x00" |
| 37 | const LG_ARGV_SLOTS: i64 = 8 |
| 38 | const LG_EXIT_CONFORMANT: i64 = 0 |
| 39 | const LG_EXIT_DEVIATION: i64 = 1 |
| 40 | const LG_EXIT_UNOBSERVABLE: i64 = 3 |
| 41 | const LG_EXIT_EMPTY: i64 = 4 |
functions
| 43 | func lg_have(p: *u8) -> i64 |
| 50 | func lg_put(path: *u8, body: *u8) -> i64 |
| 63 | func lg_run(elf: *u8, verb: *u8, spec: *u8, suite: *u8, cc: *u8, conf: *u8, out: *u8) -> i64 |
| 78 | func main(argc: i64, argv: *i64) -> i64 |