code wiki / _hdl_build / nx_trajscan_beat.nx

nx_trajscan_beat.nx

buildroot/runtime/_hdl_build/nx_trajscan_beat.nx

3119 B72 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_trajscan_beat.nx -- no-arg BEAT for the scheduler (quality-ruler R3 standing gauge, 2026-07-29): scan the live actlog via nx_trajscan (composed through tr_run_capture -- zero detector logic duplicated; the 7/7-gated organ stays the ONE definition) and APPEND the one-line envelope to the trend evidence log. A beat with no evidence line is a claim -- this one writes its line every run, including on failure (BEAT-FAIL lines are evidence too). Scheduler contract: the knowledge/store/clockjobs- plane (the ONE tickless clock; the sched/ registry was retired 2026-08-03, debt 1785792856) fork+execs the elf with NO args; argv[1]=journal argv[2]=trendfile override the defaults for testing. trend line: <epoch>\t<envelope-json-or-BEAT-FAIL>\n (O_APPEND, conflict-free) license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_sovjson_lib.nx nx_syscalls.nx nx_tool_run.nx nx_trajscan_beat.nx

imports: nx_sovjson_lib.nxnx_syscalls.nxnx_tool_run.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap tr_run_capture sys_mmap ↻ sys_pipe2 sys_fork sys_close sys_dup3 sys_execve_clean sys_close ↻ sys_execve sys_exit sys_read sys_wait4 wait_exit_code sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sj_catn sys_mmap ↻ sj_cat tb_append sys_openat_append sys_write sys_fsync sys_close ↻ tb_werr sys_write ↻ sys_exit ↻ tb_puts sys_write ↻ sys_write ↻

structs

none

consts

13const TB_OUT: i64 = 16384
14const TB_LINE: i64 = 20480
15const TB_MODE: i64 = 420

functions

17func tb_puts(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
18func tb_werr(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(2, s, n); return 0 }
called by 1: main calls 1: sys_write
19func tb_append(path: *u8, buf: *u8, n: i64) -> i64
27func main(argc: i64, argv: *i64) -> i64