code wiki / _hdl_build / _offc_install_gate.nx

_offc_install_gate.nx

buildroot/runtime/_hdl_build/_offc_install_gate.nx

7318 B141 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic offc
docsdependenciesstructsconstsfunctions

about

_offc_install_gate.nx -- LOCK for the LM-026 prevention (stale-_offc guardrail). NO mocks. Proves the ENGINEER guardrail (nx_offc_install) detects + atomically fixes a stale _offc artifact, AND that the DOCTOR's recall (ki_recall over the LIVE ki- catalogue) routes the STALE-OFFC-ARTIFACT signature to the wired auto-remedy -- so the team prevents the landmine that cost a full session. HERMETIC: operates on a clearly-test name (_oitest*), writing the /tmp "fresh build" and the _offc "installed" artifact directly, so the file-copy logic is exercised end-to-end with NO real build. T1 detect : _offc differs from /tmp -> oi_stale==1 T2 fix : oi_install copies + verifies -> _offc now byte-equals /tmp T3 post-fresh : after install -> oi_stale==0 T4 neg-control : _offc already equals /tmp -> oi_stale==0 (no false-positive) T5 recall : a real STALE-OFFC-ARTIFACT diag -> ki_recall HIT id=LM-026 rem=nx_offc_install:oi_install T6 tamper : corrupt the signature -> ki_recall UNKNOWN (real substring, not constant) T7 fresh-LM027 : oi_fresh removes a stale artifact -> artifact gone (external-oracle gate path that oi_install cannot cover -- no /tmp twin: compile-then-run can never fork a stale binary) GREEN only if T1..T7 hold. Evidence -> knowledge/status/offc_install.log. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_offc_install.nx nx_known_issue_store.nx nx_syscalls.nx _offc_install_gate.nx

imports: nx_offc_install.nxnx_known_issue_store.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 g_write sys_openat_wr sys_write g_len sys_close oi_stale sys_mmap oi_offc_path oi_cat oi_tmp_path oi_cat ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ↻ oi_differ oi_install sys_mmap ↻ oi_tmp_path ↻ oi_offc_path ↻ oi_tmpinstall_path oi_cat ↻ sys_read_file ↻ sys_openat_wr ↻ sys_write ↻ sys_close ↻ sys_renameat oi_differ ↻ g_file_eq sys_mmap ↻ sys_read_file ↻ g_len ↻ sys_mmap ↻ ki_recall sys_mmap ↻ ss_get sys_mmap ↻

structs

none

consts

21const G_LOG: *u8 = "knowledge/status/offc_install.log"

functions

23func g_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
24func g_p(s: *u8) -> i64 { sys_write(1, s, g_len(s)); return 0 }
called by 2: g_rowmain calls 2: sys_writeg_len
25func g_fp(fd: i64, s: *u8) -> i64 { sys_write(fd, s, g_len(s)); return 0 }
called by 1: main calls 2: sys_writeg_len
26func g_streq(a: *u8, b: *u8) -> i64
called by 1: main
32func g_write(path: *u8, content: *u8) -> i64
39func g_file_eq(path: *u8, expected: *u8) -> i64
called by 1: main calls 3: sys_mmapsys_read_fileg_len
49func g_row(name: *u8, pass: i64) -> i64 { g_p(" " as *u8); g_p(name); if pass == 1 { g_p(" PASS\n" as *u8) } else { g_p(" FAIL\n" as *u8) } return 0 }
called by 1: main calls 1: g_p
51func main() -> i64