Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR systematically eliminates CLI→Server direct imports by extracting shared contract types into new ChangesCLI Server Decoupling via Shared Contracts and Composition Bridges
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly Related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
🧹 Nitpick comments (1)
cli/builder/internal/serverbridge/serverbridge.go (1)
30-35: ⚡ Quick winUse bridge alias types in exported function signatures.
StartServeandNewHeadlessHandlerscurrently exposeserverstartup.*types directly despite defining bridge aliases. Using the alias types keeps the bridge API cleaner and better aligned with the import-boundary goal.Proposed diff
-func StartServe(ctx context.Context, req serverstartup.Request, authHandler serverstartup.AuthHandler, onboardingHandler serverstartup.OnboardingHandler) (ServeServer, error) { +func StartServe(ctx context.Context, req StartupRequest, authHandler StartupAuthHandler, onboardingHandler StartupOnboardingHandler) (ServeServer, error) { return serve.Start(ctx, req, authHandler, onboardingHandler) } -func NewHeadlessHandlers(lookupEnv func(string) string) (serverstartup.AuthHandler, serverstartup.OnboardingHandler) { +func NewHeadlessHandlers(lookupEnv func(string) string) (StartupAuthHandler, StartupOnboardingHandler) { return serverstartup.NewHeadlessHandlers(lookupEnv) }🤖 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 `@cli/builder/internal/serverbridge/serverbridge.go` around lines 30 - 35, The exported functions StartServe and NewHeadlessHandlers should use the bridge alias types instead of exposing serverstartup.* types: change the StartServe signature to accept Request, AuthHandler, OnboardingHandler (alias types) while still calling serve.Start(ctx, req, authHandler, onboardingHandler) and returning ServeServer, and change NewHeadlessHandlers to return (AuthHandler, OnboardingHandler) while invoking and returning serverstartup.NewHeadlessHandlers(lookupEnv) internally; this keeps the bridge API consistent while leaving internal calls to serverstartup.* unchanged.
🤖 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.
Nitpick comments:
In `@cli/builder/internal/serverbridge/serverbridge.go`:
- Around line 30-35: The exported functions StartServe and NewHeadlessHandlers
should use the bridge alias types instead of exposing serverstartup.* types:
change the StartServe signature to accept Request, AuthHandler,
OnboardingHandler (alias types) while still calling serve.Start(ctx, req,
authHandler, onboardingHandler) and returning ServeServer, and change
NewHeadlessHandlers to return (AuthHandler, OnboardingHandler) while invoking
and returning serverstartup.NewHeadlessHandlers(lookupEnv) internally; this
keeps the bridge API consistent while leaving internal calls to serverstartup.*
unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9b4fdae2-a0c5-4b2d-bb8f-050b47693acd
📒 Files selected for processing (39)
cli/app/internal/authcommand/slash.gocli/app/internal/authflowadapter/flow.gocli/app/internal/authflowadapter/flow_test.gocli/app/internal/authview/text.gocli/app/internal/embeddedstartup/start.gocli/app/internal/oauthadapter/oauth.gocli/app/internal/onboardingimport/skill_metadata.gocli/app/internal/onboardingmodel/model.gocli/app/internal/onboardingready/ready.gocli/app/internal/runtimeconn/errors.gocli/app/internal/runtimeconn/errors_test.gocli/app/internal/servecommand/servecommand.gocli/app/internal/serverbridge/contracts_test.gocli/app/internal/serverbridge/serverbridge.gocli/app/internal/startupconfig/config.gocli/app/internal/startupconfig/config_test.gocli/app/internal/statuscollect/auth.gocli/app/internal/statuscollect/collect.gocli/app/internal/statuscollect/environment.gocli/app/internal/statuscollect/model.gocli/app/internal/statuscollect/usage.gocli/app/internal/submissionerror/errors.gocli/app/internal/submissionerror/errors_test.gocli/builder/binding_commands.gocli/builder/internal/serverbridge/serverbridge.gocli/builder/serve.godocs/dev/decisions.mdserver/auth/gate.goserver/auth/openai_oauth.goserver/auth/types.goserver/llm/errors.goserver/llm/model_catalog.goserver/llm/types.goserver/session/store.goshared/architecture/boundary_test.goshared/auth/types.goshared/llmerrors/errors.goshared/modelcontract/types.goshared/sessioncontract/errors.go
💤 Files with no reviewable changes (2)
- server/auth/gate.go
- server/auth/openai_oauth.go
Summary
Closes #135
Verification
Summary by CodeRabbit