Skip to content

feat: support .blacklist locale resource for intents (OVOS-INTENT-2)#450

Merged
JarbasAl merged 1 commit into
devfrom
feat/blacklist-locale
Jul 2, 2026
Merged

feat: support .blacklist locale resource for intents (OVOS-INTENT-2)#450
JarbasAl merged 1 commit into
devfrom
feat/blacklist-locale

Conversation

@JarbasAl

@JarbasAl JarbasAl commented Jul 2, 2026

Copy link
Copy Markdown
Member

What

Adds support for the OVOS-INTENT-2 <intent>.blacklist locale resource file: a slot-free list of phrases (base name = the .intent it suppresses) that must never trigger the sibling intent.

Previously ovos-workshop had no .blacklist resource type, no loader, and register_intent_file never looked up a sibling <intent>.blacklist. The intent-registration blacklist field was only ever fed from the voc_blacklist= param.

Changes

  • ovos_workshop/resource_files.py
    • blacklist entry added to the SkillResourceTypes namedtuple and to _define_resource_types (.blacklist extension), plus the legacy subdirectory map.
    • New BlacklistFile resource class (flat list of phrases, mirroring the WordFile/ListFile shape).
    • New SkillResources.load_blacklist_file(name) helper mirroring load_intent_file.
  • ovos_workshop/skills/ovos.py register_intent_file: after building disallowed_strings from voc_blacklist, it now also loads <intent_basename>.blacklist for the lang and merges the phrases in before registration. Purely additive; the existing voc_blacklist path is unchanged.

Flow to the spec §6 blacklist field

A shipped foo.blacklist sitting next to foo.intent is loaded per-lang and merged into disallowed_strings, which is passed as string_blacklist to register_padatious_intent, which emits it as the blacklisted_words field of the intent-registration payload (the §6 blacklist field, aka blacklist in the INTENT-4 template registration).

Tests

New TestIntentBlacklistFile in test/unittests/test_skill.py with a fixture skill (ovos_tskill_blacklist): asserts a .blacklist file's phrases land in the emitted registration payload, and that an intent with no .blacklist yields an empty blacklist (back-compat). 31 touched tests pass in a fresh uv venv.

🤖 Generated with Claude Code

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

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@JarbasAl, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fd4deab2-7617-468b-97ce-496493b88988

📥 Commits

Reviewing files that changed from the base of the PR and between 46488ec and 976ee4b.

📒 Files selected for processing (6)
  • ovos_workshop/resource_files.py
  • ovos_workshop/skills/ovos.py
  • test/unittests/ovos_tskill_blacklist/locale/en-US/bar.intent
  • test/unittests/ovos_tskill_blacklist/locale/en-US/foo.blacklist
  • test/unittests/ovos_tskill_blacklist/locale/en-US/foo.intent
  • test/unittests/test_skill.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/blacklist-locale

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 Jul 2, 2026

Copy link
Copy Markdown
Contributor

Beep! I'm back with the goodies! 🍭

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

📋 Repo Health

Your repository is in great shape! ✅

✅ All required files present.

Latest Version: 9.0.4a1

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

The 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 Check

Are 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 Tests

The compiler has spoken! Here is the verdict. 📜

Python Build Install Tests
3.10
3.11
3.12
3.13
3.14 ⚠️

❌ 3.14: Install OK, tests failed
Check job logs for details.


Helping you build the future of voice, one check at a time. 🎙️

@JarbasAl JarbasAl marked this pull request as ready for review July 2, 2026 19:14
@JarbasAl JarbasAl merged commit af30244 into dev Jul 2, 2026
9 of 11 checks passed
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