feat: emit OVOS-INTENT-4 registration topics (dual-emit with legacy)#431
feat: emit OVOS-INTENT-4 registration topics (dual-emit with legacy)#431JarbasAl wants to merge 1 commit into
Conversation
Adopt the OVOS-INTENT-4 producer contract in IntentServiceInterface so
skills broadcast the consolidated spec registration topics that the six
intent-engine pipeline plugins (adapt/padatious/padacioso/nebulento/
palavreado/m2v) already subscribe to.
Registration topics are an N->1 consolidation (adapt emits N register_vocab
+ 1 register_intent; the spec inlines vocab samples into ONE
ovos.intent.register.keyword), so they are NOT bus-bridged via
ovos-spec-tools MIGRATION_MAP — DUAL-EMIT the spec topic alongside the
legacy one:
- §5 register_adapt_intent -> ovos.intent.register.keyword, inlining
required/optional/one_of/excluded vocabulary descriptors {name, samples}
reconstructed from a per-(vocab_type, lang) sample cache populated by
register_adapt_keyword. Vocab names are un-munged on the wire (consumer
re-namespaces). One message per language the intent's vocab was cached in.
- §6 register_padatious_intent -> ovos.intent.register.template
(samples inlined, blacklist).
- §7 register_padatious_entity -> ovos.entity.register (samples inlined).
Management topics ARE in MIGRATION_MAP (1:1, payload restructured but
bridged), so remove_intent emits ONLY the spec topic
(§8.2 ovos.intent.deregister) and lets the bus bridge to legacy
detach_intent — no hand-rolled legacy dual-emit.
Bumps ovos-spec-tools>=0.11.0a1 for the INTENT-4 SpecMessage members.
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 |
Greetings, human! The automated checks are complete. 👾I've aggregated the results of the automated checks for this PR below. 📋 Repo HealthI've checked the repo's hydration (aka documentation density). 💧 ✅ All required files present. Latest Version: ✅ ⚖️ License CheckI've verified the attribution of all third-party code. 👤 ✅ No license violations found. Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed. 🔒 Security (pip-audit)Checking for any potential security breaches. 🔓 ✅ No known vulnerabilities found (72 packages scanned). 🔨 Build TestsI've finished the digital carpentry on this PR. 🔨
❌ 3.10: Build OK, install failed 🔍 LintThe results are fresh out of the pipeline. 🏗️ ❌ ruff: issues found — see job log Catch you at the next merge! 🌊 |
Adopts the OVOS-INTENT-4 producer contract in
IntentServiceInterface(ovos_workshop/intents.py) so skills EMIT the consolidated spec registration bus topics. This unblocks the six already-merged-ready engine consumer PRs (adapt / padatious / padacioso / nebulento / palavreado / m2v) that subscribe to these topics but currently receive nothing.Dual-emit vs bridge
Registration topics (
ovos.intent.register.keyword/.template,ovos.entity.register) are an N→1 consolidation and are deliberately NOT inovos_spec_tools.MIGRATION_MAP— the bus can't transparently bridge them. So we dual-emit: keep the legacy emits AND hand-emit the spec topic with the spec payload.Management topics (
detach_intent→ovos.intent.deregister) ARE inMIGRATION_MAP(1:1, payload restructured but bridged). Soremove_intentemits the spec topic only and lets the bus bridge to legacy — no hand-rolled legacy dual-emit.Payload mapping
register_adapt_intent→ovos.intent.register.keyword{skill_id, intent_name, lang, required, optional, one_of, excluded}. Each descriptor is{name, samples}. Samples are reconstructed from a per-(vocab_type, lang)cache populated byregister_adapt_keyword(entity + aliases, order-preserving, de-duped).required/optionalcome from parserrequires/optional(tuple[0]),one_offromat_least_one(array of groups, empty groups dropped),excludedfrom the flatexcludeslist. Vocabnameis un-munged on the wire (the consumer re-namespaces). One message per language the intent's vocab was cached under. All four keys always present (§5.2 shape-stable).register_padatious_intent→ovos.intent.register.template{skill_id, intent_name (skill-local), lang, samples, blacklist}(blacklistdefaults[]).register_padatious_entity→ovos.entity.register{skill_id, entity_name (skill-local), lang, samples}.remove_intent→ovos.intent.deregister{skill_id, intent_name (skill-local)}, spec-only (bus bridges to legacydetach_intent).Files changed
ovos_workshop/intents.py— sample cache + spec emits.pyproject.toml—ovos-spec-tools>=0.11.0a1(INTENT-4SpecMessagemembers).test/unittests/test_intent4_producer.py— new; asserts §5/§6/§7/§8 spec payloads via FakeBus.test/unittests/test_intent_service_interface.py— filter the legacy-topic assertions to tolerate the new dual-emit.Tests
Full suite green: 494 passed (
python -m pytest test/in~/.venvs/ovos).Known limitation
Inlined keyword samples are reconstructed from vocab registered via
register_adapt_keywordbefore the intent. An adapt intent that references a vocab with no cached samples for any language emits no keyword message (logged at DEBUG) — vocab must be registered before the intent that uses it (the normal skill load order).🤖 Generated with Claude Code