feat: dual-emit speak on ovos.utterance.speak (namespace migration)#424
feat: dual-emit speak on ovos.utterance.speak (namespace migration)#424JarbasAl wants to merge 3 commits into
Conversation
OVOSSkill.speak() now emits the utterance on both the legacy "speak" topic and the new "ovos.utterance.speak" topic (architecture PIPELINE-1 §9.6) during the bus-namespace migration, so consumers on either namespace are reached. Gated on Configuration "legacy_namespace" (default True); when False only the new ovos.* topic is emitted. Uses emit_migration_pair from ovos-bus-client; full payload (utterance/expect_response/meta/lang) and message context are preserved on both emissions. The wait/expect_response handshake is keyed on the session, not the topic, so it is unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
I've combed through the code with a fine-tooth comb. 🔍I've aggregated the results of the automated checks for this PR below. 📋 Repo HealthEnsuring the repo's immune system is strong (aka security checks). 🛡️ ✅ All required files present. Latest Version: ✅ 🔍 LintA quick update on the progress of your PR checks. 📈 ❌ ruff: issues found — see job log 🔒 Security (pip-audit)Ensuring no malicious actors are hitching a ride. 🎭 ✅ No known vulnerabilities found (72 packages scanned). ⚖️ License CheckScanning for any 'no-derivatives' clauses. 🚫 ✅ No license violations found. Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed. 🔨 Build TestsChecking the structural resonance of the codebase. 🔊
❌ 3.10: Build OK, install failed The silent guardian of the dev branch. 🦇 |
The bus-client migration helper was reduced to a consumer-side Deduplicator only (no emit helper), so emit the pair inline: always emit "ovos.utterance.speak", and also emit the legacy "speak" while Configuration "legacy_namespace" is True (default). Full payload preserved on both; drops the removed emit_migration_pair import. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
What
OVOSSkill.speak()now participates in thespeak→ovos.utterance.speakbus-namespace migration (architecture PIPELINE-1 §9.6).During the migration nodes upgrade out of lockstep (e.g. a HiveMind satellite vs core), so the producer dual-emits the utterance on both the legacy
speaktopic and the newovos.utterance.speaktopic. Consumers listen on both and dedup on content (see ovos-audio companion PR).Configuration().get("legacy_namespace", True):emit_migration_pair.ovos.utterance.speaktopic.utterance,expect_response,meta,lang) and message context (skill_id,translation_data) are preserved on both emissions (Message.forwarddeep-copies context).wait/expect_responsehandshake is keyed on the session (SessionManager.wait_while_speaking), not on the topic, so it is unaffected by the topic change.Flagged in code as a backwards-compat aid, removable next major (legacy branch + the
speakemission go away once every node emitsovos.*only).Changes
ovos_workshop/skills/ovos.py: importemit_migration_pair; dual-emit inspeak().pyproject.toml: pinovos_bus_client>=2.1.2a1(prerelease floor that carries the migration helper).test/unittests/skills/test_ovos.py:TestSpeakNamespaceMigration— asserts both topics emitted whenlegacy_namespace=True(and by default), only the new topic whenFalse, payload/context preserved.Stacking / CI
Stacked on OpenVoiceOS/ovos-bus-client#228 (
feat/namespace-migration-dedup), which addsTransitionalDeduplicator/utterance_key/emit_migration_pair. That release is unpublished, so the pinned>=2.1.2a1floor is unresolvable on PyPI and CI will be red until ovos-bus-client publishes. Tests pass locally against the bus-client feature branch (17/17 intest_ovos.py).🤖 Generated with Claude Code