Skip to content

Comments

fix: batch account hydration to prevent 429 rate limits#29

Merged
ndycode merged 1 commit intomainfrom
fix/auth-rate-limit
Feb 22, 2026
Merged

fix: batch account hydration to prevent 429 rate limits#29
ndycode merged 1 commit intomainfrom
fix/auth-rate-limit

Conversation

@ndycode
Copy link
Owner

@ndycode ndycode commented Feb 22, 2026

fixes a vulnerability in index.ts where Promise.all allowed unbounded concurrent requests to openai's auth0 endpoints during account hydration.

changes:

  • replaced the unbounded Promise.all over all stored accounts with a batched concurrency pool.
  • set chunk size to 3 to prevent instant 429 rate limit blocks when hydrating >10 accounts.

this touches the startup hydration path. isolated in a clean branch and ran npm run build && npm run test. everything is green locally.

let me know if you need changes to the implementation.

@ndycode ndycode merged commit 6ba4722 into main Feb 22, 2026
@ndycode ndycode deleted the fix/auth-rate-limit branch February 22, 2026 22:35
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