gw-08 — Verification
One command
cd gw-08-envoy-xds-control-plane && bash scripts/verify.sh
What the tests prove
| Test | Invariant |
|---|---|
TestSnapshotConsistency | routes→clusters and listeners→routes must resolve (the ADS-ordering invariant); a good snapshot is consistent |
TestFingerprintStability | content hash is order-independent; identical resources hash identically, different ones differ |
TestSubscribePushesCurrent | subscribing receives the current snapshot immediately |
TestAckNackFlow | ACK advances the applied version; NACK keeps last-known-good and records the reason; a later ACK clears it |
TestSetSnapshotRejectsInconsistent | an inconsistent push is rejected and the previous snapshot stays in force |
TestReconcileDebounceAndChange | a no-op reconcile pushes nothing; a membership change pushes a new version |
TestReconcileKeepsLastGoodOnError | an inconsistent desired state errors without pushing; last-known-good remains |
All under -race.
Demo (xdsdemo, in verify.sh)
Shows: initial push + ACK, a debounced no-op, a scale-up new version, and an inconsistent push rejected with last-known-good retained.
What "green" does NOT guarantee
- Not real xDS-over-gRPC. This models the protocol mechanics in
stdlib; driving an actual Envoy uses
go-control-plane(steps/01). - State-of-the-world only. Delta xDS and on-demand discovery are exercises (GUIDE §6.2/§6.3).
- No per-node canary in the cache demo. Staged rollout by node group is an exercise (GUIDE §6.1) and the basis of gw-12.