Conversation
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
|
Thanks for opening this, but we'd appreciate a little more information. Could you update it with more details? |
📝 WalkthroughWalkthrough
ChangesChatbot adapter registry
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Pull Request Description
Summary
Fixes an Autofac circular dependency exception (RG-T117) in the chatbot adapter registry by deferring adapter resolution until first use.
Problem
The
ChatbotAdapterRegistryeagerly resolved all chatbot platform adapters in its constructor. This triggered a circular dependency chain:WebChatAdapter's notifier depends on chat services, which in turn reachAuthorizationService → CallsService → CommunicationService → ChatbotOutboundService, which loops back intoChatbotAdapterRegistry. This cycle caused Autofac to throw a circular dependency exception during container activation.Changes
IEnumerable<IChatbotPlatformAdapter>toLazy<IEnumerable<IChatbotPlatformAdapter>>, and wrapped the adapter dictionary in aLazy<>. Adapters are now only materialized on the first call toGetAdapter, keeping the circular dependency out of the container's constructor chain.Registry_DoesNotResolveAdaptersUntilFirstGetAdapter) verifying that adapters are not resolved untilGetAdapteris first invoked.Impact
Resolves a runtime dependency injection failure that prevented the chatbot subsystem (and its dependents in the communication/calls chain) from initializing correctly.