code wiki / _hdl_build / nx_game_gate.nx

nx_game_gate.nx

buildroot/runtime/_hdl_build/nx_game_gate.nx

9708 B220 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic game
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_game_gate.nx

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

main sys_mmap sys_openat_wr sys_openat_append sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real gg_puts sys_write gg_module gg_gate_one sys_mmap ↻ gg_cat sys_openat_rd sys_close sys_openat_wr ↻ gg_run sys_fork sys_dup3 sys_execve sys_exit sys_mmap ↻ sys_wait4 gg_filesize sys_openat_rd ↻ sys_mmap ↻ sys_read sys_close ↻ gg_report sys_mmap ↻ gg_cat ↻ gg_cat_n sys_mmap ↻ sys_write ↻ gg_cat ↻ gg_cat_n ↻ sys_write ↻ sys_close ↻

structs

none

consts

23const GG_MIN_ASM_BYTES: i64 = 128
24const GG_MAX_RETRIES: i64 = 12

functions

26func 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 }
called by 1: main calls 1: sys_write
27func 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 }
30func 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 }
33func gg_cat_n(dst: *u8, off: i64, v: i64) -> i64
called by 2: gg_reportmain calls 1: sys_mmap
49func gg_run(path: *u8, argv: *i64, envp: *i64, redir_out: i64, redir_err: i64) -> i64
64func gg_filesize(path: *u8) -> i64
78func gg_module(i: i64) -> *u8
called by 1: main
108func gg_gate_one(name: *u8, compiler: *u8, envp: *i64, devnull: i64) -> i64
154func gg_report(logfd: i64, name: *u8, code: i64, ts: i64) -> i64
184func main(argc: i64, argv: *i64) -> i64