Skip to content

revert: restore DevPass rate limit defaults - #3698

Merged
steebchen merged 1 commit into
mainfrom
revert-devpass-rate-limits
Aug 19, 2026
Merged

steebchen merged 1 commit into
mainfrom
revert-devpass-rate-limits

Conversation

@steebchen

@steebchen steebchen commented Aug 19, 2026 •

Copy link
Copy Markdown
Member

Problem

#3686 changed DevPass defaults from the explicit product limits to twice each endpoint's regular base. That change needs to be rolled back.

Approach

  • revert the exact commit landed by feat(gateway): double DevPass base limits #3686
  • restore the explicit 120 RPM DevPass defaults and the matching limiter documentation
  • restore regression coverage for the separate DevPass and Chat defaults

DevPass-specific environment overrides remain supported. PAYG tier scaling and Chat defaults are unchanged.

Verification

  • pnpm format
  • pnpm build --cache=local:rw
  • pnpm exec vitest run apps/gateway/src/lib/org-rate-limit.spec.ts apps/gateway/src/middleware/org-rate-limit.spec.ts --no-file-parallelism (40 tests)

Summary by CodeRabbit

  • New Features

    • Added independently configurable rate limits for DevPass across supported request paths.
    • DevPass limits are now tighter than regular limits while remaining at least as permissive as chat-plan limits.
  • Documentation

    • Updated rate-limit documentation to describe separate DevPass and chat-plan limits.

Copilot AI lite review requested due to automatic review settings August 19, 2026 18:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0c0734d0-6281-4a1a-b94c-48325b689585

📥 Commits

Reviewing files that changed from the base of the PR and between 9bfbc51 and 9fa40d4.

📒 Files selected for processing (5)
  • apps/gateway/src/lib/org-rate-limit.spec.ts
  • apps/gateway/src/lib/org-rate-limit.ts
  • apps/gateway/src/middleware/org-rate-limit.spec.ts
  • apps/gateway/src/middleware/org-rate-limit.ts
  • packages/shared/src/spend-tier.ts

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.


Walkthrough

Rate-limit configuration now defines explicit development defaults for each path. Gateway logic uses these values instead of a global DevPass multiplier. Tests and documentation now describe and verify tighter development and chat limits.

Changes

Rate-limit default changes

Layer / File(s) Summary
Per-path rate-limit defaults
packages/shared/src/spend-tier.ts
PathRateLimitConfig now includes devDefaultRpm. Each configured path defines a development default, and getBaseLimit uses it for development plans.
Validation and documentation
apps/gateway/src/lib/org-rate-limit.spec.ts, apps/gateway/src/lib/org-rate-limit.ts, apps/gateway/src/middleware/org-rate-limit.spec.ts, apps/gateway/src/middleware/org-rate-limit.ts
Tests verify the configured development and chat defaults. Gateway comments describe tighter plan-specific limits without the previous doubled-limit wording.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 9fa40

This change restores the documented DevPass rate-limit defaults while leaving Chat defaults and tier scaling unchanged; no actionable merge-blocking risk remains beyond normal checks and review.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the revert and the restored DevPass rate-limit defaults, which matches the primary change.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert-devpass-rate-limits

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@steebchen
steebchen merged commit 9c15972 into main Aug 19, 2026
17 checks passed
@steebchen
steebchen deleted the revert-devpass-rate-limits branch August 19, 2026 18:36
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.

2 participants