CI Kind E2E Implementation

This document describes the CI coverage for AGN’s Kind-based end-to-end validation suite.
On this page

This document describes the CI coverage for AGN’s Kind-based end-to-end validation suite.

Validation tiers

TierScopePurpose
StaticFormatting, linting, documentation, CRD schema checksCatches deterministic issues before any cluster work starts.
UnitOperator, scoring, xtask, and parser testsValidates controller logic, overlay rendering, scoring, metrics handling, and harness helpers without Kind.
Smoke KindSingle-topology operator routing validationProves the operator can reconcile resources, render an overlay, and drive a consumer gateway in Kind.
Multi-cluster KindSWIM, CRDT, stale GC, metrics routing, and credential validationProves the distributed control-plane paths across multiple Kind clusters.
Single-cluster multi-gateway KindShared-site overlays, independent consumer processes, provider attribution, and gateway failure behaviorProves that multiple gateways can share one Kubernetes control plane without implying cross-cluster behavior.

Gate implementation

CI gating is organized as static + unit + smoke Kind for the fast path. The multi-cluster suite runs on main, nightly, or release validation because it requires multiple Kind clusters and serialized execution.

Sequence:

  1. Static checks and unit tests on every PR.
  2. validate-operator-routing as the first Kind PR gate.
  3. verify-swim-membership and verify-swim-state for distributed membership validation.
  4. Full two-provider suite for nightly or release validation.

Single-cluster multi-gateway coverage

The run-grid-single-cluster-multi-gateway-qualification command uses one Kind cluster, one AGN Operator, one GridNetwork, and one GridSite named single, with two consumer gateways and three provider gateways. It is distinct from both a single gateway smoke test and the multi-cluster provider-traffic qualification: the single-cluster test shares one site, Kubernetes control plane, and overlay state, while the multi-cluster test exercises multiple sites connected through SWIM. Provider-selection cursors remain local to each Praxis process. The qualification must prove accepted and serving overlay revisions, per-consumer attributed traffic, provider withdrawal and restoration, consumer failure, and positive and negative security probes before it can report success.

Topology and execution details are maintained in the single-cluster topology README.

Multi-cluster coverage set

ValidationBehavior proven
verify-swim-membershipReal SWIM gossip drives GridNetwork membership state.
verify-swim-stateCRDT-over-SWIM provider state propagates across sites.
verify-swim-dns-hostnamesHostname-based advertise and seed endpoints resolve before SWIM startup, then membership and provider-state propagation are verified.
verify-metrics-routingLive normalized metrics affect overlay ordering and request routing.
verify-stale-gc-ttlAged stale candidates are omitted from rendered overlays when TTL is configured.
verify-api-fallback-nativeProvider credentials are injected from mounted Secret files, not overlay or ConfigMap token bytes.
verify-failover-under-lost-peerLost peer state degrades remote candidates and routes shared-model traffic to healthy fallback capacity.

Sequencing requirements

Multi-cluster validations run sequentially. The current suite assumes shared cluster names and shared local operator process ports. Sequential execution avoids:

  • SWIM UDP port conflicts
  • Overlapping writes to the same Kind clusters
  • Stale test fixtures from a previous validation affecting the next
  • Competing gateway or provider deployments with the same names

Static and unit jobs run in parallel with each other. Kind jobs are serialized until the harness supports per-job cluster name isolation.

Environment requirements

CI runners require:

  • Docker access for Kind
  • kind
  • kubectl
  • The repository Rust toolchain
  • The nightly toolchain used by formatting checks
  • Gateway and mock-provider images available to Kind
  • Permission to create and delete local Kind clusters

The Praxis AI gateway image must include the data-plane filters required for AGN routing and by the validation suite. CI consumes a reviewed, published image rather than building an unpinned image during the test job.

Flake controls

Each Kind run starts from a clean environment:

cargo xtask env down -c tests/env/<config>.toml
cargo xtask env up -c tests/env/<config>.toml
cargo xtask env load-gateway-images -c tests/env/<config>.toml

SWIM and failover tests do not use automatic retries. Those tests exercise process lifecycle and membership timing; retrying from a partially mutated cluster state can hide real bugs. If a retry is needed, it is a full clean down / up rerun.

Runtime tiers

TierTriggerApproximate runtime
Static + unitEvery PR2-4 minutes
Smoke KindEvery PR (requires resolved gateway image)5-8 minutes
Multi-cluster KindMainline, nightly, or release qualification35-45 minutes
Full release sweepManual or release candidate60+ minutes

Multi-cluster gate requirements

The full multi-cluster suite requires:

  • A reviewed Praxis AI gateway image with the required routing filters must be published and referenced by CI.
  • Kind cluster names must be either isolated per-job or the suite must run serially on a single runner.
  • A reusable cleanup preflight removes all known E2E resources before a suite starts, making sequential runs reliable.