code wiki / _hdl_build / nx_gamehud_gate.nx
nx_gamehud_gate.nx
buildroot/runtime/_hdl_build/nx_gamehud_gate.nx
about
nx_gamehud_gate.nx -- certification gate for nx_gamehud (gamebench capability 18 ui-menus-hud).
The bug classes each tooth exists to kill (every one shipped in a real engine somewhere):
T1 stale HUD -- HUD renders CACHED text instead of the live bound value
T2 impure render -- same state renders different pixels (kills replay/lockstep evidence)
T3 cursor clamp -- menu cursor clamps at the ends instead of wrapping (MUTATION TARGET)
T4 modal residue -- closing a menu does not restore the exact pre-menu frame
T5 out-of-bounds -- off-screen text/panel writes past the framebuffer (canary proves it can't)
T6 save amnesia -- HUD/menu state does not survive nx_gamesave round-trip (parts-compose tooth)
T7 nondeterminism -- the same nav script produces different selections/frames on a second run
T8 anti-vacuity -- guards that the equality teeth compared REAL ink and REAL distinct choices
(GX-9 law: a green gate that cannot fail is not evidence; T8 must stay GREEN under mutations)
license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gamehud.nxnx_gamesave.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
| 17 | const W: i64 = 200 |
| 18 | const H: i64 = 120 |
| 19 | const FBN: i64 = 72000 // W*H*3 |
| 20 | const CAN: i64 = 64 // canary bytes past the fb |
| 21 | const SCHEMA: i64 = 7411 |
| 22 | const INKMIN: i64 = 50 |
functions
| 24 | func ww(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 25 | func wn(v: i64) -> i64 |
| 34 | func fbnew() -> *u8 |
| 42 | func fbclear(fb: *u8) -> i64 |
| 47 | func fbdiff(a: *u8, b: *u8) -> i64 called by 1: main |
| 53 | func canck(fb: *u8) -> i64 called by 1: main |
| 61 | func navrun(font: *u8, labels: *i64, mlabels: *i64, out: *i64) -> i64 |
| 92 | func main() -> i64 |