code wiki / _hdl_build / _sbr_install_gate.nx

_sbr_install_gate.nx

buildroot/runtime/_hdl_build/_sbr_install_gate.nx

4819 B98 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

_sbr_install_gate.nx -- LOCK for the LM-026 ROOT FIX in nx_sov_build_run (install-on-success). NO mocks. Forks the REAL runner (_offc/nx_sov_build_run.elf) on the throwaway fixture _sbrtest and proves the runner now keeps _offc in sync with the fresh /tmp build, so gates can NEVER again fork a stale binary (the trap that cost a full session on the MMU instruction-fetch rung). RED-on-regression: if a future edit removes the auto-install or makes it pollute _offc with throwaway builds, this turns RED. T1 no-spurious : build a module with NO pre-existing _offc/<name>.elf -> NO _offc entry created (refresh-IF-PRESENT: gate/probe builds run from /tmp, must not pollute _offc) T2 auto-refresh: a STALE _offc/<name>.elf -> after build, _offc/<name>.elf byte-equals /tmp/<name>.sov.elf GREEN only if T1 && T2. Evidence -> knowledge/status/offc_install.log. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_offc_install.nx nx_syscalls.nx _sbr_install_gate.nx

imports: nx_offc_install.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main oi_fresh sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sg_build sys_fork sys_openat_wr sys_dup3 sys_mmap ↻ sys_execve sys_exit sys_wait4 sg_present sys_openat_rd ↻ sys_close ↻ sg_write sys_openat_wr ↻ sys_write sg_len sys_close ↻ sg_file_eq sys_mmap ↻ sys_read_file ↻ sg_p sys_write ↻ sg_len ↻ sg_row sg_p ↻ sys_openat_append sg_fp sys_write ↻ sg_len ↻ oi_wn sys_mmap ↻ sys_write ↻

structs

none

consts

13const SG_LOG: *u8 = "knowledge/status/offc_install.log"
14const SG_RUNNER: *u8 = "_offc/nx_sov_build_run.elf"
15const SG_OFFC: *u8 = "_offc/_sbrtest.elf"
16const SG_TMP: *u8 = "/tmp/_sbrtest.sov.elf"

functions

18func sg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 3: sg_psg_fpsg_write
19func sg_p(s: *u8) -> i64 { sys_write(1, s, sg_len(s)); return 0 }
called by 2: sg_rowmain calls 2: sys_writesg_len
20func sg_fp(fd: i64, s: *u8) -> i64 { sys_write(fd, s, sg_len(s)); return 0 }
called by 1: main calls 2: sys_writesg_len
22func sg_write(path: *u8, content: *u8) -> i64
28func sg_present(path: *u8) -> i64
called by 1: main calls 2: sys_openat_rdsys_close
34func sg_file_eq(a: *u8, b: *u8) -> i64
called by 1: main calls 2: sys_mmapsys_read_file
48func sg_build(name: *u8) -> i64
64func sg_row(name: *u8, pass: i64) -> i64 { sg_p(" " as *u8); sg_p(name); if pass == 1 { sg_p(" PASS\n" as *u8) } else { sg_p(" FAIL\n" as *u8) } return 0 }
called by 1: main calls 1: sg_p
66func main() -> i64