LCORE-755: Fixed feedback endpoint responds correctly without sentiment and empty user_feedback#711
Conversation
11249f2 to
af7de68
Compare
WalkthroughThe pull request tightens feedback validation by treating empty Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes The changes follow a consistent pattern of validation tightening paired with corresponding test coverage. The logic modifications are straightforward, and the test additions, while spread across multiple files, are homogeneous in nature and repetitive in structure. Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (7)tests/e2e/features/**/*.feature📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
tests/{unit,integration}/**/*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
tests/**/*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
src/**/*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
src/{models/**/*.py,configuration.py}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
src/models/**/*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧬 Code graph analysis (2)tests/unit/models/requests/test_feedback_request.py (1)
tests/unit/app/endpoints/test_feedback.py (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (5)
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 |
Description
This PR updates the FeedbackRequest model validator to treat empty strings for user_feedback as invalid, ensuring that at least one form of feedback (sentiment, user_feedback, or categories) must be provided.
It adds a unit test for this case and a corresponding e2e test for endpoint validation.
Type of change
Related Tickets & Documents
Checklist before requesting a review
Testing
Summary by CodeRabbit