Repository navigation
Keep the admin MFA rate-limit burst inside one limiter window - #2396
Merged
Merged
Conversation
The local rate limiter counts in clock-aligned 60s windows and clears its buckets at each boundary. The scenario's six-request burst fails when it straddles a minute boundary, because the sixth request lands in a fresh window. Start the burst with at least 10s of the window left.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 3e2883b | Oct 25 2026, 09:38 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 3e2883b | Commit Preview URL Branch Preview URL |
Oct 25 2026, 09:38 PM |
Contributor
Cloudflare previewTorn down — the PR is closed. |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
RhysSullivan
marked this pull request as ready for review
October 25, 2026 21:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Admin MFA API · restarting enrollment cannot reset the rate limitfailed onmainat bfc9152 with[200, 200, 200, 200, 200, 200]where it expects the sixth start to get 429.ADMIN_MFA_RATE_LIMITERallows 5 per 60s. The local limiter (miniflare) counts in clock-aligned windows,Math.floor(Date.now() / 60_000), and clears every bucket when the window changes. The failing burst finished at 21:25:00.0, so it straddled a minute boundary and the sixth request was counted in a fresh window. The odds per run are about the burst's duration over 60s, roughly 1%.The scenario now starts the burst with at least 10s of the current window left, waiting into the next window when needed. The assertion is unchanged.