code wiki / _hdl_build / nx_ale_rsi_tick.nx

nx_ale_rsi_tick.nx

buildroot/runtime/_hdl_build/nx_ale_rsi_tick.nx

4956 B91 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic ale
docsdependenciesstructsconstsfunctions

about

nx_ale_rsi_tick.nx -- ALE-R5 autonomy CAPSTONE: ONE RSI TICK in a single pulse-ready no-arg invocation. Composes the measure->ledger->file loop: (a) TRUNCATE the gap ledger (fresh per tick -> no bloat across beats), (b) fork/exec _offc/nx_ale_flywheel.elf on the SEED manifest (knowledge/specs/ale_suite.manifest) to MEASURE every task + ledger any GAPs, (c) fork/exec _offc/nx_ale_gap_filer.elf to turn ledger gaps into NOVEL ALE-GAP-* queue rungs (idempotent, lock-protected inside the filer). All-solved -> 0 gaps -> 0 rungs = a SAFE no-op every beat; a new unsolved task -> gap -> rung -> the team builds the missing capability -> re-attempt closes. This is the unit the pulse (or operator) invokes to make the RSI loop spin UNATTENDED. no-arg => LIVE tick (filer writes the real queue). argv[1] => DRY (filer targets that scratch queue; live queue untouched) -- for the gate/demo. BAKED SELF-TEST FIRST: a DRY tick on an all-SOLVED control manifest + scratch queue must run both children to exit 0 (the compose works, 0 gaps -> no ledger pollution); mismatch -> RED + exit. license_tier: ORIGINAL module: nishi-core.ale.rsi_tick depends: nishi-core.sys.syscalls capability: ALE_RSI_TICK

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_ale_rsi_tick.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main rt_write_file rt_unlink sys_openat_wr sys_write rt_len sys_close rt_tick rt_unlink ↻ rt_run sys_fork sys_openat_wr ↻ sys_dup3 sys_mmap sys_execve sys_exit sys_wait4 rt_w sys_write ↻ rt_wn sys_mmap ↻ sys_write ↻ sys_exit ↻ sys_openat_append sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_close ↻

structs

none

consts

none

functions

20func rt_w(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
21func rt_wn(fd: i64, v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64 = v; if m < 0 { m = 0 - m; sys_write(fd, "-" as *u8, 1) }; let t: *u8 = sys_mmap(28); var k: i64 = 0; if m == 0 { t[0] = 48; k = 1 }; while m > 0 { t[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 }; var i: i64 = 0; while i < k { bb[i] = t[k - 1 - i]; i = i + 1 }; sys_write(fd, bb, k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
22func rt_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: rt_write_file
25func rt_write_file(path: *u8, s: *u8) -> i64
35func rt_run(elf: *u8, arg1: i64) -> i64
54func rt_tick(manifest: i64, qarg: i64) -> i64
called by 1: main calls 2: rt_unlinkrt_run
62func main(argc: i64, argv: *i64) -> i64