code wiki / _hdl_build / _ale_exec_gate.nx
_ale_exec_gate.nx
buildroot/runtime/_hdl_build/_ale_exec_gate.nx
about
_ale_exec_gate.nx -- the ALE-R2b gate: sovereign agent-core EXECUTE/dispatch organ.
Diff-lane / no-mocks: runs the REAL sovereign planner nx_ale_plan.elf to produce the ordered
plan, then the REAL sovereign executor nx_ale_exec.elf (both built nx_cc_sovereign->nxasm_x86_main,
NO gcc) over a REAL hello-class ALE fixture, and asserts:
(1) STAGE -- stage_input (step 1) copies the input_stage material into the sandbox:
the staged file EXISTS and byte-matches the materials_dir source
(2) TRANSFORM -- run_organ (step 2) applies the named deterministic transform: the
artifact's unit| lines are the transform of the staged kv| lines
(3) ARTIFACT -- write_artifact (step 3) produced a REAL non-empty file at artifact_path
(4) ORDER/NO-LEAKAGE -- a malformed out-of-order plan is REFUSED, AND the artifact is byte-
identical whether a decoy reference is planted in the sandbox or not
(the executor never opens the reference path -> no leakage end-to-end)
(5) DETERMINISTIC -- two runs on the same (plan,task,fresh sandbox) yield a BYTE-IDENTICAL artifact
(6) TAMPER REJECTED -- a plan MISSING write_artifact -> child exits NON-ZERO and writes NO artifact
(G) FEEDS GRADER -- nx_ale_grade.elf (ALE-R1a) on the produced artifact + reference scores 1000
Evidence -> knowledge/status/ale_exec.log (ALEEXECGATE row; the queue row's ||MARK= reads it).
Sovereign orchestration (fork/dup3/execve/wait4 + mkdirat). license_tier: ORIGINAL
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 g_p(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 21 | func g_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 } |
| 22 | func g_fn(fd: i64, v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64 = v; if m < 0 { m = 0 - m }; 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 } |
| 25 | func g_run_plan(task: *u8, planout: *u8) -> i64 |
| 46 | func g_run_exec(plan: *u8, task: *u8, sandbox: *u8) -> i64 |
| 68 | func g_run_grade(ref: *u8, art: *u8, scoreout: *u8) -> i64 |
| 90 | func g_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 104 | func g_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 107 | func g_files_eq(pa: *u8, pb: *u8) -> i64 |
| 120 | func g_match(buf: *u8, n: i64, pos: i64, pat: *u8, pl: i64) -> i64 called by 1: g_line_in |
| 128 | func g_is_bol(buf: *u8, pos: i64) -> i64 called by 1: g_line_in |
| 135 | func g_line_in(buf: *u8, n: i64, lit: *u8) -> i64 |
| 152 | func g_write_file(path: *u8, buf: *u8, n: i64) -> i64 |
| 160 | func main() -> i64 |