Skip to content

feat: union slot sets for .intent (OVOS-INTENT-1 §5.5)#19

Merged
JarbasAl merged 2 commits into
devfrom
feat/union-slot-sets-required-slots
Jun 2, 2026
Merged

feat: union slot sets for .intent (OVOS-INTENT-1 §5.5)#19
JarbasAl merged 2 commits into
devfrom
feat/union-slot-sets-required-slots

Conversation

@JarbasAl

@JarbasAl JarbasAl commented Jun 2, 2026

Copy link
Copy Markdown
Member

Companion PR to OpenVoiceOS/architecture#56.

Updates the reference implementation to match the spec change that relaxes slot-consistency for .intent files while keeping it strict for .dialog.

Changes

  • ovos_spec_tools/lint.py — the slot-consistency check (OVOS-INTENT-1 §5.5) now:
    • ERROR for .dialog files with differing slot sets (unchanged).
    • WARNING for .intent files with differing slot sets — valid but atypical, so the linter flags it for review without breaking the build.
  • test/test_lint.py — updated tests:
    • .intent with different slot sets → WARNING (no error, exit 0).
    • .intent with slot-bearing + slot-free lines → WARNING (no error).
    • .dialog with different slot sets → still an ERROR.
    • .dialog with slot-bearing + slot-free lines → still an ERROR.

Design note

The expand() primitive already worked one template at a time and never enforced cross-template consistency. The linter was the only place that enforced §5.5 uniformly. Narrowing the check to .dialog aligns the linter with the relaxed spec. A warning on .intent gives authors a safety net for accidental copy-paste without penalising legitimate union-slot intents.

Test

All 303 tests pass (full suite: pytest test/).

- lint.py: slot-consistency check now applies only to .dialog
  (OVOS-INTENT-1 §5.5). .intent files with differing slot sets
  are accepted.
- test/test_lint.py: update slot-consistency tests — .intent with
  different slot sets is clean, .dialog still requires identical
  slot sets.
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

More reviews will be available in 32 minutes and 55 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

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.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7c29373e-f871-4052-8040-19f015022c14

📥 Commits

Reviewing files that changed from the base of the PR and between 5978448 and c27c827.

📒 Files selected for processing (2)
  • ovos_spec_tools/lint.py
  • test/test_lint.py
📝 Walkthrough

Walkthrough

The PR refines slot-set consistency rules in the locale resource linter: .intent files now permit inconsistent slot sets across templates via union semantics, while .dialog files enforce identical declared slot sets. The implementation adds an explicit .dialog check in the linter, and test expectations are updated accordingly.

Changes

Dialog slot-set consistency enforcement

Layer / File(s) Summary
Add .dialog slot consistency check
ovos_spec_tools/lint.py
Linter adds explicit logic to check .dialog templates and enforce that all templates declare identical slot sets; inconsistency triggers a slot-set error.
Update intent and dialog slot-set tests
test/test_lint.py
Test suite confirms .intent files accept inconsistent slot sets (renamed/refactored tests assert no errors); new .dialog tests confirm that inconsistent or mixed slotted/slotless lines produce slot-set errors.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

Poem

🐰 A dialog's slots must all align,
Intent's may dance in wild design.
The linter's voice grows strong and clear:
Consistency where dialogs appear! 🎭

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: allowing unioned/different slot sets for .intent files per the spec §5.5, while the implementation also enforces consistency for .dialog files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/union-slot-sets-required-slots

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 and usage tips.

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

I've gathered some intelligence on your latest changes. 🕵️‍♀️

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

🔍 Lint

Just a little bit of automation magic for you. ✨

ruff: issues found — see job log

🔒 Security (pip-audit)

I've checked the security of our build pipeline. 🏗️

✅ No known vulnerabilities found (32 packages scanned).

🏷️ Release Preview

Evaluating the excitement level for the next release. 🤩

Current: 0.6.0a1Next: 0.7.0a1

Signal Value
Label feature
PR title feat: union slot sets for .intent (OVOS-INTENT-1 §5.5)
Bump minor

✅ PR title follows conventional commit format.


🚀 Release Channel Compatibility

Predicted next version: 0.7.0a1

Channel Status Note Current Constraint
Stable Not in channel -
Testing Not in channel -
Alpha Compatible ovos-spec-tools>=0.6.0a1

⚖️ License Check

Evaluating the legal risk of these changes. ⚖️

❌ License violations detected (4 packages) — review required before merging.

Dependency                          License Name                                            License Type         Misc                                    
ovos-spec-tools                     Error                                                   Error                                                        

License Type                        Found                                                  
Error                               1

License distribution: 1× Apache Software License, 1× Apache-2.0 OR BSD-2-Clause, 1× MIT, 1× MIT License

Full breakdown — 4 packages
Package Version License URL
build 1.5.0 MIT link
ovos-spec-tools ⚠️ 0.6.0a1 Apache Software License link
packaging 26.2 Apache-2.0 OR BSD-2-Clause link
pyproject_hooks 1.2.0 MIT License link

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

📋 Repo Health

Ensuring the repository stays up to date. 🔄

✅ All required files present.

Latest Version: 0.6.0a1

ovos_spec_tools/version.py — Version file
README.md — README
LICENSE.md — License file (consider renaming to LICENSE)
pyproject.toml — pyproject.toml
⚠️ setup.py — setup.py
CHANGELOG.md — Changelog
ovos_spec_tools/version.py has valid version block markers

🔨 Build Tests

The build is complete. No hard hats required. 👷‍♂️

✅ All versions pass

Python Build Install Tests
3.10
3.11
3.12
3.13
3.14

📊 Coverage

Calculating the density of our test suite. 🧮

97.1% total coverage

Per-file coverage (9 files)
File Coverage Missing lines
ovos_spec_tools/language.py 89.7% 7
ovos_spec_tools/message.py 95.9% 3
ovos_spec_tools/resources.py 97.1% 6
ovos_spec_tools/expansion.py 98.1% 2
ovos_spec_tools/lint.py 98.6% 2
ovos_spec_tools/__init__.py 100.0% 0
ovos_spec_tools/dialog.py 100.0% 0
ovos_spec_tools/prompt.py 100.0% 0
ovos_spec_tools/version.py 100.0% 0

Full report: download the coverage-report artifact.


An automated message from your friendly PR bot. 🤖

@JarbasAl JarbasAl marked this pull request as ready for review June 2, 2026 06:12
@github-actions github-actions Bot added feature and removed feature labels Jun 2, 2026
@JarbasAl JarbasAl marked this pull request as draft June 2, 2026 06:26
- lint.py: add WARNING (not ERROR) when .intent templates declare
  different slot sets. Exits 0 unless --strict is passed.
- test/test_lint.py: update tests to expect WARNING for .intent
  inconsistency, no error.
@JarbasAl JarbasAl force-pushed the feat/union-slot-sets-required-slots branch from f591720 to c27c827 Compare June 2, 2026 06:27
@JarbasAl JarbasAl marked this pull request as ready for review June 2, 2026 06:39
@JarbasAl JarbasAl merged commit 7092490 into dev Jun 2, 2026
13 checks passed
@JarbasAl JarbasAl deleted the feat/union-slot-sets-required-slots branch June 26, 2026 16:06
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