nx_gate_run.nx
buildroot/runtime/nx_gate_run.nx
about
nx_gate_run.nx -- SOVEREIGN gate runner: build an organ through the sovereign lane, run it, and check its
output/exit -- with NO shell and NO .sh wrapper. Retires the simple bench/gate_*.sh pattern (which does
compile-via-nx_compile_x86_native + as + ld + run + grep, all under a /bin/bash script) by composing a single
fork+exec of _offc/nx_sov_build_run.elf <organ> (itself the sovereign compile+assemble+run) plus a substring
check on the captured output. This is the enabling primitive for migrating nx_engineer's gates off /bin/bash
(the agent-sovereignty debt: nx_engineer.nx runs its 7 gate scripts via a shell; nx_conductor_live already
went sovereign). Run from the nxc2 root so the relative organ paths + the installed runner resolve.
Usage: nx_gate_run <organ> [expect-substring]
PASS (exit 0) iff the build+run did not crash AND (an expect string was given AND the captured output
contains it) OR (no expect string AND the run exited 0). FAIL (exit 1) otherwise. Sovereign (syscalls
only). license_tier: ORIGINAL expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| 14 | const K_MAGIC_1048576: i64 = 1048576 |
functions
| 16 | func gr_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 17 | func gr_putn(v: i64) -> i64 |
| 28 | func gr_read_file(path: *u8, buf: *u8, cap: i64) -> i64 |
| 42 | func gr_contains(buf: *u8, n: i64, pat: *u8) -> i64 called by 1: main |
| 55 | func main(argc: i64, argv: *i64) -> i64 |