code wiki / _hdl_build / nx_neverbrick_genesis.nx
nx_neverbrick_genesis.nx
buildroot/runtime/_hdl_build/nx_neverbrick_genesis.nx
about
nx_neverbrick_genesis.nx -- GATE: the NEVER-BRICK GENESIS GATE (cardinal 26's NAMED enforcement mechanism: "the
genesis gate flags any firmware-axis node lacking a never-brick guarantee -> VERDICT RED, never asserted as a
promise"). Composes the existing certify() principle (nx_eng_repro_neverbrick_gate) into a REAL registry scan over
every hardware-write-axis capability the ecosystem has built, and REFUSES the whole genesis if ANY hw node lacks a
never-brick guarantee. This is the mechanical proof that no Nishi capability can brick the electronics.
A node is SAFE iff: it does NOT write hardware (hw=0), OR it carries a never-brick GUARANTEE that is one of
{READ-ONLY, REVERSIBLE, FAIL-SAFE-BY-CONSTRUCTION}. Firmware-axis nodes (MMU/GPU/boot/exec) must carry the
STRONGEST guarantee (FAIL-SAFE by construction), matching cardinal 26's "BY CONSTRUCTION" bar.
T1 the genesis scan over the REAL registry -> every hw node carries a never-brick guarantee -> VERDICT GREEN.
T2 the certify() principle: hw+proven -> certified; hw+unproven -> REJECTED; software -> certified regardless.
T3 teeth: INJECT a firmware-write node with guarantee=NONE -> the gate flags it -> VERDICT RED (real filter).
T4 every registered hw node's guarantee is non-NONE (enumerate -- no rubber stamp).
T5 firmware-axis nodes (MMU/GPU-driver/GPU-ring/boot/exec-format) ALL carry FAIL-SAFE-BY-CONSTRUCTION.
expect_exit: 0 Sovereign: nx_syscalls. NEVER-BRICK: pure verdict computation, writes 0 firmware.
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_itoa_lib.nxnx_g_puts_lib.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
| 28 | const G_NONE: i64 = 0 |
| 29 | const G_READONLY: i64 = 1 |
| 30 | const G_REVERSIBLE: i64 = 2 |
| 31 | const G_FAILSAFE: i64 = 3 // fail-safe / model-only / refused-by-construction = the strongest, cardinal-26 bar |
| 33 | const AX_SOFTWARE: i64 = 0 |
| 34 | const AX_FIRMWARE: i64 = 1 // firmware/MMU/GPU/boot/exec -- the brick-critical axis (must be FAIL-SAFE) |
functions
| 24 | func g_pn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 25 | func ck(name: *u8, c: i64) -> i64 { if c==1 { g_puts(" PASS " as *u8) } else { g_puts(" FAIL " as *u8) } g_puts(name); g_puts("\n" as *u8); return c } |
| 36 | func g_name(g: i64) -> *u8 { if g==0 { return "NONE" as *u8 } if g==1 { return "READ-ONLY" as *u8 } if g==2 { return "REVERSIBLE" as *u8 } return "FAIL-SAFE-BY-CONSTRUCTION" as *u8 } |
| 39 | func certify(hw: i64, proven: i64, quality_ok: i64) -> i64 { if hw == 1 { if proven == 0 { return 0 } } return quality_ok } called by 1: main |
| 42 | func node_safe(hw: i64, guar: i64) -> i64 { if hw==0 { return 1 } if guar != G_NONE { return 1 } return 0 } called by 1: genesis_verdict |
| 44 | func genesis_verdict(hw: *i64, guar: *i64, n: i64, bad: *i64) -> i64 |
| 51 | func main() -> i64 |