Repository navigation
Release limiter 4.0.0 - #104
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 12d67d26d8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| equality checks on fractional balances; use `tryRemoveTokens()` to check | ||
| whether a request can proceed immediately. | ||
|
|
||
| Zero-value conventions are unchanged: a standalone `TokenBucket` with |
There was a problem hiding this comment.
Document the changed zero-limit return value
For a RateLimiter configured with tokensPerInterval: 0, version 3 resolved removeTokens(0) with Infinity via the zero-size TokenBucket special case, whereas version 4 resolves it with this.tokenBucket.content, which is 0. Consumers that inspect the resolved balance can therefore change behavior on upgrade despite this statement that zero-value conventions are unchanged; either preserve the previous return value or call out this compatibility change in the migration notes.
Useful? React with 👍 / 👎.
Release the merged concurrency and accounting fixes as
limiter@4.0.0. Use a major version because invalid numeric inputs now reject and waiting requests use FIFO ordering, both observable behavior changes that consumers should opt into.Add a 3.x migration guide to the README, finalize the changelog, and include it in the npm package. Exclude test files and TypeScript build caches from the published archive. No runtime code changes beyond merged PR #103.
Validation: lint, all 27 tests, both TypeScript builds, package-content inspection, and CommonJS/ESM smoke checks against the packed package. Publishing follows the merged release commit.