code wiki / _hdl_build / nx_roku_cert_gate.nx
nx_roku_cert_gate.nx
buildroot/runtime/_hdl_build/nx_roku_cert_gate.nx
about
nx_roku_cert_gate.nx -- SOVEREIGN liar-kill gate for Roku Channel-Store cert-readiness (R7 of the Roku media-app
arc). Drives the REAL grid emitter to a test path, then mechanically proves -- ENTIRELY within Nishi (no python,
no device) -- that the emitted channel meets every STATICALLY-checkable Roku Store hard cert bar, via our own
opc_read_part / raw-zip inspection:
C1 valid ZIP package (PK\x03\x04)
C2 package <= 4 MB (Roku hard package-size limit)
C3 `manifest` present at zip root
C4 manifest -> title= (required manifest key)
C5 manifest -> major/minor/build_version (required version triplet)
C6 manifest -> mm_icon_focus_hd (required channel focus icon)
C7 channel icon PNG present + valid signature
C8 on-device auth: NO external login webpage (Roku bars web-login redirects)
C9 deep-link entry contract: Main(args)+args.contentId+args.mediaType (Store deep-linking)
C10 video all-models H.264 baseline (every declared stream must play on ALL models; vacuous w/ no video)
+ four LIAR-KILLS so the gate cannot false-green: an oversize package is rejected, a synthetic external-login
page is detected, an unknown part returns <0, and a deliberately NON-COMPLIANT channel (built here via
opc_write) fails the full cert evaluation (<10/10).
HONEST SCOPE: this proves the STATIC package + entry-point bars. The RUNTIME bars (launch<15s, video-start<8s,
back-button, on-TV deep-link routing) are DEVICE-verified and are printed as explicitly NOT covered. The
royalty-free-only (VP9/AV1) vs all-models-H.264 tension is printed as a DEFERRED risk for Track L (nx_counsel).
GREEN iff 14/14. Requires /tmp/nx_roku_grid_emit.sov.elf (build nx_roku_grid_emit first).
Durable knowledge/status/roku_cert_gate.log. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_opc.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| none |
functions
| 26 | func g_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 27 | func g_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 } |
| 28 | func g_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } calls 1: sys_write |
| 29 | func g_wn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 } |
| 30 | func g_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: g_contains |
| 31 | func g_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ dst[off+i]=s[i]; i=i+1 } return off+i } called by 1: cert_no_extlogin |
| 32 | func g_contains(hay: *u8, n: i64, needle: *u8) -> i64 |
| 38 | func cert_row(verbose: i64, label: *u8, ok: i64) -> i64 calls 1: g_puts |
| 42 | func g_run(elf: *u8, args: *i64, nargs: i64, out_path: *u8) -> i64 |
| 56 | func cert_size_ok(nbytes: i64) -> i64 { if nbytes>0 { if nbytes<=4194304 { return 1 } } return 0 } |
| 59 | func cert_no_extlogin(src: *u8, n: i64) -> i64 |
| 65 | func cert_video_allmodels(src: *u8, n: i64) -> i64 |
| 78 | func cert_eval(zip: *u8, verbose: i64) -> i64 |
| 126 | func build_bad_channel(path: *u8) -> i64 |
| 142 | func main() -> i64 |