Repository navigation
fix(claude): relay native Anthropic rate-limit headers - #6356
Conversation
Preserve upstream quota observations for Claude Code statusLine consumers without forwarding unrelated response metadata. Cover SSE, JSON, errors, count_tokens, and missing observations. Co-authored-by: lhj6102 <67728205+lhj6102@users.noreply.github.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 19 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (7)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe native Anthropic passthrough now preserves upstream ChangesNative Anthropic passthrough
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The change preserves upstream Anthropic quota headers without forwarding unrelated headers or altering existing response behavior. No actionable merge-blocking risk is identified; merge after normal checks pass. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change narrowly exposes upstream quota metadata through existing response paths. The header-family filter excludes cookies and unrelated metadata, and no new production route or weakened authorization control was identified. Broader access-control and deployment coverage remains incomplete. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (4 skipped: 4 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
✅ Deterministic PR hygiene checks passed. |
# Conflicts: # structure/clients/claude-desktop.md
|
Maintainer integration record (MAINTAINERS.md, dev only)
|
Summary
anthropic-ratelimit-*response headers through native Anthropic SSE, JSON, error, and count-tokens responses so Claude Code statusLine consumers can observe available quota metadata.Verification
bun test tests/claude-integration/claude-native-rate-limit-headers.test.ts tests/claude-integration/claude-native-passthrough.test.ts tests/test-layout.test.ts tests/test-layout-tooling.test.ts tests/ci-workflows/file-size-ratchet.test.ts tests/ci-workflows/structure-ssot.test.ts— 141 pass, 0 fail, 1377 assertions. The new regression file covers SSE, JSON, 429, count_tokens, absence, and the header-family allowlist.node --max-old-space-size=768 node_modules/typescript/bin/tsc --noEmit— pass, 33 seconds, 1.2 GiB peak memory, no swap.git diff --cached --check— pass. New files remain owned/readable by ubuntu, the execution account.Checklist
The final review checkbox is intentionally left for independent maintainer review; this PR does not self-approve or waive required checks. Please review the narrow response-header allowlist and the retained native passthrough contract.
Summary by CodeRabbit