Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(control-ui): assert automatic recovery in the real 429 journey
Alfredo Lopez7e15378a298e
diff --git a/control-ui/e2e/qa-recorder-admin-rate-limit-recovery.spec.ts b/control-ui/e2e/qa-recorder-admin-rate-limit-recovery.spec.tsindex 486d4e874..894f5e04d 100644--- a/control-ui/e2e/qa-recorder-admin-rate-limit-recovery.spec.ts+++ b/control-ui/e2e/qa-recorder-admin-rate-limit-recovery.spec.ts@@ -752,19 +752,19 @@ test.describe('optional QA recorder: administrative rate-limit journeys', () =>).toBeVisible()await screenshotAndLog(page, testInfo, 'admin-rate-limit-real-429-draft')- // Wait on the deadline supplied by the real guard, not a fixed delay.- await expect- .poll(() => Date.now(), {- timeout: retryAfter * 1_000 + 10_000,- message: 'Respect the observed server Retry-After deadline before the visible retry',- })- .toBeGreaterThanOrEqual(retryAt)- // The shared background recovery may read the denied inventory before or- // after this click; Retry reuses that result instead of forcing a second- // read, so assert the quota invariant rather than an exact read count.+ // The editor recovers on its own at the deadline supplied by the real+ // guard: the shared background recovery rereads the denied inventory and+ // the alert, with its Retry button, goes away without a click. Clicking+ // Retry here would race that recovery. The client starts its deadline+ // when the 429 arrives, slightly before retryAt, hence the tolerance.const readsBeforeDeadline = 3- await alert.getByRole('button', { name: 'Retry', exact: true }).click()- await expect(dialog.getByRole('alert')).toHaveCount(0)+ await expect(dialog.getByRole('alert')).toHaveCount(0, {+ timeout: retryAfter * 1_000 + 15_000,+ })+ expect(+ Date.now(),+ 'The automatic recovery must not read before the Retry-After deadline'+ ).toBeGreaterThanOrEqual(retryAt - 1_000)await expect(dialog.getByRole('status').filter({ hasText: 'Loading subscription options…' })).toHaveCount(0)@@ -779,7 +779,7 @@ test.describe('optional QA recorder: administrative rate-limit journeys', () =>).not.toContain(429)expect(afterDeadline.length,- 'Recovery and the visible Retry stay within one quota window'+ 'The automatic recovery stays within one quota window').toBeLessThanOrEqual(fixture.quota)expect(afterDeadline.every(read => read.path !== CAPABILITIES),diff --git a/control-ui/package-lock.json b/control-ui/package-lock.jsonindex 5a7ae44ef..d9687a302 100644--- a/control-ui/package-lock.json+++ b/control-ui/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-ui",- "version": "0.1.718",+ "version": "0.1.719","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-ui",- "version": "0.1.718",+ "version": "0.1.719","dependencies": {"@clerum/display-field": "file:../packages/display-field","@clerum/frontend-components": "file:../packages/frontend-components",diff --git a/control-ui/package.json b/control-ui/package.jsonindex 7a0c43a3f..7b0d7da53 100644--- a/control-ui/package.json+++ b/control-ui/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-ui",- "version": "0.1.718",+ "version": "0.1.719","private": true,"scripts": {"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",diff --git a/deploy/overlays/minikube/configmaps/control-api-config.yaml b/deploy/overlays/minikube/configmaps/control-api-config.yamlindex 65af5a2d1..f0ac70f08 100644--- a/deploy/overlays/minikube/configmaps/control-api-config.yaml+++ b/deploy/overlays/minikube/configmaps/control-api-config.yaml@@ -86,12 +86,12 @@ data:# strategic-merge PATCH over the base ConfigMap (registered under patches:# in the minikube kustomization). A key omitted here inherits the BASE value# from deploy/base/control-plane/configmaps.yaml (the deploy-mirror test- # pins base to the code defaults). All four keys are set explicitly so- # minikube's effective values (150/120/600/600) are visible here. Per-run- # SDK quotas are deprecated and ignored; limits are enforced over a- # trailing 60s window (no fixed reset); once traffic slows below the limit- # the window drains within ~60s — stepless recipes are never permanently- # trapped.+ # pins base to the code defaults). The SDK keys below are set explicitly at+ # those defaults so minikube's effective values are visible here. Per-run+ # SDK quotas are deprecated and ignored. Method quotas (notifications,+ # prompt bridge) use a trailing 60s window. Authenticated request and edge+ # budgets reset on the PostgreSQL calendar minute; anonymous IP backstops+ # keep first-hit 60s windows. See docs/architecture/administrative-rate-limits.md.CONTROL_API_PLUGIN_SDK_NOTIFICATIONS_PER_MIN: "750"CONTROL_API_PLUGIN_SDK_PROMPTBRIDGE_PER_MIN: "600"CONTROL_API_PLUGIN_SDK_REQUEST_BUCKET_PER_MIN: "6000"