nx_code_review.nx
buildroot/runtime/nx_code_review.nx
about
nx_code_review.nx -- THE SOVEREIGN AUTOMATED CODE REVIEW COORDINATOR.
Operator 2026-07-06: "make sure our nishi ecosystem has [en.wikipedia.org/wiki/Automated_code_review]
as part of its state-of-the-art evaluator that is running." This organ answers that, prove-not-assert.
GROUNDING (Rule 4, from the article itself): Automated code review = software tools that assist or fully
automate reviewing SOURCE for defects, style/convention violations, security vulnerabilities, and
maintainability -- overlapping static analysis / linting, enforcing coding conventions and architecture
constraints, run in the IDE and in CI, COMPLEMENTING (not replacing) manual review. THIS organ maps every
one of those axes to the Nishi organ that already implements it, PROVES each backing organ exists on disk
(opens the real file), then RUNS a live review (fork+exec the installed mechanical scanner) and requires its
own can-fail self-test to hold. So "we have automated code review, running" is DEMONSTRATED, not claimed.
COMPOSES, does not rebuild (Cardinal 15 / no-tool-proliferation): every axis points at an existing organ;
this is a thin COORDINATOR + census (the nx_standards_contract pattern: map -> enforcing organ, opened on
disk), NOT a new scanner. Emits the shared EVAL-COORD line (coverage=CODE-REVIEW) so the full-coverage
evaluator aggregator composes it beside nx_rung_eval (BOTTOM-UP), the top-down/UX evaluators, and the
deep-middle graders. license_tier: ORIGINAL expect_exit: 0
SOVEREIGN: syscalls only (nx_cc->nxasm), no gcc/bash/curl. The only bootstrap-tolerated dep is /dev/null as
a stdout sink for the silenced child (like /proc: fine until NishiOS ships a sovereign sink). Run from the
nxc2 root so the relative organ paths + the installed _offc/ scanner resolve.
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_itoa_lib.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
| 25 | const K_MAGIC_65536: i64 = 65536 |
| 26 | const K_MAGIC_2097152: i64 = 2097152 |
functions
| 28 | func cr_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 33 | func cr_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 38 | func cr_present(path: *u8) -> i64 |
| 51 | func cr_axis(axis: *u8, organ: *u8, note: *u8) -> i64 |
| 62 | func cr_read_file(path: *u8, buf: *u8, cap: i64) -> i64 |
| 78 | func cr_int_after(buf: *u8, n: i64, needle: *u8) -> i64 |
| 109 | func cr_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 123 | func cr_cat_run(mode: *u8, arg: *u8, tmp: *u8, buf: *u8, cap: i64) -> i64 called by 2: cr_scan_capturecr_audit calls 8: sys_forksys_openat_wrsys_dup3sys_mmapsys_execvesys_exit+2 |
| 140 | func cr_scan_capture(target: *u8, tmp: *u8, buf: *u8, cap: i64) -> i64 |
| 145 | func cr_scan_findings(target: *u8, tmp: *u8) -> i64 |
| 153 | func cr_nn(v: i64) -> i64 { if v < 0 { return 0 } return v } |
| 161 | func cr_gate(argc: i64, argv: *i64) -> i64 |
| 202 | func cr_audit(argc: i64, argv: *i64) -> i64 |
| 234 | func cr_run_elf(elf: *u8, tmp: *u8) -> i64 |
| 258 | func cr_nishisafety() -> i64 |
| 270 | func main(argc: i64, argv: *i64) -> i64 |