code wiki / (root) / nx_gate_runner.nx

nx_gate_runner.nx

buildroot/runtime/nx_gate_runner.nx

18505 B294 linesdepth 7pulls 8 transitivereach 0 importersview sourcekind tooltopic gate
docsdependenciesstructsconstsfunctions

about

nx_gate_runner.nx -- SOVEREIGN gate runner (NishiLang, no .sh, no grep). The operator's cardinal: tooling surfaces are sovereign NishiLang, never shell glue. The GATES are already NishiLang -- each gate-test .nx self-asserts and its EXIT CODE is the verdict (0 = PROVEN). The .sh wrappers (compile + run + grep) were the non-sovereign part. This replaces them: it compiles each gate .nx + runs it + reads the exit code, all in NishiLang (raw syscalls). It is what nx_engineer/nx_conductor should dispatch instead of bashing a .sh. Build oracles (as/ld) are fork+exec'd here as tolerated Wheeler oracles (being replaced by nxasm/nxld); the ORCHESTRATION + VERDICT are fully sovereign. Composes nx_run_timeout (hang-safe final run). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_run_timeout.nx nx_gate_discover.nx nx_gate_runner.nx

imports: nx_run_timeout.nxnx_gate_discover.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gr_puts nx_gate_discover nx_dir_list nx_openat nx_dirent_read nx_dirent_iter nx_dir_is_dotlike nx_dir_name_strlen nx_dir_arena_copy_name gd_suffix gd_strlen nx_dir_row_at nx_dir_row_is_regular_file nx_dir_name_ends_with gd_arena_append gr_putn gr_static_has gr_basename gd_streq gr_gate gr_run sys_fork sys_openat_wr sys_dup3 sys_execve sys_wait4 wait_exit_code nx_run_timeout sys_now_ms sys_mmap sys_clock_gettime_mono sys_fork ↻ sys_openat_wr ↻ sys_dup3 ↻ nx_rt_alarm sys_execve ↻ sys_exit sys_mmap ↻ sys_wait4 ↻

structs

none

consts

17const GR_CC: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/_offc/nx_cc_known_good.elf"
18const GR_AS: *u8 = "/usr/bin/as"
19const GR_LD: *u8 = "/usr/bin/ld"
20const GR_S: *u8 = "/tmp/nx_gr.s"
21const GR_O: *u8 = "/tmp/nx_gr.o"
22const GR_ELF: *u8 = "/tmp/nx_gr.elf"
23const GR_RUN_TIMEOUT_MS: i64 = 60000
24const GR_MODE: i64 = 420
35const STATIC_N: i64 = 37 // 25 base + 12 sovereign QUIC transport gates (R1-R7 + R8a FEC + R8b relay)
37const GR_HDL_DIR: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/_hdl_build"
40const GR_UNION_CAP: i64 = STATIC_N + NX_GD_MAX_GATES // 25 + 256
48const GR_QT_BUILD_HI: i64 = 0 - 1 // -1, -2, -3 are build-stage failures (rc <= -1, >= -3)
49const GR_QT_BUILD_LO: i64 = 0 - 3
84const GR_BUILD_RETRIES: i64 = 3

functions

51func 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 }
called by 1: main
52func gr_putn(n: i64) -> i64
called by 1: main
64func gr_run(path: *u8, argv: *i64, envp: *i64, out_path: *u8) -> i64
85func gr_gate(testnx: *u8) -> i64
called by 1: main calls 2: gr_runnx_run_timeout
121func gr_basename(path: *u8) -> *u8
called by 1: gr_static_has
133func gr_static_has(sgates: *i64, sn: i64, name: *u8) -> i64
called by 1: main calls 2: gr_basenamegd_streq
143func main() -> i64