Skip to content

feat: send an intent's .required keywords on its registration - #703

Merged
JarbasAl merged 1 commit into
devfrom
feat/required-keywords
Oct 29, 2026
Merged

JarbasAl merged 1 commit into
devfrom
feat/required-keywords

Conversation

@openvoiceos-bot

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

Copy link
Copy Markdown
Contributor

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

"If no keyword from the set occurs in the user's utterance, that intent is suppressed — a hard, score-independent rejection, not a confidence penalty. A .required does not affect any other intent. Every engine that scores the intent MUST apply it (OVOS-INTENT-3 §5.6)." (OVOS-INTENT-2 §4.5, as proposed in OpenVoiceOS/architecture#283)

What changed

register_intent_file loads the <intent>.required file next to each .intent, for each language. It sends the expanded keywords as required_keywords on both registration topics:

  • ovos.intent.register.template (OVOS-INTENT-4 §6.1, as proposed in feat:skilljson and homescreen #283);
  • the legacy padatious:register_intent, passed through emit_legacy_register_template in the same way as slot_blacklist.

An intent without the file sends an empty list, which means no requirement. The file loads with the .blacklist loader: lines are lowercased, (a|b) and [x] expand, and an inline <name> takes its values from the sibling .voc. The keywords are part of the stored registration, so a change to the keywords alone is sent again.

A .required file never fills required_slots: required keywords and required slots are separate declarations.

docs/resource-files.md describes .required and adds the missing .blacklist row.

What it needs from the reader

A review and a merge decision. The new keyword argument is optional, so existing callers do not change. The engine side is OpenVoiceOS/ovos-m2v-pipeline#308, ovos-padatious-pipeline-plugin#189 and padacioso#124. The padatious and padacioso changes read the key from both topics. A legacy payload without the key would reset their keywords to empty.

Evidence

Run Result
test/unittests/test_required_file.py on origin/dev source 8 failed: the 3 loader tests, test_changed_keywords_re_register, and 4 subtests (both topics) of the per-locale and empty-list tests
Same file on the previous head of this PR (template topic only) 3 failed, all padatious:register_intent subtests
Same file on this branch 7 passed, 10 subtests passed
Mutation: drop the key from the legacy payload 3 failed (legacy subtests)
Mutation: drop the key from the stored registration 2 failed (test_changed_keywords_re_register, both topics)
Full suite, test/unittests and test/end2end 808 passed, 1 skipped

The skip is test_locale_lookup.py:452, which skips under an editable install. It also skips on dev.

test_no_required_slots_are_sent passes on dev too. It guards that a .required file leaves required_slots empty on both topics.

Three tests in test/unittests/skills/test_base.py and two in test/unittests/test_intent_service_interface.py compare the exact registration call or legacy payload. Their expected values now include required_keywords=[].

Combined check: one venv with this branch and #308 installed editable, ovos-core 3.7.5a1, ovoscope 1.12.1a1 and ovos-utterance-normalizer 0.2.6a1. get_prototype_minicroft(["ovos-skill-wikihow.openvoiceos"], lang="en-US") with ovos-skill-wikihow from its dev branch stored ["wikihow", "wiki how"] for the en-US wikihow intent.

Utterance, low floor 0.45 both dev both branches
how do i tie a tie on wikihow wikihow wikihow
how do i tie a tie wikihow no match

At the default floor (0.56) the second utterance gets no match on dev either: it scores 0.5009. With both branches, the .required check drops it before the threshold.

Verified

Verified by a model re-run, not by a human. The counts and routing results come from executed runs against origin/dev at b8ed41c.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7a7c991f-438a-4146-85b3-8f2292a9d23d
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

The code stars have aligned. Here's the update. ✨

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

📋 Repo Health

Ensuring the repository remains a happy place. 😊

✅ All required files present.

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

📡 Channel Compat — testing

Checking the boxes and crossing the T's. 🖋️

🚧 Channel unresolvable with this checkout — the repo's dependency floors exceed what the channel pins (fleet finding; see the install log).

Constraints: https://raw.githubusercontent.com/OpenVoiceOS/OpenVoiceOS/main/constraints-testing.txt
Resolved stack: channel-compat-testing artifact (constraints + pip freeze).

🔍 Lint

The automated results are now available for your perusal. 📂

❌ ruff: issues found in 107 file(s) — see job log
✅ actionlint: 11 workflow file(s), no finding

📡 Channel Compat — stable

I've gathered the facts for your review. 📖

🚧 Channel unresolvable with this checkout — the repo's dependency floors exceed what the channel pins (fleet finding; see the install log).

Constraints: https://raw.githubusercontent.com/OpenVoiceOS/OpenVoiceOS/main/constraints-stable.txt
Resolved stack: channel-compat-stable artifact (constraints + pip freeze).

🔒 Security (pip-audit)

I've checked for any insecure file permissions. 📂

⚠️ 3 known vulnerabilities in 1 package (72 packages scanned). This job warns and does not fail; update the affected packages.

Package Version ID Description Fix
filelock 3.32.7 CVE-2026-112940 ReadWriteLock and AsyncReadWriteLock (the SQLite-backed reader/writer lock) hand SQLite a name they do not contro... 4.2.1
filelock 3.32.7 CVE-2026-112913 On Windows, ReadWriteLock and AsyncReadWriteLock (the SQLite-backed reader/writer lock) connect SQLite to the loc... 4.2.1
filelock 3.32.7 CVE-2026-112907 On Windows the soft locks (SoftFileLock, MarkerSoftFileLock, SoftFileLease, their async forms, and a FileLock... 4.2.1

🔨 Build Tests

I've checked the welds on your new features. 👨‍🏭

✅ All versions pass

Python Build Install Tests pytest
3.10 ✅ ✅ ✅ 810 passed, 252 warnings, 46 subtests passed in 73.37s (0:01:13)
3.11 ✅ ✅ ✅ 810 passed, 254 warnings, 46 subtests passed in 71.16s (0:01:11)
3.12 ✅ ✅ ✅ 810 passed, 254 warnings, 46 subtests passed in 71.76s (0:01:11)
3.13 ✅ ✅ ✅ 810 passed, 253 warnings, 46 subtests passed in 72.41s (0:01:12)
3.14 ✅ ✅ ✅ 810 passed, 253 warnings, 46 subtests passed in 69.61s (0:01:09)

⚖️ License Check

Verifying the source of all binary files. 💾

✅ No license violations found.

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


Built by scripts, maintained by community 🤝

@JarbasAl

Copy link
Copy Markdown
Member

#414 should probably be finished first and this one refactored on top

register_intent_file loads the <intent>.required file next to each .intent,
for each language, and sends its expanded keywords as required_keywords
(OVOS-INTENT-2 §4.5, OVOS-INTENT-4 §6.1). The field rides both the
ovos.intent.register.template topic and the legacy padatious:register_intent
topic. An intent without the file sends an empty list. The file loads with
the .blacklist loader, so alternatives expand and an inline <name> takes the
values of the sibling .voc. The keywords are part of the stored
registration, so a change to them alone is sent again. No required_slots
are derived or sent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JarbasAl
JarbasAl force-pushed the feat/required-keywords branch from dea3f40 to a8190c9 Compare October 28, 2026 11:04
@github-actions github-actions Bot added feature and removed feature labels Oct 28, 2026
@JarbasAl
JarbasAl marked this pull request as ready for review October 29, 2026 09:48
@JarbasAl
JarbasAl merged commit d1143ad into dev Oct 29, 2026
16 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.

2 participants