code wiki / _hdl_build / nx_pulse_daemon.nx

nx_pulse_daemon.nx

buildroot/runtime/_hdl_build/nx_pulse_daemon.nx

7135 B145 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind service
docsdependenciesstructsconstsfunctions

about

nx_pulse_daemon.nx -- the CONDUCTOR'S LOOP, armed: re-runs nx_team_pulse on a schedule so every role's evidence (triage, prove-all, security, examiner, scorecard) refreshes WITHOUT a human or Claude asking. This is the unit the scorecard's "run on the loop" race-to-exceed names, made real. - interval from knowledge/status/pulse_daemon.conf (I row; data-driven, no magic numbers) - each beat: fork+exec the DURABLE runner _offc/nx_sov_build_run.elf nx_team_pulse (runner rebuilds from settled source -> a /tmp wipe self-heals on the next beat) - beat output appended to knowledge/status/pulse_daemon.out; one DAEMON-BEAT line per beat to knowledge/status/pulse_daemon.log (epoch + pulse rc) = the durable heartbeat trend - self-daemonizes (fork, parent exits, child setsid) so any caller returns immediately - duplicate guard via knowledge/status/pulse_daemon.pid + /proc/<pid>/cmdline check Sovereign (syscalls only, no .sh). Run from nxc2 root. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_pulse_daemon.nx

imports: nx_syscalls.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

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

main pd_interval sys_mmap pd_read_all sys_openat_rd sys_read sys_close _p sys_write sys_exit pd_already_running sys_mmap ↻ pd_read_all ↻ pd_cat pd_contains pd_len sys_fork _pn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap sys_openat_wr _fn nxi_fd ↻ sys_close ↻ nx_setsid pd_beat sys_fork ↻ sys_mmap ↻ sys_openat_append sys_dup3 sys_execve sys_exit ↻ sys_wait4 sys_openat_append ↻ _fp sys_write ↻

structs

none

consts

14const K_MAGIC_4096: i64 = 4096
15const K_MAGIC_4080: i64 = 4080

functions

16func _p(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
21func _pn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
22func _fp(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 1: main calls 1: sys_write
27func _fn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 }
called by 1: main calls 1: nxi_fd
28func pd_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: pd_contains
29func pd_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i }
called by 1: pd_already_running
30func pd_read_all(path: *u8, buf: *u8, cap: i64) -> i64
39func pd_contains(hay: *u8, n: i64, pat: *u8) -> i64
called by 1: pd_already_running calls 1: pd_len
53func pd_sleep(secs: i64) -> i64
called by 1: main calls 1: sys_mmap
60func pd_interval() -> i64
called by 1: main calls 2: sys_mmappd_read_all
85func pd_already_running() -> i64
101func pd_beat() -> i64
118func main() -> i64