code wiki / (root) / nx_forge_judge.nx

nx_forge_judge.nx

buildroot/runtime/nx_forge_judge.nx

6744 B172 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic forge
docsdependenciesstructsconstsfunctions

about

nx_forge_judge.nx -- FORGE-as-MCP: the DETERMINISTIC CHECKER exposed as a callable tool. The core of the operator's asymmetric vision (2026-07-13): Claude Code (haiku/whatever) is the Maker; our nishi coding model/organs are the domain kernel + CHECKER, engaged over MCP. This is the checker: given a NishiLang organ NAME (source already at runtime/<name>.nx, written by the caller e.g. via /api/srcwrite or the editor), it builds+runs through the SOVEREIGN LANE and emits a compact JSON verdict Claude can act on -- byte-exact GREEN is a PROVABLE equality (our exceed vs flaky-test verifiers). Optional argv[2] = expected-stdout-substring (byte check). usage: nx_forge_judge <organ> [expect-substring] emits: {"name":..,"built":0/1,"run_exit":N,"verdict":"GREEN|COMPILE-FAIL|RUN-FAIL|OUTPUT-MISS", "asm_bytes":N,"output":"<printable, truncated>"} Sovereign (syscalls only), single fork of _offc/nx_sov_build_run.elf. license_tier: ORIGINAL expect_exit: 0 (the TOOL succeeds even when the judged organ fails -- the verdict is the payload)

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_lib_std.nx nx_forge_judge.nx

imports: nx_syscalls.nxnx_lib_std.nx

imported by: nobody (leaf or entry point)

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

main std_putln std_puts std_slen sys_write sys_exit sys_fork sys_openat_wr sys_dup3 sys_mmap sys_execve sys_wait4 sys_openat_rd sys_read sys_close fj_contains std_slen ↻ std_scopy std_itoa sys_mmap ↻ fj_jesc sys_write ↻

structs

none

consts

15const K_MAGIC_1048576: i64 = 1048576
16const K_MAGIC_1048575: i64 = 1048575
17const K_MAGIC_262144: i64 = 262144
18const K_MAGIC_3000: i64 = 3000

functions

20func fj_contains(buf: *u8, n: i64, pat: *u8) -> i64
called by 1: main calls 1: std_slen
43func fj_jesc(out: *u8, off: i64, src: *u8, n: i64, cap: i64) -> i64
called by 1: main
65func main(argc: i64, argv: *i64) -> i64