code wiki / _hdl_build / nx_gate_triage.nx
nx_gate_triage.nx
buildroot/runtime/_hdl_build/nx_gate_triage.nx
about
nx_gate_triage.nx -- TEAM-OWNED failure LOCALIZER for the game gate
(operator: "keep building the team to handle this autonomously").
Mechanizes the oracle-differential diagnosis ladder Claude ran by hand on
2026-06-09 (the tictactoe draw-detect hunt): for every gated module, build
the SAME compiler-emitted .s twice -- once with the sovereign assembler,
once with gcc (ORACLE USE ONLY, per the C-is-for-benchmarking law; gcc
never lands on a deploy path here) -- run both, and classify:
PASS : sovereign build exits 0
ASM-GAP : nxasm refuses the .s (encoding gap) or crashes
TOOLCHAIN-NXASM : sovereign build fails BUT gcc build of the SAME .s
passes -> the assembler mis-encoded something
COMPILER-OR-SOURCE : BOTH builds fail the same way -> the .s itself is
wrong (compiler bug) or the module's source is
COMPILE-FAIL : no usable .s after retries
One TRIAGE line per module -> stdout + /tmp/nishi_game_gate_triage.log.
The sentinel forks this automatically on REGRESSION, so a red beat arrives
pre-localized: the Engineer reads WHERE the bug lives, not just that one
exists. Usage: nx_gate_triage.elf [compiler] (default _offc, repo root).
license_tier: ORIGINAL Reuses the gg_ spine from nx_game_gate.
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
| 24 | const GT_MAGIC_4096: i64 = 4096 |
| 26 | const GT_MIN_ASM_BYTES: i64 = 128 |
| 27 | const GT_MAX_RETRIES: i64 = 12 |
| 92 | const GT_PASS: i64 = 0 |
| 93 | const GT_ASM_GAP: i64 = 1 |
| 94 | const GT_TOOLCHAIN_NXASM: i64 = 2 |
| 95 | const GT_COMPILER_OR_SOURCE: i64 = 3 |
| 96 | const GT_COMPILE_FAIL: i64 = 4 |
functions
| 29 | func gt_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 } |
| 30 | func gt_cat_n(dst: *u8, off: i64, v: i64) -> i64 |
| 43 | func gt_run(path: *u8, argv: *i64, envp: *i64, redir_out: i64, redir_err: i64) -> i64 |
| 58 | func gt_filesize(path: *u8) -> i64 |
| 70 | func gt_module(i: i64) -> *u8 called by 1: main |
| 98 | func gt_triage_one(name: *u8, compiler: *u8, envp: *i64, devnull: i64, sov_exit: *i64, ora_exit: *i64) -> i64 |
| 163 | func gt_report(logfd: i64, name: *u8, cls: i64, sov: i64, ora: i64, ts: i64) -> i64 |
| 188 | func main(argc: i64, argv: *i64) -> i64 |