code wiki / _hdl_build / nx_job_runner.nx

nx_job_runner.nx

buildroot/runtime/_hdl_build/nx_job_runner.nx

6515 B156 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic job
docsdependenciesstructsconstsfunctions

about

nx_job_runner.nx -- the STANDING NISHI RUNNER (operator 2026-07-02: "stop using shell use the nishi ecosystem"). Execution flows through the ECOSYSTEM: work is ENQUEUED as lines in knowledge/store/nx_jobs.queue (authored by any tool/organ -- no shell), this daemon executes each job via fork/execve on the sovereign harness or a prebuilt organ ELF, and RECEIPTS land in knowledge/status/job_runner.log. The operator/agent reads receipts + the organs' own status logs. After ONE bootstrap start, no human/agent shell commands are needed to run organs. queue line formats: run <organ> -> ./_offc/nx_sov_build_run.elf <organ> runi <organ> -> ./_offc/nx_sov_build_run.elf <organ> --install elf <name> [a1] [a2] [a3] -> ./_offc/<name>.elf a1 a2 a3 cursor = knowledge/store/nx_jobs.done (count of processed lines; missing = 0). v1: single instance by convention (one bootstrap start); flock lease = the M4 follow-on. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_job_runner.nx

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

main sys_mmap ap apn sys_mmap ↻ apn ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_openat_append sys_write sys_close sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ↻ jr_cursor sys_mmap ↻ sys_read_file ↻ jr_exec sys_mmap ↻ ap ↻ sys_fork sys_execve sys_exit sys_wait4 jr_cursor_set sys_openat_wr sys_mmap ↻ apn ↻ sys_write ↻ sys_close ↻ sys_sleep_ms sys_mmap ↻ sys_munmap

structs

none

consts

15const K_MAGIC_2000: i64 = 2000
16const K_MAGIC_1024: i64 = 1024
17const K_MAGIC_2048: i64 = 2048
19const JQ: *u8 = "knowledge/store/nx_jobs.queue"
20const JD: *u8 = "knowledge/store/nx_jobs.done"
21const JL: *u8 = "knowledge/status/job_runner.log"

functions

23func jl(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
24func ap(b: *u8, n: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){b[n+i]=s[i];i=i+1} return n+i }
called by 2: jr_execmain
25func apn(b: *u8, n: i64, v: i64) -> i64
called by 3: apnjr_cursor_setmain calls 2: sys_mmapapn
32func jr_cursor() -> i64
called by 1: main calls 2: sys_mmapsys_read_file
41func jr_cursor_set(v: i64) -> i64
51func jr_exec(buf: *u8, ls: i64, le: i64, namebuf: *u8) -> i64
107func main() -> i64