Skip to content

fix: rate limit DI made sync#177

Merged
HardMax71 merged 1 commit intomainfrom
fix/init-process
Feb 13, 2026
Merged

fix: rate limit DI made sync#177
HardMax71 merged 1 commit intomainfrom
fix/init-process

Conversation

@HardMax71
Copy link
Owner

@HardMax71 HardMax71 commented Feb 13, 2026

Summary by cubic

Made the RateLimitService provider synchronous and removed Redis config initialization from DI. This fixes startup issues caused by async providers and side effects during container wiring.

  • Bug Fixes
    • Replaced async provider with a sync function to match DI expectations.
    • Removed logger dependency and default config bootstrap; provider now only constructs RateLimitService.

Written for commit 33d220c. Summary will update on new commits.

Summary by CodeRabbit

  • Refactor
    • Simplified rate limiting service initialization for improved performance and reliability.

@coderabbitai
Copy link

coderabbitai bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

The rate-limit service factory in the RedisProvider class is converted from an asynchronous method to a synchronous one. The logger parameter is removed from the method signature, and Redis configuration initialization logic is eliminated. The function now directly returns a RateLimitService instance without side effects.

Changes

Cohort / File(s) Summary
Rate-limit service factory simplification
backend/app/core/providers.py
Converted get_rate_limit_service from async to sync method, removed logger parameter, eliminated Redis default config initialization logic and associated RateLimitConfig import.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 ✨ A simpler path we've now found,
No async awaits or configs bound,
The rate-limit service springs forth so light,
Direct and clean—a much cleaner sight!

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: rate limit DI made sync' clearly summarizes the main change: converting an asynchronous rate-limit dependency injection method to a synchronous one.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/init-process

No actionable comments were generated in the recent review. 🎉


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.

@sonarqubecloud
Copy link

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@HardMax71 HardMax71 merged commit 7156c7b into main Feb 13, 2026
14 of 15 checks passed
@HardMax71 HardMax71 deleted the fix/init-process branch February 13, 2026 21:00
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