Skip to content

fix(opm): reject a registration that omits lang instead of defaulting it - #58

Draft
openvoiceos-bot wants to merge 1 commit into
devfrom
fix/intent4-7-2-entity-lang-malformed
Draft

openvoiceos-bot wants to merge 1 commit into
devfrom
fix/intent4-7-2-entity-lang-malformed

Conversation

@openvoiceos-bot

@openvoiceos-bot openvoiceos-bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Auto-generated by Claude Sonnet 5 (claude-sonnet-5) via Claude Code — NOT human-reviewed. Verify before acting.

Verified against source: the merged spec text on origin/dev of OpenVoiceOS/architecture, the installed nebulento package, and the full local test suite. Not verified by a human.

What changed

OVOS-INTENT-4 §3.2 and §7.2 (merged in OpenVoiceOS/architecture#261) make lang a required identity field on a registration. opm.py defaulted a missing lang to the plugin's own language. It then indexed the registration under that language, a value the producer never sent.

  • handle_register_template (§6) and handle_register_entity_spec (§7): a missing lang now skips the registration. It logs WARN and names the missing field, instead of defaulting to self.lang.

  • handle_deregister_entity_spec (§8.3): the spec reads the other way for deregister. An omitted lang must remove the entity from every language. The old code defaulted to self.lang and removed only one language. It now loops over every configured language.

  • padatious:register_intent, padatious:register_entity, detach_entity, detach_skill: left unchanged. These legacy pre-INTENT-4 bus topics carry their own payload shape. They use no skill_id, intent_name, or entity_name fields. §3.2's rule for "a message of §5 to §8" does not bind them.

A registration without lang names no entity. The entity identity is (skill_id, entity_name, lang). Silently repairing it with the plugin's own language hides the malformed message from the producer. It can also index the entity or intent under the wrong language.

gh search code "ovos.entity.register" --owner OpenVoiceOS, and the same for ovos.intent.register.template, found one producer: ovos-workshop/ovos_workshop/intents.py. It always sends lang on these topics, so no producer relies on the old default.

Test plan

New regression tests, each confirmed to fail on the pre-fix code and pass after:

$ python3 -m pytest test/test_opm.py -k "missing_lang_not_indexed or deregister_entity_missing_lang" -q
3 passed

Full suite:

$ python3 -m pytest test/ -q
181 passed, 5 warnings in 37.03s

Reproduced against the installed PyPI package before the fix:

BUG on installed package: indexed under en-US with no lang sent -> True

pyflakes nebulento/opm.py: only a pre-existing unused import unrelated to this change (ovos_bus_client.session.Session, present before this PR).

OVOS-INTENT-4 §3.2/§7.2 (OpenVoiceOS/architecture#261) makes lang a
required identity field. handle_register_template and
handle_register_entity_spec defaulted a missing lang to self.lang and
indexed the registration under the plugin's own configured language,
inventing a value the producer never sent. Both now skip the
registration and log WARN naming the missing field.

handle_deregister_entity_spec kept the same default-to-self.lang
read, which under-removed: §8.3 says an omitted lang on deregister
removes every language of the pair, not only self.lang. It now
iterates every configured language when lang is omitted.

padatious:register_intent, padatious:register_entity, detach_entity
and detach_skill carry their own payload shape and are not INTENT-4
topics (§5-§8), so they are unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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 added the fix label Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Stand by... check results incoming! 📡

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

🏷️ Release Preview

Ensuring our release notes are clear and concise. ✍️

Current: 0.10.5a1 → Next: 0.10.5a2

Signal Value
Label (none)
PR title fix(opm): reject a registration that omits lang instead of defaulting it
Bump alpha

⚠️ No conventional commit prefix — alpha-only bump.
Suggested: fix: update the thing or feat: update the thing


🚀 Release Channel Compatibility

Predicted next version: 0.10.5a2

Channel Status Note Current Constraint
Stable ⚪ Not in channel -
Testing ⚪ Not in channel -
Alpha ⚪ Not in channel -

⚖️ License Check

Ensuring no unlicensed code has snuck in. 🕵️

✅ No license violations found.

Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed.

📋 Repo Health

I've checked the repo's social skills (aka issue response time). 🗣️

✅ All required files present.

Latest Version: 0.10.5a1

✅ nebulento/version.py — Version file
✅ README.md — README
✅ LICENSE.md — License file (consider renaming to LICENSE)
✅ pyproject.toml — pyproject.toml
⚠️ setup.py — setup.py
✅ CHANGELOG.md — Changelog
✅ nebulento/version.py has valid version block markers

🔌 Plugin Detection

Is this plugin ready for its debut in the Manager? 🎭

❌ Plugin Status: ERRORS (1)

Plugin Info:

  • Name: nebulento
  • Description: dead simple fuzzy matching intent parser

OPM Detection:

Plugin Type Wheel Editable
pipeline ✅ ✅

Entry Point Validation:

Entry Point Type Import Interface
ovos-nebulento-hierarchical-pipeline-plugin pipeline ✅ ⊘
ovos-nebulento-pipeline-plugin pipeline ✅ 510ms ⊘

⊘ No settingsmeta.json
✅ requires-python >=3.10 — running Python 3.11

Issues:

  • ❌ Import time for ovos-nebulento-pipeline-plugin exceeds 500ms (510ms)
  • ⚠️ No settingsmeta.json found
  • ⚠️ No settingsmeta.json found

🔌 Skill Tests (ovoscope)

Putting the skill's conversational flow to the test. 🌊

✅ 20/20 passed

✅ TestDetach — 2/2
✅ TestEntityExtraction — 1/1
✅ TestHierarchicalRouting — 2/2
✅ TestLegacyStillConsumed — 1/1
✅ TestNegativeKeywordTopic — 1/1
✅ TestRegisteredIntentMatch — 5/5
✅ TestSessionBlacklist — 2/2
✅ TestSpecDeregister — 2/2
✅ TestSpecDisableEnable — 2/2
✅ TestSpecTemplateConsumed — 2/2

🚌 Bus Coverage

Ensuring every intent and event is reached by the test suite. 🎯

⚠️ Bus coverage report unavailable — check the job log.

📊 Coverage

How deep does the testing rabbit hole go? 🐇

✅ 92.9% total coverage

Per-file coverage (7 files)
File Coverage Missing lines
nebulento/opm.py 88.5% 44
nebulento/fuzz.py 94.9% 3
nebulento/hierarchical.py 95.3% 3
nebulento/__init__.py 100.0% 0
nebulento/bracket_expansion.py 100.0% 0
nebulento/container.py 100.0% 0
nebulento/version.py 100.0% 0

Full report: download the coverage-report artifact.

🔨 Build Tests

I've fired up the furnaces and forged your changes. ⚒️

✅ All versions pass

Python Build Install Tests pytest
3.10 ✅ ✅ ✅ 181 passed, 5 warnings in 24.19s
3.11 ✅ ✅ ✅ 181 passed, 5 warnings in 23.87s
3.12 ✅ ✅ ✅ 181 passed, 5 warnings in 24.45s
3.13 ✅ ✅ ✅ 181 passed, 5 warnings in 23.63s
3.14 ✅ ✅ ✅ 181 passed, 5 warnings in 24.59s

Integrity verified by the OVOS Bot 💎

@github-actions github-actions Bot added fix and removed fix labels Oct 2, 2026
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.

2 participants