Skip to content

fix: stabilize session date and connection test rate - #569

Open
Kaguya-19 wants to merge 6 commits into
OpenBMB:mainfrom
Kaguya-19:codex/connection-rate-session-date
Open

Kaguya-19 wants to merge 6 commits into
OpenBMB:mainfrom
Kaguya-19:codex/connection-rate-session-date

Conversation

@Kaguya-19

@Kaguya-19 Kaguya-19 commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • increase model connection-test limit from 5 to 20 requests per minute
  • distinguish an in-flight test (TEST_BUSY) from a true request-rate limit (RATE_LIMITED)
  • cap the entire multi-model connection-test batch at 60 seconds so stalled probes release the per-user slot
  • keep busy and invalid retries from consuming the one-minute rate bucket
  • return the actual remaining Retry-After for both per-user contention and a full global probe pool
  • keep the onboarding button and error message on the same live countdown, then clear the retry message at zero
  • prevent rapid repeated clicks from submitting duplicate connection tests
  • remove the superseded session-date implementation now covered by merged PR fix(context): stabilize session prompt dates and append daily updates #571

Root cause

A multi-model test could run sequential 60-second probes without a batch timeout, holding the per-user concurrency slot for several minutes. Retries were mapped from TEST_BUSY to RATE_LIMITED and also counted against the minute bucket, so waiting one minute did not clear the apparent rate-limit error. The global probe limiter also lacked global start-time tracking, causing unrelated users to receive an unhelpful one-second retry delay when all slots were occupied.

Validation

  • npm test -- server/routes/onboarding.test.js server/routes/config.test.js src/components/onboarding/view/subcomponents/LlmConfigurationStep.test.tsx (132 passed)
  • global-pool regression coverage verifies the fourth user receives the earliest active probe slot as Retry-After
  • retry countdown coverage verifies both the button and error message update each second and the message clears at zero
  • regression coverage verifies 21 busy retries do not consume the rate bucket and the next request succeeds after the active test finishes
  • node --import tsx --test --test-timeout 60000 tests/context/cache-runtime.spec.ts (4 passed after removing the superseded date test)
  • targeted ESLint passes for the updated onboarding server files
  • git diff --check passes

@mssssss123
mssssss123 self-requested a review September 11, 2026 05:38
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