gw-08 — Verification

One command

cd gw-08-envoy-xds-control-plane && bash scripts/verify.sh

What the tests prove

TestInvariant
TestSnapshotConsistencyroutes→clusters and listeners→routes must resolve (the ADS-ordering invariant); a good snapshot is consistent
TestFingerprintStabilitycontent hash is order-independent; identical resources hash identically, different ones differ
TestSubscribePushesCurrentsubscribing receives the current snapshot immediately
TestAckNackFlowACK advances the applied version; NACK keeps last-known-good and records the reason; a later ACK clears it
TestSetSnapshotRejectsInconsistentan inconsistent push is rejected and the previous snapshot stays in force
TestReconcileDebounceAndChangea no-op reconcile pushes nothing; a membership change pushes a new version
TestReconcileKeepsLastGoodOnErroran 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.