Skip to content

fix: expand inline <voc> refs before registering intents to the engine#458

Draft
JarbasAl wants to merge 1 commit into
devfrom
fix/inline-voc-padatious-register
Draft

fix: expand inline <voc> refs before registering intents to the engine#458
JarbasAl wants to merge 1 commit into
devfrom
fix/inline-voc-padatious-register

Conversation

@JarbasAl

@JarbasAl JarbasAl commented Jul 3, 2026

Copy link
Copy Markdown
Member

Problem

Per OVOS-INTENT-1 §3.7, an inline <name> reference in a .intent is an
authoring convenience that MUST expand in place from the sibling .voc of that
name before the template reaches an intent engine (<name> never reaches an
engine). Skills empirically found that a .intent shipping <month>/<thing>
plus a sibling .voc still failed to match — the engine trained on the literal
<name> token.

Root cause

OVOSSkill.register_intent_fileIntentServiceInterface.register_padatious_intent
reads the raw .intent file and emits its lines as samples on the
padatious:register_intent bus topic. The bus protocol carries only samples,
never the .voc content
, and no step resolved the inline reference, so the raw
<name> was trained into padatious/padacioso. (Workshop #455 fixed the separate
SkillResources.load_intent_file loader path, but that path is not used for
engine registration, so the pipeline stayed broken.)

Empirically, what about <thing> + thing.voc = widget\ngadget, utterance
"what about widget":

samples sent to engine padacioso padatious
before what about <thing> no match coincidental (0.54)
after what about (widget|gadget) match (1.0) match (1.0)

Fix

  • SkillResources.vocabularies() builds the {name: members} map from the
    locale tree (user > skill > workshop precedence).
  • register_padatious_intent gains a vocabs kwarg and inlines every <name>
    as an (a|b|c) group via ovos_spec_tools.inline_keywords before emitting the
    samples; register_intent_file supplies the map. Files without inline refs are
    unaffected.

Tests

test/unittests/test_inline_vocab_refs.py — the vocabularies() map, the
resolved-vs-raw samples on the bus, and an end-to-end match through the real
padacioso engine
(raw <thing> does not match; resolved does). TDD: the four
new-behavior tests fail on dev, all pass with the fix. Padatious verified
locally (fann2/libfann) with the same result.

🤖 Generated with Claude Code

@github-actions github-actions Bot added the fix label Jul 3, 2026
@coderabbitai

coderabbitai Bot commented Jul 3, 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: 8f910819-8134-4d6e-9ddf-a7a564a2cab4

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 fix/inline-voc-padatious-register

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.

@JarbasAl JarbasAl force-pushed the fix/inline-voc-padatious-register branch from 8905267 to a2d0ad6 Compare July 3, 2026 19:33
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

I've completed my sweep! Here's the situation. 🧹

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

📋 Repo Health

Health report: The repository is thriving! 🌟

✅ All required files present.

Latest Version: 9.2.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

🔍 Lint

I've checked the vitals of this contribution. 🩺

ruff: issues found — see job log

🔒 Security (pip-audit)

Ensuring our defenses are strong against vulnerabilities. 🏰

✅ No known vulnerabilities found (73 packages scanned).

⚖️ License Check

Checking for any potential license conflicts. ⚔️

✅ No license violations found.

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

🔨 Build Tests

Testing the recipe! Did the build turn out okay? 👨‍🍳

Python Build Install Tests
3.10 ⚠️
3.11 ⚠️
3.12 ⚠️
3.13 ⚠️
3.14 ⚠️

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


Stay curious and keep coding! 🚀

OVOS-INTENT-1 §3.7 makes an inline <name> in a .intent an authoring
convenience that MUST expand in place from the sibling vocabulary of
that name before the template reaches an intent engine. The
padatious/padacioso bus protocol carries only samples, never the .voc
content, so register_intent_file sent the raw <name> straight through
and both engines trained on the literal token — padacioso never matched
and padatious matched only by coincidence.

Add SkillResources.vocabularies() to build the {name: members} map from
the locale tree (user > skill > workshop precedence) and pass it into
register_padatious_intent, which now inlines every <name> as an (a|b|c)
group via ovos_spec_tools.inline_keywords before emitting the samples.
Files without inline references are unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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