code wiki / _hdl_build / nx_pub_recover_exec_gate.nx

nx_pub_recover_exec_gate.nx

buildroot/runtime/_hdl_build/nx_pub_recover_exec_gate.nx

4285 B72 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic pub
docsdependenciesstructsconstsfunctions

about

nx_pub_recover_exec_gate.nx -- SOVEREIGN gate for the recovery EXECUTOR (real kill of a real process). Spawns a live mock daemon (nx_pr_mock, distinct cmdline so no self-kill), confirms it's ALIVE, runs pe_exec on a seeded PENDING queue, then proves: the mock is KILLED, the queue line flips PENDING->DONE, the recovery is LEDGERED, and a re-run is a NO-OP (idempotent, no PENDING left). Per-run /tmp test files. Requires /tmp/nx_pr_mock.sov.elf built first. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_pub_recover_exec.nx nx_pub_recover_exec_gate.nx

imports: nx_syscalls.nxnx_pub_recover_exec.nx

imported by: nobody (leaf or entry point)

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

main sys_fork sys_mmap sys_execve sys_exit ge_sleep_ms sys_mmap ↻ ge_uw sys_write pr_s sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real ge_write sys_openat_wr sys_write ↻ sys_close pe_exec fl_acquire fl_try fl_mkdir sys_mmap ↻ fl_path sys_openat_wr ↻ sys_flock sys_close ↻ fl_nap sys_mmap ↻ sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ↻ fl_release sys_flock ↻ sys_close ↻ pr_field proc_kill_by_name

structs

none

consts

9const GE_Q: *u8 = "/tmp/pe_test_queue.tsv"
10const GE_LED: *u8 = "/tmp/pe_test_ledger.tsv"
11const GE_MOCK: *u8 = "/tmp/nx_pr_mock.sov.elf"
12const GE_NEEDLE: *u8 = "nx_pr_mock"

functions

14func ge_uw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
15func ge_wn(v: i64) -> i64 { let b: *u8=sys_mmap(24); let e: i64=pr_n(b,0,v); sys_write(1,b,e); return 0 }
called by 1: main calls 2: sys_mmapsys_write
16func ge_sleep_ms(ms: i64) -> i64 { let ts: *i64=sys_mmap(16) as *i64; ts[0]=ms/1000; ts[1]=(ms-(ms/1000)*1000)*1000000; __syscall(35, ts as i64, 0,0,0,0,0); return 0 }
called by 1: main calls 1: sys_mmap
17func ge_write(path: *u8, buf: *u8, len: i64) -> i64 { let fd: i64=sys_openat_wr(path, 0x1a4); if fd<0 {return 0-1} if len>0 { sys_write(fd, buf, len) } sys_close(fd); return 0 }
19func main(argc: i64, argv: *i64) -> i64