Use FALLBACK-1 skill-addressed ping and pong topics - #465
goldyfruit wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesFallback event registration and routing
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to The PR changes fallback topic routing and includes focused validation; no actionable merge-blocking risk remains beyond normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 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)
ovos_workshop/skills/fallback.py (1)
113-127: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low valueCorrectly implements request-id echo with legacy fallback preserved.
Logic matches the PR objective: echoes
fallback_request_idfrom data or context into bothdataandcontextof the pong, and leaves the shape unchanged when absent.One minor nit: using
orto chain the lookups means a falsy-but-presentfallback_request_id(e.g., empty string) indatawould silently fall through tocontext. Unlikely in practice given request ids are non-empty strings, butmessage.data.get(...) if ... is not None else message.context.get(...)would be more precise if that ever becomes a concern.🤖 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 `@ovos_workshop/skills/fallback.py` around lines 113 - 127, The request-id echo logic in the fallback pong should preserve a falsy-but-present fallback_request_id from message.data instead of falling through to message.context. Update the lookup in the fallback handler that builds data and context so it distinguishes “missing” from “present but empty,” while keeping the existing behavior of copying the ID into both payloads in the fallback response emitted by the fallback method.
🤖 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 `@ovos_workshop/skills/fallback.py`:
- Around line 113-127: The request-id echo logic in the fallback pong should
preserve a falsy-but-present fallback_request_id from message.data instead of
falling through to message.context. Update the lookup in the fallback handler
that builds data and context so it distinguishes “missing” from “present but
empty,” while keeping the existing behavior of copying the ID into both payloads
in the fallback response emitted by the fallback method.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: e13afc0a-7332-43a9-8f1b-a172b7bbd015
📒 Files selected for processing (2)
ovos_workshop/skills/fallback.pytest/unittests/test_fallback_skill.py
|
This is the correct skill-side counterpart to ovos-core#808: echo The red CI is not your change: the failing Review written by Claude Opus 4.8 (claude-opus-4-8) without human oversight. |
|
Correction to my earlier review — reject as-is, same spec-compliance reason as ovos-core#808. Echoing Review written by Claude Opus 4.8 (claude-opus-4-8) without human oversight. |
5c7586f to
427607d
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/unittests/skills/test_fallback_skill.py (1)
66-66: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExercise the new ping route through
FakeBus.The registration test checks only the event name, and the acknowledgment test calls
_handle_fallback_ackdirectly. Emit a<skill_id>.fallback.pingmessage and assert that the<skill_id>.fallback.ponglistener receives the response. This checks the changed registration and reply path together.Also applies to: 81-82
🤖 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/skills/test_fallback_skill.py` at line 66, Extend the fallback skill tests to exercise the ping route through FakeBus: publish a <skill_id>.fallback.ping message, then assert that the registered <skill_id>.fallback.pong listener receives the response. Update the relevant registration and acknowledgment tests without relying on a direct _handle_fallback_ack call, so the changed registration and reply path are tested together.
🤖 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/skills/test_fallback_skill.py`:
- Line 66: Extend the fallback skill tests to exercise the ping route through
FakeBus: publish a <skill_id>.fallback.ping message, then assert that the
registered <skill_id>.fallback.pong listener receives the response. Update the
relevant registration and acknowledgment tests without relying on a direct
_handle_fallback_ack call, so the changed registration and reply path are tested
together.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1d7cfdc8-8170-45cb-a5d9-75f1195fd58c
📒 Files selected for processing (2)
ovos_workshop/skills/fallback.pytest/unittests/skills/test_fallback_skill.py
Binding only the skill-addressed `<skill_id>.fallback.ping` topic drops the broadcast `ovos.skills.fallback.ping` poll that every released ovos-core (pre core#808) still emits, so a skill running this branch against any released core never answers a fallback poll at all. FALLBACK-1 §6.1 makes the addressed topics normative but explicitly sanctions the broadcast poll as an observably-equivalent optimisation -- bind both during the migration window (kill-switch #837 conventions): - keep the new `<skill_id>.fallback.ping` binding - re-add `ovos.skills.fallback.ping`, same handler - reply on the topic family matching the ping received: a general ping gets a general `ovos.skills.fallback.pong` (the shape old cores understand); a skill-addressed ping gets a skill-addressed `<skill_id>.fallback.pong` - add one test per ping family asserting the correct pong topic + payload, and that a general ping does NOT produce a skill-addressed pong (and vice versa) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Closed by owner ruling (2026-08-13): this pair predates the ratified FALLBACK-1 broadcast-contest shape. Fallback will be reworked on the broadcast pattern established by ovos-core#863 + ovos-workshop#534 (one broadcast question per round, parallel answers, explicit declines, early close) once that pair lands — one migration instead of two. Nothing is broken by the closure: the pair was never merged. |
Fixes #464 by removing the shared fallback-pong channel that made request-level echoing necessary.
Architecture
<skill_id>.fallback.ping.<skill_id>.fallback.pongtopic.This is the skill-side half of OpenVoiceOS/ovos-core#808. It follows the FALLBACK-1 topic contract directly and keeps traffic owned by the fallback skill; it does not add request IDs, a compatibility bridge, or a generic agent hook.
Validation
Summary by CodeRabbit
Rework after adversarial audit (2026-08-12)
The flag-day defect. This PR bound ONLY the skill-addressed
<skill_id>.fallback.pingtopic, dropping the broadcastovos.skills.fallback.pingthat every released ovos-core (preovos-core#808) still polls. Executed result: this branch + any released
ovos-core = fallback dead (the released core never gets its poll
answered). FALLBACK-1 §6.1 makes the addressed topics normative but
explicitly sanctions the broadcast poll as an observably-equivalent
optimisation, so a dual window is conformant.
The fix. Bind BOTH ping topics during the migration window
(kill-switch #837 conventions):
<skill_id>.fallback.pingbinding.ovos.skills.fallback.ping, same handler.gets a general
ovos.skills.fallback.pong(the shape old coresunderstand); a skill-addressed ping gets a skill-addressed
<skill_id>.fallback.pong.payload, and that a general ping does NOT produce a skill-addressed
pong (and vice versa).
Executed matrix (probe-free harness, real ovoscope + real
ovos-skill-fallback-unknown, no fake ping/pong): fixed-core (#808) +
fixed-workshop (#465), fixed-core + released dev workshop, unfixed dev
core + fixed-workshop, and fixed-core + PyPI ovos-workshop==9.3.9a1 are
all GREEN (ping answered, dispatched exactly once, skill spoke exactly
once). Full ovos-workshop unit suite green (552 passed).
Verified claims: model re-check only (this session), not
human-reviewed -- matrix cells, red-before-fix on the dual-binding tests
(revert-code-keep-test technique, no
git stash), and the full unitsuite were all actually executed in this session, not asserted from
memory.
Fixes #464 -> unchanged; this defect and its fix are local to the
skill-side ping/pong binding and don't affect the shared-pong-channel
removal #464 addresses.