code wiki / _hdl_build / nx_job_runner.nx
nx_job_runner.nx
buildroot/runtime/_hdl_build/nx_job_runner.nx
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
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
structs
| none |
consts
| 15 | const K_MAGIC_2000: i64 = 2000 |
| 16 | const K_MAGIC_1024: i64 = 1024 |
| 17 | const K_MAGIC_2048: i64 = 2048 |
| 19 | const JQ: *u8 = "knowledge/store/nx_jobs.queue" |
| 20 | const JD: *u8 = "knowledge/store/nx_jobs.done" |
| 21 | const JL: *u8 = "knowledge/status/job_runner.log" |
functions
| 23 | func jl(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 24 | func 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 } |
| 25 | func apn(b: *u8, n: i64, v: i64) -> i64 |
| 32 | func jr_cursor() -> i64 |
| 41 | func jr_cursor_set(v: i64) -> i64 |
| 51 | func jr_exec(buf: *u8, ls: i64, le: i64, namebuf: *u8) -> i64 |
| 107 | func main() -> i64 |