nx_golive.nx
buildroot/runtime/nx_golive.nx
about
nx_golive.nx -- ONE-COMMAND domain purchase->live DRIVER. Composes the proven executors
(nx_porkbun_domain's pbd_* + nx_acme_porkbun's DNS) into a single ordered, spend-safe, auto-quoting
walk that HALTS at the two operator gates. This is the "deploy it from here without any issues"
front door: the operator runs ONE command; the driver reads the live quote itself, checks it against
the cap, dry-runs the purchase server-side, and STOPS -- it will not spend or mutate the edge without
the explicit confirm tokens.
nx_golive <domain> <credfile> <cap_cents> [confirm-spend] [confirm-edge]
STAGES (each STOPS on failure; the pipeline never proceeds past a red step):
1 CHECK live availability + AUTO-EXTRACT the quote (cents) from the registrar
2 CAP quote <= cap_cents, else STOP (the spend ceiling is the operator's, passed in)
3 DRYRUN server-side create dryRun:true -- full preflight, ZERO charge (SUCCESS => wouldSucceed)
-- GATE A: no `confirm-spend` => STOP here with the exact cost; re-run with the token to buy
4 REGISTER real create (spends account credit); parse orderId
5 WANIP ping -> our public IP (for the A records)
6 DNS publish A @ + www -> our IP
7 CERT ssl/retrieve the bundle (saved 0600; key never printed)
-- GATE B: no `confirm-edge` => STOP; edge SNI+route is operator-gated (contended NAS files)
8 EDGE/VERIFY -- left to the never-brick mgmt plane + a live 200 check (operator-driven)
license_tier: ORIGINAL
dependencies 1 imports · 1 importers
imports: nx_porkbun_domain.nx
imported by: nx_golive_gate.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 23 | const K_MAGIC_2048: i64 = 2048 |
functions
| 25 | func gl_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } called by 1: main |
| 26 | func gl_nn(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 } called by 1: main |
| 27 | func gl_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 28 | func gl_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 35 | func gl_body(resp: *u8, total: i64, boff: *i64, blen: *i64) -> i64 called by 4: gl_json_centsgl_json_isgl_json_copymain calls 2: nx_http_resp_allocnx_http_response_parse |
| 43 | func gl_dollars_to_cents(buf: *u8, off: i64, len: i64) -> i64 |
| 64 | func gl_json_cents(resp: *u8, total: i64, key: *u8, keylen: i64) -> i64 |
| 74 | func gl_json_is(resp: *u8, total: i64, key: *u8, keylen: i64, want: *u8) -> i64 |
| 88 | func gl_json_copy(resp: *u8, total: i64, key: *u8, keylen: i64, out: *u8, cap: i64) -> i64 |
| 103 | func gl_create(raw: *u8, ao: i64, an: i64, so: i64, sn2: i64, dom: *u8, quote: i64, is_dry: i64, |
| 119 | func main(argc: i64, argv: *i64) -> i64 |