code wiki / _hdl_build / nx_ale_rsi_tick.nx
nx_ale_rsi_tick.nx
buildroot/runtime/_hdl_build/nx_ale_rsi_tick.nx
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
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
structs
| none |
consts
| none |
functions
| 20 | func 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 } |
| 21 | func 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 } |
| 22 | func 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 |
| 23 | func rt_unlink(path: *u8) -> i64 { return __syscall(263, AT_FDCWD, path, 0, 0, 0, 0) } |
| 25 | func rt_write_file(path: *u8, s: *u8) -> i64 |
| 35 | func rt_run(elf: *u8, arg1: i64) -> i64 |
| 54 | func rt_tick(manifest: i64, qarg: i64) -> i64 |
| 62 | func main(argc: i64, argv: *i64) -> i64 |