nx_crew_selfheal.nx
buildroot/runtime/nx_crew_selfheal.nx
about
nx_crew_selfheal.nx -- the SAFE-ACT loop: the crew doesn't just SEE a problem,
it FIXES it, bounded by the Warden. The full cycle, collaborating:
1. DETECT (Engineer) -- measure the compiler-health car (nx_run_timeout)
2. AUTHORIZE(Warden) -- warden_authorize() against the cardinals
3. HEAL (Doctor) -- swap the pinned known-good over the poisoned binary
4. VERIFY (Engineer) -- re-measure; the fix is real or it isn't
This is the literal mechanism of a one-step autonomous fix -- and it's SAFE
because step 2 gates step 3. Proven on a SANDBOX copy of the compiler (no
collision with the live shared binary a concurrent session is improving);
pointing it at the live compiler is one const + the operator's call.
Composes nx_run_timeout (measure) + nx_warden_lib (authorize). Sovereign.
license_tier: ORIGINAL
dependencies 2 imports · 1 importers
imports: nx_run_timeout.nxnx_warden_lib.nx
imported by: nx_conductor_heal.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 19 | const SH_KG: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/_offc/nx_cc_known_good.elf" |
| 20 | const SH_SANDBOX: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/_offc/_sandbox_cc.elf" |
| 21 | const SH_CANARY: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/nx_slice_contour.nx" |
| 22 | const SH_TIMEOUT_MS: i64 = 8000 |
| 23 | const SH_MODE_EXEC: i64 = 493 |
functions
| 25 | func sh_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != 0 as u8 { n = n + 1 } sys_write(1, s, n); return 0 } |
| 26 | func sh_putn(n: i64) -> i64 |
| 36 | func sh_measure(compiler: *u8, elapsed_out: *i64) -> i64 |
| 43 | func sh_write_all(fd: i64, buf: *u8, len: i64) -> i64 called by 1: sh_copy |
| 54 | func sh_copy(from: *u8, to: *u8) -> i64 |
| 68 | func main() -> i64 |