code wiki / (root) / nx_neverbrick_gate.nx

nx_neverbrick_gate.nx

buildroot/runtime/nx_neverbrick_gate.nx

6698 B113 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_neverbrick_gate.nx -- proves the Rule-26 reversibility classifier actually discriminates, and that it fails CLOSED. Rule 26 says never-brick must be proven mechanically, never asserted; this is the proof, and it calls the SHIPPING functions in nx_mcu_brick.nx so it cannot drift from what a real write chokepoint runs. NON-VACUITY IS THE POINT. Two failure modes would make this gate a liar, so both have controls: - a classifier that returns RED for EVERYTHING passes every safety test and blocks the product. T4 and T8 are the positive controls: the real esp32-ai flash workload MUST come back GREEN. - a classifier that returns GREEN for everything would sail through the positive tests. T1/T2 are the negative controls: undeclared and null namespaces MUST come back RED. - T7 is the neg-control on T6's READER: if nb_efuse_kills_recovery returned 1 unconditionally, T6 would pass while measuring nothing. A check and its own neg-control failing together means the instrument is broken. T5 is the keystone assertion: the same flash write that is GREEN with the ROM download path intact MUST be RED once DIS_DOWNLOAD_MODE is burned. Flash reversibility is conditional, not intrinsic. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_mcu_brick.nx nx_neverbrick_gate.nx

imports: nx_syscalls.nxnx_mcu_brick.nx

imported by: nobody (leaf or entry point)

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

main nbg_p sys_write nbg_len nb_verdict nb_class_of_ns nb_streq nbg_ck nbg_p ↻ nb_efuse_kills_recovery nb_streq ↻ nb_class_of_ns ↻ nb_verdict_efuse nbg_pn sys_mmap sys_write ↻

structs

none

consts

none

functions

21func nbg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: nbg_p
22func nbg_p(s: *u8) -> i64 { sys_write(1, s, nbg_len(s)); return 0 }
called by 2: nbg_ckmain calls 2: sys_writenbg_len
23func nbg_pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
36func nbg_ck(name: *u8, c: i64) -> i64
called by 1: main calls 1: nbg_p
42func main() -> i64