-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix:fallback match #572
fix:fallback match #572
Conversation
the priority levels were not being respected, everything matched under fallback_high
WalkthroughThe changes in Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #572 +/- ##
==========================================
+ Coverage 75.33% 75.44% +0.10%
==========================================
Files 15 15
Lines 3094 1572 -1522
==========================================
- Hits 2331 1186 -1145
+ Misses 763 386 -377
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
ovos_core/intent_services/fallback_service.py (1)
101-107
: Approved: Improved fallback handling logic and loggingThe changes effectively address the PR objective of respecting priority levels in the matching process. The new condition
if skill_id in in_range:
ensures that only skills within the specified priority range are considered for fallback handling.The updated logging provides better insights into the fallback handling process:
- Info log for skills in range that will try to handle fallback.
- Debug log for skills out of range that are being skipped.
- Debug log (previously info) for skills that don't want to handle fallback.
These changes improve both the control flow and the verbosity of logs.
Consider adding a constant for the log level of the "does NOT WANT to try to handle fallback" message. This would make it easier to adjust the verbosity in the future if needed:
NOT_HANDLING_LOG_LEVEL = logging.DEBUG # ... LOG.log(NOT_HANDLING_LOG_LEVEL, f"{skill_id} does NOT WANT to try to handle fallback")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
test/end2end/session/test_fallback.py (1)
Line range hint
352-368
: LGTM! The changes align well with the PR objectives.The modifications to the
expected_messages
list accurately reflect the new fallback behavior, including different priority levels (High and Medium) and timeout handling. This aligns with the PR's goal of ensuring that the matching process adheres to defined priority levels.Consider adding a brief comment explaining the purpose of the
ovos.skills.fallback.force_timeout
message for better clarity. For example:"ovos.skills.fallback.force_timeout", # Simulates a timeout from the core for testing purposes
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- ovos_core/intent_services/fallback_service.py (1 hunks)
- test/end2end/session/test_fallback.py (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- ovos_core/intent_services/fallback_service.py
the priority levels were not being respected, everything matched under fallback_high
Summary by CodeRabbit
New Features
Bug Fixes