code wiki / _hdl_build / nx_pub_go_games.nx
nx_pub_go_games.nx source
↩ module page · 34 lines · 2146 B
1import "nx_gate_gn.nx"
2import "nx_gate_base.nx"
3// nx_pub_go_games.nx -- operator-authorized GO-LIVE of the games portal, SURGICALLY (just this artifact). Deploys
4// ONLY the games page through the publisher's single-item pipeline (pub_publish_one: STAGE -> VERIFY-sha ->
5// ATOMIC-PROMOTE to liveroot + ledger), so the blanket governed drain (which would also publish 19 other
6// workstreams' held-outward items incl. UNVERIFIED live daemon binaries) is NOT triggered. Idempotent (rule #10),
7// reversible (.prev + append-only ledger). The publisher's local liveroot is the sovereign authoritative copy; the
8// NAS ship + host promote is the separate last mile. license_tier: ORIGINAL expect_exit: 0
9import "nx_syscalls.nx"
10import "nx_publisher.nx"
11
12func grow(name: *u8, ok: i64) -> i64 { if ok==1 { gw(" PASS " as *u8) } else { gw(" FAIL " as *u8) } gw(name); gw("
13" as *u8); return ok }
14
15func main() -> i64 {
16 pub_init()
17 gw("=== GO-LIVE (surgical): games portal -> publisher liveroot + ledger (operator-authorized) ===\n" as *u8)
18 let sha: *u8 = "5648c363d15bd321b1c1b670674f91dfea9ec78d9c9ec709d65389b59e8cc8fd" as *u8
19 let src: *u8 = "knowledge/sovereign-games.html" as *u8
20 let dest: *u8 = "/volume1/ai/hub/pages/games.html" as *u8
21 let led: *u8 = "knowledge/publish/ledger.tsv" as *u8
22 let before: i64 = pub_count_ledger(led)
23 let r: i64 = pub_publish_one(sha, src, dest, "nishifamily.com" as *u8, "knowledge/publish/stage" as *u8, "knowledge/publish/live" as *u8, led)
24 let after: i64 = pub_count_ledger(led)
25 gw("pub_publish_one(games sha 5648c363..) -> " as *u8); gn(r)
26 gw(" (1=PUBLISHED 0=idempotent-already <0=verify/deploy reject) ledger " as *u8); gn(before); gw("->" as *u8); gn(after); gw("\n" as *u8)
27 if r >= 0 {
28 gw("liveroot copy: knowledge/publish/live" as *u8); gw(dest); gw("\n" as *u8)
29 gw("VERDICT=GREEN -- games portal PUBLISHED in the sovereign publisher (liveroot + ledger). NAS ship+promote = last mile.\n" as *u8)
30 return 0
31 }
32 gw("VERDICT=RED -- deploy rejected (sha mismatch or IO); src unchanged since submit?\n" as *u8)
33 return 1
34}