nx_mesh_run.nx
buildroot/runtime/nx_mesh_run.nx
about
nx_mesh_run.nx -- WORKER MESH CONDUCTOR: runs ONE job through the whole authorized pipeline by composing the REAL
mesh organs (not a re-implementation -- it fork+captures the proven elfs, gating each step on the next):
1. AUTHORIZE -> nx_worker_dispatch (capability-scoped, deny-by-default): may this job touch gpu-image + gallery?
2. ROUTE -> nx_mesh_lb (health-aware): pick a HEALTHY replica of the worker class (skip the down ones).
3. EXECUTE -> nx_mesh_gen (sovereign POST->decode->gallery): generate + publish, zero shell.
Each milestone gates the next: a capability denial stops before routing; no healthy replica stops before executing.
This is the mesh as ONE usable system (the operator's "the NAS dispatches jobs" = a single command), composing the
individually-proven organs. Run from the nishihost cwd where the organ elfs live.
CLI: run <prompt> <outpath> [caps] -> the full pipeline (caps default gpu-image,gallery; pass a lesser set to see
the capability gate DENY and stop the pipeline)
(no args) -> self-test GATE (the substring gate that drives step transitions)
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_runtime.nxnx_tool_run.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
| 17 | const K_MAGIC_4194304: i64 = 4194304 |
functions
| 19 | func mr_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 20 | func mr_puts(s: *u8) -> i64 { sys_write(1, s, mr_slen(s)); return 0 } |
| 21 | func mr_contains(buf: *u8, n: i64, needle: *u8) -> i64 |
| 33 | func mr_run(path: *u8, av: *i64, out: *u8, cap: i64, olen: *i64) -> i64 |
| 40 | func mr_wb(b: i64) -> i64 { let x: *u8 = sys_mmap(1); x[0] = b as u8; sys_write(1, x, 1); return 0 } |
| 41 | func mr_sse1(event: *u8, status: *u8) -> i64 |
| 46 | func mr_sse2(event: *u8, status: *u8, key: *u8, val: *u8) -> i64 |
| 54 | func mr_sse_pipeline(prompt: *u8, outpath: *u8, caps: *u8) -> i64 |
| 88 | func mr_gate() -> i64 |
| 107 | func main(argc: i64, argv: *i64) -> i64 |