code wiki / (root) / nx_conductor_heal.nx

nx_conductor_heal.nx

buildroot/runtime/nx_conductor_heal.nx

3583 B74 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind tooltopic conductor
docsdependenciesstructsconstsfunctions

about

nx_conductor_heal.nx -- the Nishi CONDUCTOR, v3: the come-alive tick that does NOT just verify -- it AUTO-FIXES, bounded by the Warden. Each beat runs the full SAFE-ACT loop (the proven nx_crew_selfheal pattern, now IN the autonomic tick): Engineer DETECTs compiler-health (run the sandbox compiler on a canary, hang-safe) -> if unhealthy, Warden AUTHORIZEs the heal (W_HEAL_SWAP: allowed only because a known-good backup exists AND the target is a regenerable /_offc/ build artifact) -> Doctor HEALs (sovereign-copy the pinned known-good over the poisoned binary) -> Engineer VERIFIes (re-measure). Reuses nx_crew_selfheal's sh_measure/sh_copy/sh_puts (its main is stripped on import) -- ONE heal mechanism, no duplication. The Warden gates step 3 with step 2, so the autonomy is safe by construction (#13 additive-only: it swaps a known-good over a build artifact, never deletes, never overwrites source). Proven by gate_nx_conductor_heal.sh, which SEEDS a poisoned sandbox so the heal demonstrably fires: detect UNHEALTHY -> Warden ALLOW -> heal -> verify OK. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_crew_selfheal.nx nx_conductor_heal.nx

imports: nx_crew_selfheal.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sh_puts sh_putn sh_measure nx_run_timeout sys_now_ms sys_mmap sys_clock_gettime_mono sys_fork sys_openat_wr sys_dup3 nx_rt_alarm sys_execve sys_exit sys_mmap ↻ sys_wait4 wait_exit_code warden_authorize warden_check w_is_build_artifact w_contains w_audit sys_openat_append w_wstr sys_write w_kind_name sys_close sh_copy sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ↻ sys_openat_wr ↻ sh_write_all sys_sleep_ms sys_mmap ↻ sys_munmap

structs

none

consts

22const CH_BEATS: i64 = 2
23const CH_CADENCE_MS: i64 = 300

functions

25func main() -> i64