Repository navigation
feat(remote): support admin tokens - #650
delete-cloud wants to merge 2 commits into
Conversation
|
Warning Review limit reached
More reviews will be available in 44 minutes and 11 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds optional admin credentials ( ChangesAdmin credentials for remote endpoints
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
coding-agent/tests/cli/test_remote_client.py (1)
3108-3117: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep one semantic-memory CLI test on the user-token fallback path.
Both updated semantic-memory CLI tests now provision admin credentials, so the documented fallback for existing remotes configured with only
tokenis no longer exercised here. A regression inremote memory status/rebuildcould now slip by even thoughadmin_auth_headers()is supposed to fall back to normal auth.Also applies to: 3216-3229
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@coding-agent/tests/cli/test_remote_client.py` around lines 3108 - 3117, Keep one semantic-memory CLI test exercising the user-token fallback path by leaving a remote configured with only token and no admin-token. Update one of the affected remote add setups in the semantic-memory tests so admin_auth_headers() still has to fall back to normal auth for remote memory status/rebuild. Use the relevant remote add command block in the remote client tests to remove the admin credential from just one case, while leaving the other admin-backed test intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@coding-agent/src/coding_agent/cli/remote_commands.py`:
- Around line 37-53: Reject blank admin credentials in remote_add before calling
add_remote: normalize admin_token and admin_token_env and fail fast when either
is an empty or whitespace-only string so invalid values are not persisted.
Update the remote_add CLI path in remote_commands to validate these inputs
consistently with admin_auth_headers in coding_agent.remote.client, and only
forward non-blank admin credentials to add_remote.
---
Nitpick comments:
In `@coding-agent/tests/cli/test_remote_client.py`:
- Around line 3108-3117: Keep one semantic-memory CLI test exercising the
user-token fallback path by leaving a remote configured with only token and no
admin-token. Update one of the affected remote add setups in the semantic-memory
tests so admin_auth_headers() still has to fall back to normal auth for remote
memory status/rebuild. Use the relevant remote add command block in the remote
client tests to remove the admin credential from just one case, while leaving
the other admin-backed test intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 9156e4be-4d5f-4521-afa1-b8aa35a86039
📒 Files selected for processing (3)
coding-agent/src/coding_agent/cli/remote_commands.pycoding-agent/src/coding_agent/remote/client.pycoding-agent/tests/cli/test_remote_client.py
Summary
Verification
Review
Summary by CodeRabbit
New Features
Bug Fixes
Security