nx_pe_container_elderai.nx
buildroot/runtime/nx_pe_container_elderai.nx
about
nx_pe_container_elderai.nx -- THE SOURCE for the Elara/Elder-AI GPU engine container.
WHY THIS FILE EXISTS: nx_pe_container_elderai.exe was shipping as a binary with NO
SOURCE IN THE TREE -- it had been built from an edited copy of the sdserver variant
and renamed, so nothing could rebuild it and every fix to it was a hand-patch that
the next build would lose. A binary nothing can emit was never really ours. This is
that source, recovered by reading the deployed PE's own baked cmdline (2026-07-25).
It differs from nx_pe_container_sdserver.nx in exactly two arguments:
--listen-ip 0.0.0.0 so the NAS gen orchestrator can reach this laptop worker
--lora-model-dir <dir> WITHOUT WHICH EVERY LoRA IS SILENTLY IGNORED (see below)
Everything else is the W4-b container unchanged; that original header follows.
---- nx_pe_container_win_io.nx -- W4-b-1: a governed Nishi container with WIRED stdout.
W4-a (nx_pe_container_win) ran a Nishi organ as a Job-governed child and reaped exit 88, but the
organ's "NX" stdout was lost (CreateProcessW used bInheritHandles=FALSE + CREATE_NO_WINDOW). This
rung wires container output: the child inherits the supervisor's stdout, so the organ's output is
CAPTURED -- making the container usable for real services that log to stdout (Elder-AI svcs do).
CHANGE vs W4-a (two immediates only; everything else byte-identical):
- CreateProcessW arg5 bInheritHandles: FALSE(0) -> TRUE(1) ([rsp+0x20])
- CreateProcessW arg6 dwCreationFlags: CREATE_NO_WINDOW(0x08000000) -> 0 ([rsp+0x28])
With handle inheritance on and no NO_WINDOW, the child (console app) inherits the supervisor's
stdout handle, so its writes flow to wherever the supervisor's stdout points (console or file).
Pipeline (same governed run+reap as W2c/W4-a): CreateJobObjectW -> SetInformationJobObject(limit=8)
-> AssignProcessToJobObject(self,-1) -> CreateProcessW("nx_win_compiled_organ.exe", inherit=TRUE,
flags=0) -> WaitForSingleObject(INFINITE) -> GetExitCodeProcess -> ExitProcess(childExit).
NO-FALSE-GREEN: the organ prints "NX\n" and exits 88. With output wired, BOTH must hold: stdout
captures "NX" (container output flows out) AND supervisor exit == 88 (governed child reaped). The
W4-a non-existent-child control (-> exit 0, rep-stosq-25 zeroes exitCode) still applies.
lineage_id: substrate_pe_container_win_io_v1 (evolves substrate_pe_container_win_v1).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_hal.nxnx_pe_writer.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
| 42 | const PE_CWIO_FILE_SIZE: i64 = 0xA00 // enlarged: .data 0x400 holds sd-server's long cmdline; .idata shifted to file 0x800 (RVA fixed) |
| 48 | const PE_CWIO_CMDLINE_MAX_CHARS: i64 = 511 // 511 chars + NUL = 0x400 bytes exactly |
functions
| 50 | func nxcwio_strlen(s: *u8) -> i64 called by 1: nxcwio_put_utf16 |
| 56 | func nxcwio_put_utf16(buf: *u8, off: i64, s: *u8) -> i64 |
| 67 | func nx_pe_emit_container_io(buf: *u8) -> i64 |
| 219 | func main() -> i64 |