code wiki / (root) / nx_code_review.nx

nx_code_review.nx

buildroot/runtime/nx_code_review.nx

25091 B340 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic code
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_itoa_lib.nx nx_code_review.nx

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

main cr_streq cr_puts sys_write sys_exit cr_gate cr_puts ↻ sys_mmap cr_scan_capture cr_cat_run sys_fork sys_openat_wr sys_dup3 sys_mmap ↻ sys_execve sys_exit ↻ sys_wait4 cr_read_file sys_openat_rd sys_read sys_close cr_nn cr_int_after cr_putn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap sys_exit ↻ cr_audit cr_puts ↻ sys_mmap ↻ cr_cat_run ↻ cr_int_after ↻ sys_exit ↻ cr_nn ↻ cr_putn ↻ cr_nishisafety

structs

none

consts

25const K_MAGIC_65536: i64 = 65536
26const K_MAGIC_2097152: i64 = 2097152

functions

28func 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 }
33func cr_putn(v: i64) -> i64 { nxi_out(v); return 0 }
38func cr_present(path: *u8) -> i64
51func cr_axis(axis: *u8, organ: *u8, note: *u8) -> i64
called by 1: main calls 2: cr_presentcr_puts
62func cr_read_file(path: *u8, buf: *u8, cap: i64) -> i64
78func cr_int_after(buf: *u8, n: i64, needle: *u8) -> i64
109func cr_streq(a: *u8, b: *u8) -> i64
called by 1: main
123func cr_cat_run(mode: *u8, arg: *u8, tmp: *u8, buf: *u8, cap: i64) -> i64
140func cr_scan_capture(target: *u8, tmp: *u8, buf: *u8, cap: i64) -> i64
called by 2: cr_scan_findingscr_gate calls 1: cr_cat_run
145func cr_scan_findings(target: *u8, tmp: *u8) -> i64
153func cr_nn(v: i64) -> i64 { if v < 0 { return 0 } return v }
called by 2: cr_gatecr_audit
161func cr_gate(argc: i64, argv: *i64) -> i64
202func cr_audit(argc: i64, argv: *i64) -> i64
234func cr_run_elf(elf: *u8, tmp: *u8) -> i64
258func cr_nishisafety() -> i64
270func main(argc: i64, argv: *i64) -> i64