code wiki / _hdl_build / nx_deploy.nx

nx_deploy.nx

buildroot/runtime/_hdl_build/nx_deploy.nx

2748 B55 linesdepth 2pulls 2 transitivereach 4 importersview sourcekind librarytopic deploy
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_deploy.nx nx_deploy_check.nx nx_deploy_test.nx nx_release_master.nx nx_release_master_gate.nx

imports: nx_syscalls.nx

imported by: nx_deploy_check.nxnx_deploy_test.nxnx_release_master.nxnx_release_master_gate.nx

structs

none

consts

14const DEP_ABORTED: i64 = 0 // pre-conditions failed -> production never touched
15const DEP_DEPLOYED: i64 = 1 // swapped + healthy
16const DEP_ROLLED_BACK: i64 = 2 // swapped but unhealthy -> backup restored

functions

19func dep_ready(backup_taken: i64, transfer_ok: i64) -> i64
26func dep_verdict(backup_taken: i64, transfer_ok: i64, health_ok: i64) -> i64
called by 3: mainmainrm_deploy calls 1: dep_ready
33func dep_rollback_clean(verdict: i64, restored: i64) -> i64
called by 2: mainmain
39func dep_prod_alive(verdict: i64, restored: i64) -> i64
called by 1: main
47func dep_practice_score(backup: i64, atomic_swap: i64, healthcheck: i64, rollback: i64, sovereign_transfer: i64) -> i64
called by 2: mainmain