code wiki / _hdl_build / nx_brand_publish_submit.nx

nx_brand_publish_submit.nx source

↩ module page · 43 lines · 2853 B

1import "nx_gate_gn.nx" 2import "nx_gate_base.nx" 3// nx_brand_publish_submit.nx -- pass the BRAND UPDATE to THE NISHI PUBLISHER the lawful way: via pub_submit (the 4// single sanctioned intake), NOT a direct push. Operator: "pass updates to the nishi publisher." Submits the 5// branded andelinwest homepage as an OUTWARD request -> it is QUEUED + sha-stamped + HELD until the operator 6// approves the exact artifact (R6 policy gate). This honors the Publisher LAW ([[project-nishi-publisher-role]]) 7// and the no-bypass audit (this file calls ONLY pub_submit + read-only status/dryrun -- never nx_aw_send/push or 8// pub_deploy/promote). 100% sovereign. 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 gw("=== passing the brand update to THE NISHI PUBLISHER (pub_submit -- the single sanctioned intake) ===\n" as *u8) 17 18 // submit the branded andelinwest homepage as an OUTWARD request (operator-gated by construction) 19 let r: i64 = pub_submit("web_assets/andelin_branded.html" as *u8, "andelinwest/index.html" as *u8, "andelinwest" as *u8, "brand-ux-cx-arc-2026-06-21" as *u8, "outward" as *u8) 20 gw("pub_submit(andelin_branded.html -> andelinwest/index.html, policy=outward): result=" as *u8); gn(r); gw("\n" as *u8) 21 if r != 1 { gw("SUBMIT FAILED (src missing or queue error)\n" as *u8); return 1 } 22 23 let approvald: *u8 = "knowledge/publish/approved" as *u8 24 let st: *i64 = sys_mmap(64) as *i64 25 pub_status(pub_queue_default(), pub_ledger_default(), approvald, st) 26 gw("publisher status -> PENDING=" as *u8); gn(st[0]); gw(" PUBLISHED(ledger)=" as *u8); gn(st[1]) 27 gw(" ready-now=" as *u8); gn(st[2]); gw(" HELD(awaiting operator approval)=" as *u8); gn(st[3]); gw("\n" as *u8) 28 29 let pl: *i64 = sys_mmap(64) as *i64 30 pub_dryrun(pub_queue_default(), pub_ledger_default(), approvald, pl) 31 gw("dry-run (zero side effects) -> would-publish-now=" as *u8); gn(pl[1]); gw(" held=" as *u8); gn(pl[2]) 32 gw(" (OUTWARD requires operator approval of the exact sha -> NOT auto-pushed)\n" as *u8) 33 34 var ok: i64 = 0 35 if r == 1 { if st[0] >= 1 { if pl[1] == 0 { ok = 1 } } } // submitted + queued + correctly HELD (0 ready) 36 if ok == 1 { 37 gw("\nVERDICT=GREEN -- update QUEUED in the publisher + HELD for operator approval. No direct push; Publisher LAW honored.\n" as *u8) 38 gw("TO GO LIVE (operator): approve the exact artifact (pub_approve by content sha) -> pub_run_governed stages->verifies->atomic-promotes->smoke-tests->ledgers.\n" as *u8) 39 return 0 40 } 41 gw("\nVERDICT=RED -- unexpected publisher state (an outward request should be HELD, not ready)\n" as *u8) 42 return 1 43}