nx_conductor.nx
buildroot/runtime/nx_conductor.nx
about
nx_conductor.nx -- the Nishi CONDUCTOR: the autonomic HEARTBEAT (sovereign).
The role the come-alive gap implied: it makes the crew RUN itself. Each BEAT
it measures the car grid (hang-safe, via nx_run_timeout), prints the pulse,
and appends each verdict to the event-bus log (the blackboard seed) -- then
sleeps the cadence. This is the tick that flips the crew from "a charter a
human pokes" to ALIVE.
v1 is OBSERVE-ONLY: it measures + journals, it does NOT auto-heal or
auto-commit. Autonomous ACTION (Doctor-heal, Builder-commit) is deliberately
withheld until the WARDEN bounds it (capability-trust + cardinal enforcement).
Live, but safe. Beats are bounded (not an infinite daemon) so it is testable;
v2 = unbounded daemon once the Warden is in.
Composes runtime/nx_run_timeout.nx. Sovereign: raw syscalls, zero deps.
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_run_timeout.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
| 19 | const C_MAGIC_10000: i64 = 10000 |
| 21 | const C_ACTIVE: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/_offc/nx_compile_x86_native.elf" |
| 22 | const C_EVENTLOG: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/_offc/nx_crew_events.log" |
| 23 | const C_BEAT_TIMEOUT_MS: i64 = 6000 // known-good does any car <1s; >6s = poisoned |
| 24 | const C_CADENCE_MS: i64 = 1000 // sleep between beats (short for the demo) |
| 25 | const C_BEATS: i64 = 3 // bounded (v2 = unbounded daemon, post-Warden) |
| 26 | const C_MODE_FILE: i64 = 420 // 0o644 |
functions
| 28 | func c_wstr(fd: i64, s: *u8) -> i64 |
| 34 | func c_wnum(fd: i64, n: i64) -> i64 |
| 47 | func c_measure(canary: *u8, elapsed_out: *i64) -> i64 |
| 58 | func c_event(beat: i64, car: *u8, verdict: *u8, ms: i64) -> i64 |
| 70 | func main() -> i64 |