Skip to content

Add cooldown estimates and prepare limiter 4.1 - #105

Merged
jhurliman merged 1 commit into
mainfrom
maintenance/issue-triage
Sep 10, 2026
Merged

jhurliman merged 1 commit into
mainfrom
maintenance/issue-triage

Conversation

@jhurliman

Copy link
Copy Markdown
Owner

Adds a non-consuming RateLimiter.getWaitTime(count) so callers can report cooldowns without confusing the token bucket's balance with the interval allowance. It accounts for both constraints, rounds up to milliseconds, validates impossible requests, and documents that competing/queued work can change the estimate.

The README now leads with runnable examples, an API comparison, and explicit timing/composition semantics. Packaging exposes declarations for CommonJS, ESM, and legacy TypeScript resolution, and npm pack no longer requires a global Yarn installation. CI uses Yarn Classic's frozen-lockfile option and avoids sharing node_modules across Node versions. Prepares 4.1.0; publication is still separate.

Validation: 32 passing tests and lint; a deterministic 5,000-request reproduction drains FIFO at the configured rate using one active timer; packed-package CommonJS/ESM imports; strict TypeScript NodeNext (CJS/ESM), legacy Node, and bundler resolution; executed README pacing and byte-budget examples.

Fixes #88. Clarifies the composition and fixed-window limitations discussed in #35; the 4.0 concurrent-accounting fixes are retained.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-10T19:34:46.097687Z 90d02ee PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jhurliman
jhurliman merged commit fb216c6 into main Sep 10, 2026
3 checks passed
@jhurliman
jhurliman deleted the maintenance/issue-triage branch September 10, 2026 22:18
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.

No way to calculate amount of time until the next drip?

1 participant