code wiki / (root) / nx_engineer.nx

nx_engineer.nx

buildroot/runtime/nx_engineer.nx

8376 B156 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic engineer
docsdependenciesstructsconstsfunctions

about

nx_engineer.nx -- the Nishi engineer's clear-view cockpit (sovereign, bits-up). REASON TO EXIST: one-step, sub-10-second fixes. The builder is the new-&-improve expert; the ENGINEER is the measure-&-fix expert -- it guards what's built against silent REGRESSION, MIS-MEASUREMENT, and THRASHING, keeps the qualitative+quantitative ecosystem always winning, and either drives a fast fix or recommends a new capability back to the builder. It is the measured-ground-truth leg of the triangulation (human=algebra, AI=statistics, engineer=what RUNS+PASSES) and keeps both honest. How: runs the racing-crew gates LIVE (the proofs), TIMES each, and DIFFS each verdict against the last known-good journal -> REGRESSED / FIXED / stable. A regression is the alarm; the timing is the fix-speed clock (target: every fix loop one step, < 10 s). Honest by construction: PROVEN only if the gate JUST ran + passed -- never a claim file. See docs/NISHI_TRIANGULATION_ENGINEERING.md. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_run_timeout.nx nx_engineer.nx

imports: nx_syscalls.nxnx_run_timeout.nx

imported by: nobody (leaf or entry point)

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

main e_puts sys_write sys_mmap read_journal sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_now_us sys_mmap ↻ sys_clock_gettime_mono run_gate sys_mmap ↻ nx_run_timeout sys_now_ms sys_mmap ↻ sys_clock_gettime_mono ↻ sys_fork sys_openat_wr sys_dup3 nx_rt_alarm sys_execve sys_exit sys_mmap ↻ sys_wait4 wait_exit_code e_putn sys_write ↻ sys_mmap ↻ write_journal sys_mmap ↻ sys_openat_wr ↻ sys_write ↻ sys_close ↻

structs

none

consts

22const NX_MAGIC_10000: i64 = 10000
24const NCARS: i64 = 7
25const NX_ENG_GATE_TIMEOUT_MS: i64 = 12000 // per-gate hang bound (nx_run_timeout); a slow/hung gate is NOT-PROVEN, never fatal
26const JOURNAL: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/_offc/nx_engineer_journal.tsv"

functions

28func e_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
29func e_putn(n: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
47func run_gate(elf: *u8, a1: *u8, a2: *u8) -> i64
called by 1: main calls 2: sys_mmapnx_run_timeout
59func read_journal(prev: *i64, n: i64) -> i64
called by 1: main calls 2: sys_mmapsys_read_file
78func write_journal(cur: *i64, n: i64) -> i64
91func main() -> i64