gw-12 — Verification
One command
cd gw-12-capstone-gateway-migration && bash scripts/verify.sh
What the tests prove
| Test | Invariant |
|---|---|
TestAnalyzePromoteWhenHealthy | a canary within error/latency tolerance is promoted |
TestAnalyzeRollbackOnErrors | an error-rate breach beyond the delta rolls back |
TestAnalyzeRollbackOnLatency | a tail-latency breach beyond the ratio rolls back |
TestLadderRampsToFullWhenHealthy | a healthy rollout ramps to 100% |
TestLadderRollsBackOnSLOBreach | an SLO breach at 25% auto-rolls-back to the last good stage (5%) |
TestShadowDiff | shadow detects new-vs-old response diffs (1% here) |
TestShadowZeroRiskWhenNewPathBroken | even a fully-broken new path never affects served users (shadow only compares) |
All under -race.
Demo (rolloutsim, in verify.sh)
- a healthy rollout reaching 100%,
- a rollout that breaches at 25% and auto-rolls-back to 5% (old path warm),
- shadow validation catching diffs before any user is exposed.
What "green" does NOT guarantee
- Threshold canary, not statistical. Production uses Kayenta-style analysis (exercise §7.1).
- No blast-radius staging by region/cell. Region-by-region rollout + PodDisruptionBudgets is an exercise (§7.3).
- Not wired to the live phase. Gating on real gw-11 metrics from a gw-03+gw-04 stack and rolling back via gw-08 is the capstone exercise (docs/analysis.md, GUIDE §7.4).
- The org work is on you. The design doc, stakeholder alignment, and rehearsed rollback (the actual "5" differentiators) are described in CONCEPTS / analysis, not code.