code wiki / _hdl_build / nx_deploy_run.nx
nx_deploy_run.nx
buildroot/runtime/_hdl_build/nx_deploy_run.nx
about
nx_deploy_run.nx -- the RUNNABLE one-command safe deploy (retires the F-level 3-command manual dance).
The existing nx_deploy.nx encodes the safe-deploy DECISION PREDICATES (backup/atomic-swap/health/rollback)
but was never wired to actually run a deploy (no exec, no artifact validation). This organ is that wiring:
VALIDATE the artifact (fail-closed, the missing pre-flight) -> PROMOTE via the proven nx_aw_hostctl (atomic
rename + respawn) -> HEALTH-VERIFY (hostctl status) -> AUTO-ROLLBACK if unhealthy (restore .prev, never leave
the site down) -> record the outcome in the publish ledger. Composes proven organs + the gated nx_deploy_lib.
argv[1]=kind(0 bin/1 html/2 any) argv[2]=local_src argv[3]=hostctl_subcommand(deploy|wikideploy|galxdeploy|...).
Staging the artifact to the NAS (nx_aw_send/nx_pub_ship) is the prerequisite; this adds the SAFETY around the
promote -- the part that was missing. license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_http_health_lib.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 11 | const K_MAGIC_16384: i64 = 16384 |
| 12 | const K_MAGIC_16380: i64 = 16380 |
functions
| 14 | func dp_atoi(p: *u8) -> i64 { var v: i64=0; var i: i64=0; while p[i]!=(0 as u8){ let c: i64=p[i] as i64; if c>=48{ if c<=57{ v=v*10+(c-48) } } i=i+1 } return v } |
| 15 | func dep_ledger(path: *u8, status: *u8, src: *u8, sub: *u8) -> i64 |
| 24 | func main(argc: i64, argv: *i64) -> i64 |