code wiki / _hdl_build / nx_pub_go_games.nx

nx_pub_go_games.nx source

↩ module page · 47 lines · 3611 B

1// nx_pub_go_games.nx -- operator-authorized GO-LIVE of the games portal, SURGICALLY (just this artifact). Deploys 2// ONLY the games page through the publisher's single-item pipeline (pub_publish_one: STAGE -> VERIFY-sha -> 3// ATOMIC-PROMOTE to liveroot + ledger), so the blanket governed drain (which would also publish 19 other 4// workstreams' held-outward items incl. UNVERIFIED live daemon binaries) is NOT triggered. Idempotent (rule #10), 5// reversible (.prev + append-only ledger). The publisher's local liveroot is the sovereign authoritative copy; the 6// NAS ship + host promote is the separate last mile. license_tier: ORIGINAL expect_exit: 0 7import "nx_syscalls.nx" 8import "nx_publisher.nx" 9 10func gw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } 11func gn(v: i64) -> i64 { var m: i64=v; if m<0{gw("-" as *u8);m=0-m} let t:*u8=sys_mmap(24); 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; let o:*u8=sys_mmap(24); while i<k{o[i]=t[k-1-i];i=i+1} sys_write(1,o,k); return 0 } 12 13func main() -> i64 { 14 pub_init() 15 gw("=== GO-LIVE (surgical): games portal -> publisher liveroot + ledger (operator-authorized) ===\n" as *u8) 16 // THE SHA PIN IS THE AUTHORIZATION, not a cache key: pub_publish_one refuses unless the source 17 // hashes to exactly this, so updating this constant IS the deliberate act of authorizing new bytes 18 // to go live. It correctly refused the v2 page until this line was changed. 19 // 2026-08-10: v2 games portal. Sudoku moved to /games/sudoku as a sovereign wasm module (its JS 20 // deleted), the /world/* engines folded into one canonical index, boards made intrinsic so the 21 // page passes WCAG 2.1 SC 1.4.10 Reflow at 320px. Verified before authorizing: nx_uiq_responsive 22 // GREEN (fixed_grids=0 reflow_fails=0), nx_uiq_perf PASS, nx_uiq_contrast PASS, and the emitter 23 // run ON THIS HOST produced these exact 14799 bytes. 24 // previous pin: 5648c363d15bd321b1c1b670674f91dfea9ec78d9c9ec709d65389b59e8cc8fd 25 let sha: *u8 = "2e969f2adb31bdd31b9b2ff625f51163ca8180427caacfbd15a968077e7bf2c8" as *u8 26 let src: *u8 = "knowledge/sovereign-games.html" as *u8 27 let dest: *u8 = "/volume1/ai/hub/pages/games.html" as *u8 28 let led: *u8 = "knowledge/publish/ledger.tsv" as *u8 29 let before: i64 = pub_count_ledger(led) 30 let r: i64 = pub_publish_one(sha, src, dest, "nishifamily.com" as *u8, "knowledge/publish/stage" as *u8, "knowledge/publish/live" as *u8, led) 31 let after: i64 = pub_count_ledger(led) 32 // Print the ACTUAL pin, never a hardcoded prefix. The literal here used to read "sha 5648c363.." 33 // and stayed behind when the pin was updated, so the diagnostic asserted a sha the code was no 34 // longer using -- a report that disagrees with its own subject is worse than no report, because it 35 // is read as evidence. Echoing the variable makes that class of drift impossible. 36 gw("pub_publish_one(src=" as *u8); gw(src) 37 gw(" pin=" as *u8); gw(sha) 38 gw(") -> " as *u8); gn(r) 39 gw(" (1=PUBLISHED 0=idempotent-already <0=verify/deploy reject) ledger " as *u8); gn(before); gw("->" as *u8); gn(after); gw("\n" as *u8) 40 if r >= 0 { 41 gw("liveroot copy: knowledge/publish/live" as *u8); gw(dest); gw("\n" as *u8) 42 gw("VERDICT=GREEN -- games portal PUBLISHED in the sovereign publisher (liveroot + ledger). NAS ship+promote = last mile.\n" as *u8) 43 return 0 44 } 45 gw("VERDICT=RED -- deploy rejected (sha mismatch or IO); src unchanged since submit?\n" as *u8) 46 return 1 47}