nx_ivvguard.nx
buildroot/runtime/nx_ivvguard.nx
about
nx_ivvguard.nx -- the PURE safety predicates of the IV+V beat, extracted so they can be PROVEN BEFORE
any code that forks or deletes is written (2026-08-07).
WHY THIS FILE EXISTS SEPARATELY. nx_ivv_beat.cron.sh is the only remaining clock wrapper that FORKS A
BINARY NAMED IN A DATA PLANE and DELETES FILES BY PREFIX GLOB. Two shell case-patterns are the only
things that make it safe to run at all: the exe must match dot-slash-nx-underscore-star-dot-elf or
dot-slash-underscore-star-dot-elf, and the pre-wipe path must begin with slash-tmp-slash.
(STAR)WHEN A BEAT TAKES ITS COMMANDS FROM DATA, THE ALLOWLIST IS NOT A FEATURE OF THE BEAT -- IT IS THE
ONLY THING THAT MAKES THE BEAT SAFE TO RUN AT ALL.
A subtle mis-anchor turns a monitoring beat into an execution primitive, and a wrong prefix test deletes
by glob outside the temp directory. So the predicates ship FIRST, as pure functions over fabricated
strings, gated with NEGATIVE cases that must REFUSE -- exactly the shape that let clk_edf_pick_free be
proven before it was ever wired to a live dispatcher.
license_tier: ORIGINAL No hw writes (Rule 26). Pure: no side effects.
dependencies 1 imports · 2 importers
imports: nx_syscalls.nx
imported by: nx_ivvbeat.nxnx_ivvguard_gate.nx
structs
| none |
consts
| none |
functions
| 17 | func ivg_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 19 | func ivg_starts(s: *u8, p: *u8) -> i64 |
| 25 | func ivg_ends(s: *u8, p: *u8) -> i64 |
| 39 | func ivg_ends_n(s: *u8, sl: i64, p: *u8) -> i64 |
| 56 | func ivv_exe_len(cmd: *u8) -> i64 called by 1: ivv_cmd_allowed |
| 62 | func ivv_cmd_allowed(cmd: *u8) -> i64 |
| 78 | func ivv_wipe_allowed(pre: *u8) -> i64 |
| 93 | func ivv_wipe_none(pre: *u8) -> i64 |
| 99 | func ivv_marker_hit(out: *u8, n: i64, marker: *u8) -> i64 |
| 137 | func ivv_isdigit(c: u8) -> i64 |
| 144 | func ivv_find_count(s: *u8, span: *i64) -> i64 |
| 168 | func ivv_find_sub_n(hay: *u8, n: i64, from: i64, needle: *u8, nl: i64) -> i64 called by 1: ivv_match_counted |
| 185 | func ivv_match_counted(out: *u8, n: i64, marker: *u8, res: *i64) -> i64 called by 1: ivv_is_green2 calls 6: sys_mmapivv_find_countivv_marker_hitivg_lenivv_isdigitivv_find_sub_n |
| 309 | func ivv_floor_ok(observed_total: i64, declared_total: i64) -> i64 |
| 324 | func ivv_is_green2(rc: i64, out: *u8, n: i64, marker: *u8, res: *i64) -> i64 |
| 332 | func ivv_is_green(rc: i64, out: *u8, n: i64, marker: *u8) -> i64 |