code wiki / _hdl_build / nx_deploy_verify.nx

nx_deploy_verify.nx

buildroot/runtime/_hdl_build/nx_deploy_verify.nx

2892 B52 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic deploy
docsdependenciesstructsconstsfunctions

about

nx_deploy_verify.nx -- the team's capability to ADDRESS the deploy RISK + UNCERTAINTY (operator: "if there is risk build the team to address the risk and uncertainty"). The risk: rebuilding a production binary from a source that may be drifted/unpinned could REGRESS the live site. The fix is differential equivalence (the Referee discipline applied to deploy): a swap is SAFE only if (1) the build is even VERIFIABLE (source pinned + the rebuild runs), (2) the rebuild serves byte-IDENTICAL content to the LIVE site on EVERY existing route (no regression), and (3) the new route is present + correct. Crucially, when the source is NOT pinned (the current reality), the verdict is UNVERIFIABLE -> DO NOT SWAP -- the team refuses to gamble with the live family site instead of cutting the corner. license_tier: ORIGINAL Pairs with nx_deploy (backup+rollback) + nx_referee (objective equivalence).

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_deploy_verify.nx nx_deploy_verify_test.nx

imports: nx_syscalls.nx

imported by: nx_deploy_verify_test.nx

structs

none

consts

13const DV_REGRESS: i64 = 0 // a route differs / new route wrong -> swap would break the live site
14const DV_SAFE: i64 = 1 // reproduces live on every route + new route ok -> safe to swap
15const DV_UNVERIFIABLE: i64 = 2 // can't even verify (source not pinned / rebuild won't run) -> DO NOT SWAP

functions

18func dv_routes_equivalent(n: i64, live: *i64, rebuild: *i64) -> i64
called by 1: main
23func dv_first_divergent_route(n: i64, live: *i64, rebuild: *i64) -> i64
called by 1: main
30func dv_verifiable(source_pinned: i64, rebuild_runs: i64) -> i64
called by 1: main
37func dv_verdict(verifiable: i64, equivalent: i64, new_route_ok: i64) -> i64
called by 1: main
45func dv_safe_to_swap(verdict: i64) -> i64 { if verdict == DV_SAFE { return 1 } return 0 }
called by 1: main
48func dv_live_protected(verdict: i64, swapped: i64) -> i64
called by 1: main