feat: support .blacklist locale resource for intents (OVOS-INTENT-2)#450
Conversation
OVOS-INTENT-2 defines a sibling <intent>.blacklist file listing slot-free phrases that suppress the intent. Add the blacklist resource type + loader and merge a shipped .blacklist file into the intent registration blacklist alongside the voc_blacklist param. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 46 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ 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 |
Beep! I'm back with the goodies! 🍭I've aggregated the results of the automated checks for this PR below. 📋 Repo HealthYour repository is in great shape! ✅ ✅ All required files present. Latest Version: ✅ 🔍 LintThe results are in the bag! 🎒 ❌ ruff: issues found — see job log 🔒 Security (pip-audit)Looking for any weak links in the supply chain. ⛓️ ✅ No known vulnerabilities found (73 packages scanned). ⚖️ License CheckAre we all good on the legal front? Let's find out! 📑 ✅ No license violations found. Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed. 🔨 Build TestsThe compiler has spoken! Here is the verdict. 📜
❌ 3.14: Install OK, tests failed Helping you build the future of voice, one check at a time. 🎙️ |
What
Adds support for the OVOS-INTENT-2
<intent>.blacklistlocale resource file: a slot-free list of phrases (base name = the.intentit suppresses) that must never trigger the sibling intent.Previously ovos-workshop had no
.blacklistresource type, no loader, andregister_intent_filenever looked up a sibling<intent>.blacklist. The intent-registration blacklist field was only ever fed from thevoc_blacklist=param.Changes
ovos_workshop/resource_files.pyblacklistentry added to theSkillResourceTypesnamedtuple and to_define_resource_types(.blacklistextension), plus the legacy subdirectory map.BlacklistFileresource class (flat list of phrases, mirroring theWordFile/ListFileshape).SkillResources.load_blacklist_file(name)helper mirroringload_intent_file.ovos_workshop/skills/ovos.pyregister_intent_file: after buildingdisallowed_stringsfromvoc_blacklist, it now also loads<intent_basename>.blacklistfor the lang and merges the phrases in before registration. Purely additive; the existingvoc_blacklistpath is unchanged.Flow to the spec §6 blacklist field
A shipped
foo.blacklistsitting next tofoo.intentis loaded per-lang and merged intodisallowed_strings, which is passed asstring_blacklisttoregister_padatious_intent, which emits it as theblacklisted_wordsfield of the intent-registration payload (the §6 blacklist field, akablacklistin the INTENT-4 template registration).Tests
New
TestIntentBlacklistFileintest/unittests/test_skill.pywith a fixture skill (ovos_tskill_blacklist): asserts a.blacklistfile's phrases land in the emitted registration payload, and that an intent with no.blacklistyields an empty blacklist (back-compat). 31 touched tests pass in a fresh uv venv.🤖 Generated with Claude Code