code wiki / _hdl_build / _sbr_install_gate.nx
_sbr_install_gate.nx
buildroot/runtime/_hdl_build/_sbr_install_gate.nx
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
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
structs
| none |
consts
| 13 | const SG_LOG: *u8 = "knowledge/status/offc_install.log" |
| 14 | const SG_RUNNER: *u8 = "_offc/nx_sov_build_run.elf" |
| 15 | const SG_OFFC: *u8 = "_offc/_sbrtest.elf" |
| 16 | const SG_TMP: *u8 = "/tmp/_sbrtest.sov.elf" |
functions
| 18 | func sg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 19 | func sg_p(s: *u8) -> i64 { sys_write(1, s, sg_len(s)); return 0 } |
| 20 | func sg_fp(fd: i64, s: *u8) -> i64 { sys_write(fd, s, sg_len(s)); return 0 } |
| 22 | func sg_write(path: *u8, content: *u8) -> i64 |
| 28 | func sg_present(path: *u8) -> i64 |
| 34 | func sg_file_eq(a: *u8, b: *u8) -> i64 |
| 48 | func sg_build(name: *u8) -> i64 |
| 64 | func 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 } |
| 66 | func main() -> i64 |