code wiki / _hdl_build / nx_routeguard.nx
nx_routeguard.nx
buildroot/runtime/_hdl_build/nx_routeguard.nx
about
nx_routeguard.nx -- THIN ORGAN: run the deploy-contract check between two binaries.
nx_routeguard <live-artifact> <candidate-artifact>
Answers ONE question: does the candidate still serve every /api/ route the live one does?
exit 0 GREEN (superset -- safe on this axis) | exit 3 RED (routes vanished) | exit 2 REFUSED.
USE IT BEFORE EVERY mgmt DEPLOY. The 2026-07-30 regression (5th occurrence) happened because a
528323-byte artifact was promoted over a 575195-byte one and nothing compared their surfaces --
the deploy reported success while /api/gate_run and /api/proc_kill silently vanished, and the
sovereign process-kill verb was gone exactly when a runaway process needed killing.
REFUSES RATHER THAN BLESSES: if the LIVE image yields zero routes, this exits 2, because
"0 missing" computed from an empty expectation reads as SAFE while guaranteeing nothing. A guard
that cannot see its subject must say so, not pass it.
license_tier: ORIGINAL Read-only -- it never promotes, deletes or writes. (Rule 26) expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_routeguard_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 19 | const RGO_OUT: i64 = 65536 |
functions
| 21 | func rgo_cat(o: *u8, at: i64, s: *u8) -> i64 called by 1: main |
| 27 | func rgo_num(o: *u8, at: i64, v: i64) -> i64 called by 1: main |
| 38 | func main(argc: i64, argv: *i64) -> i64 |