Skip to content

test(quota): wait for serving overlay revision - #120

Merged
nerdalert merged 1 commit into
praxis-proxy:mainfrom
nerdalert:fix/quota-serving-revision-gate
Sep 4, 2026
Merged

test(quota): wait for serving overlay revision#120
nerdalert merged 1 commit into
praxis-proxy:mainfrom
nerdalert:fix/quota-serving-revision-gate

Conversation

@nerdalert

@nerdalert nerdalert commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary

The distributed token-quota integration test previously began traffic after Grid had published valid overlays, but it did not prove that both Praxis consumer gateways had loaded and were serving that exact revision. During initial convergence, this could make otherwise-correct routing and distribution assertions run against stale gateway state.

This change replaces that accepted-overlay-only check with a serving-revision convergence gate.

Before quota traffic starts, the test now requires both west consumer gateways to report:

  • a valid three-candidate roundRobin overlay from Grid;
  • non-empty stable candidate IDs in selection group zero;
  • a Praxis accepted revision equal to the Grid revision;
  • a Praxis serving revision equal to the Grid revision;
  • the same shared revision across both consumers;
  • the same valid state on a second poll.

The polling remains state-based and bounded to 240 seconds. A timeout reports the last observed Grid, Praxis accepted, and Praxis serving revision for each gateway, which makes bootstrap and reload failures diagnosable without weakening the qualification.

Parsing and coverage

Praxis revision fields are read from the current gateway logs after ANSI SGR sequences are removed. Field matching requires an exact whitespace boundary, so serving_revision cannot be taken from previous_serving_revision or retained_serving_revision. Quoted and unquoted field values are supported.

Seven focused tests cover:

  • an exact two-consumer revision match;
  • one consumer serving an older revision;
  • consumers serving different revisions;
  • ANSI-colored log output;
  • quoted and unquoted values;
  • false-match rejection for previous_serving_revision;
  • timeout diagnostics for both consumers.

The existing authentication, quota, candidate, routing, and cleanup assertions are unchanged.

Validation

The first isolated Kind run passed all 10 token-quota scenarios:

  • sampled provider sequence: west, central, east, west;
  • shared-budget denial passed;
  • no distribution retries were required;
  • automatic cleanup succeeded;
  • no run-owned Kind clusters remained.

A separate repeatability run was started independently and is not claimed by this PR description until its evidence completes.

Scope

Only xtask/src/env/token_rate_limit_qualification.rs is committed. Generated Forge resolution files and runtime evidence directories were deliberately excluded. No Grid production controller, overlay, routing, AI, Praxis, topology, or policy code is changed.

Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
@nerdalert
nerdalert merged commit ee69e74 into praxis-proxy:main Sep 4, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant