Skip to content

feat: emit OVOS-INTENT-4 registration topics (dual-emit with legacy)#431

Draft
JarbasAl wants to merge 1 commit into
devfrom
feat/intent-4-producer
Draft

feat: emit OVOS-INTENT-4 registration topics (dual-emit with legacy)#431
JarbasAl wants to merge 1 commit into
devfrom
feat/intent-4-producer

Conversation

@JarbasAl

Copy link
Copy Markdown
Member

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 in ovos_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_intentovos.intent.deregister) ARE in MIGRATION_MAP (1:1, payload restructured but bridged). So remove_intent emits the spec topic only and lets the bus bridge to legacy — no hand-rolled legacy dual-emit.

Payload mapping

  • §5 keywordregister_adapt_intentovos.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 by register_adapt_keyword (entity + aliases, order-preserving, de-duped). required/optional come from parser requires/optional (tuple[0]), one_of from at_least_one (array of groups, empty groups dropped), excluded from the flat excludes list. Vocab name is 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).
  • §6 templateregister_padatious_intentovos.intent.register.template {skill_id, intent_name (skill-local), lang, samples, blacklist} (blacklist defaults []).
  • §7 entityregister_padatious_entityovos.entity.register {skill_id, entity_name (skill-local), lang, samples}.
  • §8.2 deregisterremove_intentovos.intent.deregister {skill_id, intent_name (skill-local)}, spec-only (bus bridges to legacy detach_intent).

Files changed

  • ovos_workshop/intents.py — sample cache + spec emits.
  • pyproject.tomlovos-spec-tools>=0.11.0a1 (INTENT-4 SpecMessage members).
  • 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_keyword before 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

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>
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6759c011-e198-4108-96de-746a54fd04db

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/intent-4-producer

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Greetings, human! The automated checks are complete. 👾

I've aggregated the results of the automated checks for this PR below.

📋 Repo Health

I've checked the repo's hydration (aka documentation density). 💧

✅ All required files present.

Latest Version: 9.0.0a1

ovos_workshop/version.py — Version file
README.md — README
LICENSE — License file
pyproject.toml — pyproject.toml
⚠️ setup.py — setup.py
CHANGELOG.md — Changelog
ovos_workshop/version.py has valid version block markers

⚖️ License Check

I'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 Tests

I've finished the digital carpentry on this PR. 🔨

Python Build Install Tests
3.10
3.11
3.12
3.13
3.14

❌ 3.10: Build OK, install failed
❌ 3.11: Build OK, install failed
❌ 3.12: Build OK, install failed
❌ 3.13: Build OK, install failed
❌ 3.14: Build OK, install failed
Check job logs for details.

🔍 Lint

The results are fresh out of the pipeline. 🏗️

ruff: issues found — see job log


Catch you at the next merge! 🌊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant