Skip to content

fix(quota): omit absent fetch headers#147

Merged
INONONO66 merged 1 commit into
mainfrom
fix/quota-fetch-optional-headers
Jun 5, 2026
Merged

fix(quota): omit absent fetch headers#147
INONONO66 merged 1 commit into
mainfrom
fix/quota-fetch-optional-headers

Conversation

@INONONO66

@INONONO66 INONONO66 commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • build quota fetch options without a headers key when callers do not provide headers
  • add focused coverage for absent and present headers in quota fetchJson

Verification

  • bun test tests/unit/cliproxy-quota-helpers.test.ts
  • ./node_modules/.bin/tsc --noEmit --pretty false --exactOptionalPropertyTypes true 2>&1 | rg "src/cliproxy/quota/helpers.ts|tests/unit/cliproxy-quota-helpers.test.ts" || true
  • ./node_modules/.bin/tsc --noEmit --pretty false --noUncheckedIndexedAccess true 2>&1 | rg "tests/unit/cliproxy-quota-helpers.test.ts" || true
  • ./node_modules/.bin/tsc --noEmit --pretty false
  • git diff --check
  • bun run release-check
  • LSP diagnostics for src/cliproxy/quota/helpers.ts and tests/unit/cliproxy-quota-helpers.test.ts: no diagnostics

Summary by cubic

Stop including the headers field in quota fetchJson requests when callers don’t pass headers. This prevents sending an empty headers object and aligns with upstream expectations.

  • Bug Fixes
    • Build UpstreamClient.fetch options without headers unless provided.
    • Added unit tests to verify omission/preservation of headers in fetchJson.

Written for commit d63edc5. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@INONONO66, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f4dbd221-5f98-4c99-ae18-0431a8b11935

📥 Commits

Reviewing files that changed from the base of the PR and between d7be0a9 and d63edc5.

📒 Files selected for processing (2)
  • src/cliproxy/quota/helpers.ts
  • tests/unit/cliproxy-quota-helpers.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/quota-fetch-optional-headers

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 and usage tips.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 2 files

Re-trigger cubic

@INONONO66 INONONO66 merged commit 57d3226 into main Jun 5, 2026
3 checks passed
@INONONO66 INONONO66 deleted the fix/quota-fetch-optional-headers branch June 5, 2026 03: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.

1 participant