fix: expand inline <voc> refs before registering intents to the engine#458
fix: expand inline <voc> refs before registering intents to the engine#458JarbasAl wants to merge 1 commit into
Conversation
|
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 |
8905267 to
a2d0ad6
Compare
I've completed my sweep! Here's the situation. 🧹I've aggregated the results of the automated checks for this PR below. 📋 Repo HealthHealth report: The repository is thriving! 🌟 ✅ All required files present. Latest Version: ✅ 🔍 LintI'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 CheckChecking 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 TestsTesting the recipe! Did the build turn out okay? 👨🍳
❌ 3.10: Install OK, tests failed 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>
a2d0ad6 to
d2d34c0
Compare
Problem
Per OVOS-INTENT-1 §3.7, an inline
<name>reference in a.intentis anauthoring convenience that MUST expand in place from the sibling
.vocof thatname before the template reaches an intent engine (
<name>never reaches anengine). Skills empirically found that a
.intentshipping<month>/<thing>plus a sibling
.vocstill failed to match — the engine trained on the literal<name>token.Root cause
OVOSSkill.register_intent_file→IntentServiceInterface.register_padatious_intentreads the raw
.intentfile and emits its lines assampleson thepadatious:register_intentbus topic. The bus protocol carries only samples,never the
.voccontent, and no step resolved the inline reference, so the raw<name>was trained into padatious/padacioso. (Workshop #455 fixed the separateSkillResources.load_intent_fileloader path, but that path is not used forengine registration, so the pipeline stayed broken.)
Empirically,
what about <thing>+thing.voc=widget\ngadget, utterance"what about widget":what about <thing>what about (widget|gadget)Fix
SkillResources.vocabularies()builds the{name: members}map from thelocale tree (user > skill > workshop precedence).
register_padatious_intentgains avocabskwarg and inlines every<name>as an
(a|b|c)group viaovos_spec_tools.inline_keywordsbefore emitting thesamples;
register_intent_filesupplies the map. Files without inline refs areunaffected.
Tests
test/unittests/test_inline_vocab_refs.py— thevocabularies()map, theresolved-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 fournew-behavior tests fail on
dev, all pass with the fix. Padatious verifiedlocally (fann2/libfann) with the same result.
🤖 Generated with Claude Code