code wiki / _hdl_build / nx_deploy.nx
nx_deploy.nx
buildroot/runtime/_hdl_build/nx_deploy.nx
about
nx_deploy.nx -- the team's SOVEREIGN deploy-with-rollback capability (operator: pushing site updates
with rollback must be a bits-up Nishi capability, layer 8 up, NO 3rd party, S-class-EXCEED practices).
The transfer is the sovereign ssh_put_file (proven live on the NAS, no scp); this module encodes the
SAFE-DEPLOY decision logic that wraps it, the practices a production deploy must follow:
1. BACKUP the current artifact BEFORE any swap (never deploy without a rollback point)
2. ATOMIC SWAP (write .new, then rename -- never a half-written live file)
3. HEALTH-CHECK after swap (is the service actually up + serving?)
4. ROLLBACK automatically if the health-check fails (restore the backup)
5. SOVEREIGN TRANSFER (ssh_put_file over CHANNEL_DATA, not scp)
A deploy NEVER touches production unless a backup exists AND the transfer verified. license_tier: ORIGINAL
dependencies 1 imports · 4 importers
imports: nx_syscalls.nx
imported by: nx_deploy_check.nxnx_deploy_test.nxnx_release_master.nxnx_release_master_gate.nx
structs
| none |
consts
| 14 | const DEP_ABORTED: i64 = 0 // pre-conditions failed -> production never touched |
| 15 | const DEP_DEPLOYED: i64 = 1 // swapped + healthy |
| 16 | const DEP_ROLLED_BACK: i64 = 2 // swapped but unhealthy -> backup restored |
functions
| 19 | func dep_ready(backup_taken: i64, transfer_ok: i64) -> i64 |
| 26 | func dep_verdict(backup_taken: i64, transfer_ok: i64, health_ok: i64) -> i64 |
| 33 | func dep_rollback_clean(verdict: i64, restored: i64) -> i64 |
| 39 | func dep_prod_alive(verdict: i64, restored: i64) -> i64 called by 1: main |
| 47 | func dep_practice_score(backup: i64, atomic_swap: i64, healthcheck: i64, rollback: i64, sovereign_transfer: i64) -> i64 |