code wiki / _hdl_build / nx_game_gate.nx
nx_game_gate.nx
buildroot/runtime/_hdl_build/nx_game_gate.nx
about
nx_game_gate.nx -- TEAM-OWNED re-runnable evidence gate for the game-engine
substrate (operator: "keep building the team to build this"). Builds and
runs every game-substrate test module through the SOVEREIGN pipeline
(nx_cc -> nxasm_x86_main -> run, no gcc/sh) and emits one structured
verdict line per module, judged by RAW wait4 status (signal-aware), so the
grade can never come from a lying $? channel (see
feedback-wsl-exit-code-judging-2026-06-09) nor from LLM assertion (see
feedback-evidence-driven-live-grading). Appends every line to
/tmp/nishi_game_gate.log so grades are LIVE + auditable.
Usage:
nx_game_gate.elf # compiler = _offc/nx_cc_sovereign.elf
nx_game_gate.elf /path/to/nx_cc.elf # explicit compiler (e.g. a candidate
# build under test, or the gcc-linked
# oracle scaffold while the nxasm
# capacity fix is pending)
Run from the nxc2 repo root (paths are root-relative like nx_sov_build_run).
Exit code = number of FAILED modules (0 = substrate green).
license_tier: ORIGINAL Reuses the _run spine from nx_sov_build_run.
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
| 23 | const GG_MIN_ASM_BYTES: i64 = 128 |
| 24 | const GG_MAX_RETRIES: i64 = 12 |
functions
| 26 | func gg_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 27 | func gg_putn(v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=48+(m%10); m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(1, bb, k); return 0 } |
| 30 | func gg_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i } |
| 33 | func gg_cat_n(dst: *u8, off: i64, v: i64) -> i64 |
| 49 | func gg_run(path: *u8, argv: *i64, envp: *i64, redir_out: i64, redir_err: i64) -> i64 |
| 64 | func gg_filesize(path: *u8) -> i64 |
| 78 | func gg_module(i: i64) -> *u8 called by 1: main |
| 108 | func gg_gate_one(name: *u8, compiler: *u8, envp: *i64, devnull: i64) -> i64 |
| 154 | func gg_report(logfd: i64, name: *u8, code: i64, ts: i64) -> i64 |
| 184 | func main(argc: i64, argv: *i64) -> i64 |