Echo fallback request ids#463
Conversation
|
Warning Review limit reached
Next review available in: 48 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughFallbackSkill's ChangesFallback acknowledgement request id echo
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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)
test/unittests/test_fallback_skill.py (1)
18-43: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider adding a mixed-source test case.
Both tests supply
fallback_request_ididentically indataandcontext(or neither). Neither test exercises thedata.get(...) or context.get(...)precedence when only one of the two carries the id, which is a plausible real-world path (e.g., ovos-core setting it only in context).♻️ Suggested additional test
+def test_fallback_ack_uses_context_when_data_missing_request_id(): + skill = _make_skill() + + skill._handle_fallback_ack(Message( + "ovos.skills.fallback.ping", + {}, + {"fallback_request_id": "req-2"}, + )) + + emitted = skill.bus.emit.call_args[0][0] + assert emitted.data["fallback_request_id"] == "req-2" + assert emitted.context["fallback_request_id"] == "req-2"🤖 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 `@test/unittests/test_fallback_skill.py` around lines 18 - 43, Add a mixed-source unit test for _handle_fallback_ack in test_fallback_skill.py that covers fallback_request_id present in only one message source, since the current tests only cover both-present or neither-present cases. Use the existing _make_skill helper and Message construction to verify the data.get(...) or context.get(...) behavior, and assert that skill.bus.emit publishes ovos.skills.fallback.pong with the request id correctly echoed from whichever source contains it.
🤖 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 `@test/unittests/test_fallback_skill.py`:
- Around line 18-43: Add a mixed-source unit test for _handle_fallback_ack in
test_fallback_skill.py that covers fallback_request_id present in only one
message source, since the current tests only cover both-present or
neither-present cases. Use the existing _make_skill helper and Message
construction to verify the data.get(...) or context.get(...) behavior, and
assert that skill.bus.emit publishes ovos.skills.fallback.pong with the request
id correctly echoed from whichever source contains it.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b982d997-4f06-4563-95f6-816d02abe63f
📒 Files selected for processing (2)
ovos_workshop/skills/fallback.pytest/unittests/test_fallback_skill.py
|
Closing this older PR in favor of #465, which carries the same fallback request-id fix on the 8.3 branch with the updated tests/context. |
What
fallback_request_idon fallback pong data/context when presentWhy
ovos-core can now scope fallback candidate collection per request. Fallback skills need to carry that id back so concurrent fallback pings do not bleed into each other.
Test
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest test/unittests/test_fallback_skill.py -qSummary by CodeRabbit