nx_engine_dispatch_gate.nx
buildroot/runtime/nx_engine_dispatch_gate.nx
about
nx_engine_dispatch_gate.nx -- the REFEREE for nx_engine_dispatch (ES3 + ES16 of /compare/engineshift, 2026-09-02).
Drives the DEPLOYED dispatcher over fixture tasks and a FIXTURE SEAT the gate serves from its own forked process
(one canned /gen reply per fork, pure NishiLang, no model load), and asserts the ladder: the declared judge decides,
a C task never reaches the external tier, an unclassed task is REFUSED by name (never defaulted), an unreachable
ladder is UNOBSERVABLE never GREEN, nothing below the seat passing is NEEDS-FRONTIER, --dry forks nothing and writes
nothing, a failed scoreboard push never changes a verdict, and ES16: a class row resolves clearance, engine order and
the token ceiling from data, a C row that lists external is refused at load, a missing row is refused by name, and a
class that admits nothing below the seat hands off without touching any engine. Every ledger row is counted against
its denominator.
nx_engine_dispatch_gate [subject-elf] default _build/nx_engine_dispatch.sov.elf (cwd nxc2)
Fixture seats bind 127.0.0.1 on four distinct ports; a busy port is a named PRECONDITION, never a RED.
license_tier: ORIGINAL. Writes only under /tmp/nx_engine_dispatch_gate/. No hw writes.
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_gatekit_lib.nxnx_tool_run.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
| 18 | const MG_OUT: i64 = 65536 |
| 19 | const MG_I64: i64 = 8 |
| 20 | const MG_ARGV: i64 = 16 |
| 21 | const MG_TIMEOUT_MS: i64 = 30000 |
| 22 | const MG_REQ_CAP: i64 = 65536 |
| 23 | const MG_BODY_CAP: i64 = 4096 |
| 24 | const MG_READY_TRIES: i64 = 100 // readiness and reap are bounded: 100 x 20 ms = 2 s, then the fixture is declared absent |
| 25 | const MG_READY_STEP_MS: i64 = 20 |
| 26 | const MG_PORT_A: i64 = 18632 // canned "The answer is 42" |
| 27 | const MG_PORT_B: i64 = 18633 // canned "no idea" |
| 28 | const MG_PORT_C: i64 = 18634 // canned "The answer is 42" for the tclass tooth (own port so a lingering child cannot alias) |
| 29 | const MG_PORT_D: i64 = 18635 // canned "no idea" for the SKIPPED-by-flag tooth |
| 30 | const MG_SO_REUSEADDR_CALL: i64 = 208 // RV64 setsockopt const form (raw 54 collides in the translator) -- as the seat itself |
| 31 | const MG_LEDGER_ROWS: i64 = 16 // t42 1 + tkat 3 + t42-noext 2 + unreachable 1 + push-failed 1 + tcls 1 + tfront 3 + tnoloc 2 + mute 2 |
| 32 | const MG_ROOT: *u8 = "/tmp/nx_engine_dispatch_gate" |
| 33 | const MG_STATE: *u8 = "/tmp/nx_engine_dispatch_gate/state" |
| 34 | const MG_LEDGER: *u8 = "/tmp/nx_engine_dispatch_gate/state/engine_dispatch.jrnl" |
| 35 | const MG_PROMPT: *u8 = "/tmp/nx_engine_dispatch_gate/prompt.txt" |
| 36 | const MG_EXPECTED: *u8 = "/tmp/nx_engine_dispatch_gate/expected.txt" |
| 37 | const MG_CAND_GOOD: *u8 = "/tmp/nx_engine_dispatch_gate/cand_good.txt" |
| 38 | const MG_CAND_BAD: *u8 = "/tmp/nx_engine_dispatch_gate/cand_bad.txt" |
| 39 | const MG_T42: *u8 = "/tmp/nx_engine_dispatch_gate/t42.conf" |
| 40 | const MG_TKAT: *u8 = "/tmp/nx_engine_dispatch_gate/tkat.conf" |
| 41 | const MG_TMISS: *u8 = "/tmp/nx_engine_dispatch_gate/tmiss.conf" |
| 42 | const MG_TBAD: *u8 = "/tmp/nx_engine_dispatch_gate/tbad.conf" |
| 43 | const MG_TNOCLASS: *u8 = "/tmp/nx_engine_dispatch_gate/tnoclass.conf" |
| 44 | const MG_CLASSES: *u8 = "/tmp/nx_engine_dispatch_gate/classes.conf" |
| 45 | const MG_TCLS: *u8 = "/tmp/nx_engine_dispatch_gate/tcls.conf" |
| 46 | const MG_TFRONT: *u8 = "/tmp/nx_engine_dispatch_gate/tfront.conf" |
| 47 | const MG_TNOLOC: *u8 = "/tmp/nx_engine_dispatch_gate/tnoloc.conf" |
| 48 | const MG_TBADCLS: *u8 = "/tmp/nx_engine_dispatch_gate/tbadcls.conf" |
| 49 | const MG_TMISSING: *u8 = "/tmp/nx_engine_dispatch_gate/tmissing.conf" |
| 174 | const MG_PORT_E: i64 = 18636 // mute: accepts and closes without a body (the NO-REPLY tooth) |
functions
| 51 | func mg_run(elf: *u8, a1: *u8, a2: *u8, a3: *u8, a4: *u8, a5: *u8, a6: *u8, a7: *u8, a8: *u8, a9: *u8, a10: *u8, a11: *u8, out: *u8, outlen: *i64) -> i64 |
| 68 | func mg_serve_once(port: i64, canned: *u8) -> i64 |
| 142 | func mg_port_ready(port: i64) -> i64 |
| 159 | func mg_fork_seat(port: i64, canned: *u8) -> i64 |
| 175 | func mg_serve_mute(port: i64) -> i64 |
| 204 | func mg_fork_mute(port: i64) -> i64 |
| 218 | func mg_reap(pid: i64) -> i64 |
| 233 | func main(argc: i64, argv: *i64) -> i64 |