Skip to content

Conversation

@JarbasAl
Copy link
Member

@JarbasAl JarbasAl commented Jun 5, 2025

Summary by CodeRabbit

  • New Features
    • Introduced a standalone intent service with a new command-line entry point (ovos-intent-service) for running the intent service independently.
  • Refactor
    • Major overhaul of intent service architecture, consolidating and relocating intent handling logic, and removing deprecated compatibility shims.
    • Simplified skill management to support only plugin-based skills, removing legacy skill support.
    • Updated intent, fallback, converse, and stop services to use a unified, event-driven matching and handling approach.
    • Streamlined intent transformers to standardize on a single match type.
  • Bug Fixes
    • Improved session and language handling in intent processing.
  • Chores
    • Updated and reorganized package dependencies and version requirements across multiple requirements files.
  • Tests
    • Enhanced and expanded end-to-end tests for intent, fallback, and converse handling.
    • Improved test setup and teardown for efficiency and reliability.
    • Removed outdated or redundant unit tests.

@coderabbitai
Copy link

coderabbitai bot commented Jun 5, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update refactors the intent service infrastructure, centralizing the IntentService implementation in a new module and removing legacy and deprecated intent service shims. The skill manager is simplified to support only plugin-based skills, with old-style skill handling eliminated. Several intent service classes are modernized to use a unified matcher interface. Requirements are updated to newer package versions and reorganized for clarity. Tests are refactored for efficiency, and a new standalone intent service entry point is introduced.

Changes

File(s) Change Summary
.github/workflows/unit_tests.yml Simplified workflow to test only Python 3.11, removing matrix for multiple Python versions.
ovos_core/intent_services/__init__.py Implementation of IntentService moved to a new module; now imports from service.py.
ovos_core/intent_services/service.py New file: Implements full IntentService class with pipeline/plugin integration, event handling, and standalone launch support.
ovos_core/intent_services/adapt_service.py,
commonqa_service.py,
ocp_service.py,
padacioso_service.py,
padatious_service.py
Deleted deprecated backward compatibility shims for legacy intent services, removing deprecation warnings and import aliases.
ovos_core/intent_services/converse_service.py Refactored: Removed synchronous converse logic, simplified to matcher interface, and updated session/skill handling.
ovos_core/intent_services/fallback_service.py Refactored: Inherits from ConfidenceMatcherPipeline, removes synchronous fallback querying, unifies config access, and updates priority match methods.
ovos_core/intent_services/stop_service.py Refactored: Inherits from ConfidenceMatcherPipeline, removes synchronous stop logic, uses async event-driven stop confirmation, and updates match methods.
ovos_core/skill_manager.py Removed all legacy skill loading/unloading; now manages only plugin skills, waits for intent service readiness, and cleans up related code.
ovos_core/transformers.py Simplified: IntentTransformersService.transform now only accepts/returns IntentHandlerMatch.
requirements/lgpl.txt,
mycroft.txt,
plugins.txt,
requirements.txt,
skills-audio.txt,
skills-desktop.txt,
skills-en.txt,
skills-essential.txt,
skills-extra.txt,
skills-gui.txt,
skills-internet.txt,
skills-media.txt,
tests.txt
Updated package versions, reorganized plugin requirements, removed some dependencies, and clarified skill translation requirements.
setup.py Added new console script entry point: ovos-intent-service for standalone intent service launch.
test/end2end/test_fallback.py New: Adds end-to-end fallback skill test class.
test/end2end/test_helloworld.py Refactored: Adds setup/teardown, reuses minicroft instance, updates pipeline names, and adds model2vec intent tests.
test/end2end/test_no_skills.py Refactored: Adds setup/teardown, reuses minicroft instance in tests.
test/end2end/test_converse.py New: Adds end-to-end converse interaction test with parrot skill.
test/unittests/test_intent_service.py Removed: Deletes TestIntentServiceApi class and its tests.
test/unittests/test_manager.py Removed: Deletes test for loading blacklisted skills.
test/unittests/test_skill_manager.py Updated: Replaces skill_loaders with plugin_skills, removes test for unloading removed skills.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MessageBus
    participant IntentService
    participant PipelinePlugin
    participant SkillManager

    User->>MessageBus: recognizer_loop:utterance
    MessageBus->>IntentService: handle_utterance
    IntentService->>PipelinePlugin: match utterance (via pipeline)
    PipelinePlugin-->>IntentService: IntentHandlerMatch or None
    alt Match found
        IntentService->>SkillManager: activate skill (if needed)
        IntentService->>MessageBus: emit intent message
    else No match
        IntentService->>MessageBus: complete_intent_failure
    end
Loading

Poem

In fields of code, where plugins bloom,
The old intent shims meet their doom.
Pipelines match with nimble grace,
Only plugins now in skillful place.
With tests refactored, requirements neat,
Intent service stands—robust, complete!
(A rabbit hops, its work replete.)

((\
( -.-)
o_(")(")


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b94f3c5 and 521df63.

📒 Files selected for processing (3)
  • requirements/tests.txt (1 hunks)
  • test/end2end/test_fallback.py (1 hunks)
  • test/end2end/test_helloworld.py (6 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the breaking breaks backwards compatibility (kinda) label Jun 5, 2025
@JarbasAl JarbasAl force-pushed the drop_old_pipelines branch from 47ccb37 to a58d86c Compare June 8, 2025 19:27
loads pipeline plugins from config 🎉

no longer tied to adapt/padatious
@JarbasAl JarbasAl force-pushed the drop_old_pipelines branch from bd49fb0 to ee2f4ee Compare June 9, 2025 19:12
@OpenVoiceOS OpenVoiceOS deleted a comment from codecov bot Jun 9, 2025
@github-actions
Copy link

github-actions bot commented Jun 10, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  ovos_core
  skill_manager.py 348-356, 362-364, 443-446, 452-458
  transformers.py
  ovos_core/intent_services
  __init__.py
  converse_service.py 301-305
  fallback_service.py 91
  service.py 52, 56, 126-127, 140-141, 161-167, 209-210, 231, 245-246, 248-249, 251-252, 265-267, 299-300, 344, 362-378, 399-405, 438-439, 462, 478-479, 519-531, 540-543, 548-549, 557-580, 584-606, 610-629, 633
  stop_service.py 138-144, 149, 193, 204-207, 253, 292-305, 323
Project Total  

This report was generated by python-coverage-comment-action

@JarbasAl JarbasAl marked this pull request as ready for review June 10, 2025 00:23
coderabbitai bot added a commit that referenced this pull request Jun 10, 2025
Docstrings generation was requested by @JarbasAl.

* #690 (comment)

The following files were modified:

* `ovos_core/intent_services/converse_service.py`
* `ovos_core/intent_services/fallback_service.py`
* `ovos_core/intent_services/service.py`
* `ovos_core/intent_services/stop_service.py`
* `ovos_core/skill_manager.py`
* `ovos_core/transformers.py`
* `test/end2end/test_fallback.py`
* `test/end2end/test_helloworld.py`
* `test/end2end/test_no_skills.py`
* `test/unittests/test_manager.py`
* `test/unittests/test_skill_manager.py`
@coderabbitai
Copy link

coderabbitai bot commented Jun 10, 2025

Note

Generated docstrings for this pull request at #697

@github-actions github-actions bot added breaking breaks backwards compatibility (kinda) and removed breaking breaks backwards compatibility (kinda) labels Jun 10, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 11

🔭 Outside diff range comments (1)
test/unittests/test_intent_service.py (1)

1-84: 💡 Verification agent

🧩 Analysis chain

Verify test coverage for the refactored IntentService.

The removal of TestIntentServiceApi aligns with the IntentService refactoring. However, ensure that the new implementation has adequate test coverage through the mentioned end-to-end tests.


🏁 Script executed:

#!/bin/bash
# Description: Check for test coverage of the new IntentService implementation

# Find tests that cover the new IntentService
echo "Searching for tests of the new IntentService..."
rg -l "IntentService|intent.*service" test/ --type py

# Check if end-to-end tests exist as mentioned in the summary
echo -e "\nChecking for end-to-end tests..."
fd -e py . test/end2end/ --exec head -20 {} \; | grep -E "(fallback|intent|IntentService)" -B2 -A2

# Look for the new service.py module
echo -e "\nVerifying new IntentService module exists..."
fd "service.py" ovos_core/intent_services/

Length of output: 941


Add end-to-end tests for the new IntentService implementation

Our quick audit shows:

  • Only one unit test touches ContextManager and language extraction (test/unittests/test_intent_service.py), but nothing directly exercising ovos_core/intent_services/service.py.
  • The end-to-end suite under test/end2end/ only contains fallback tests—no scenarios drive the core IntentService flow.

Please add dedicated tests that:

  • Invoke the new IntentService (e.g. via a minimal skill or fake bus with sample utterances).
  • Confirm intent matching, handler dispatch, and session lifecycle end-to-end.
  • Live under test/end2end/ (e.g. test/end2end/test_intent_service.py).

This will ensure the refactored service is fully exercised.

🧰 Tools
🪛 Ruff (0.11.9)

15-15: time imported but unused

Remove unused import: time

(F401)


16-16: unittest imported but unused

Remove unused import: unittest

(F401)


26-26: ovos_core.intent_services.IntentService imported but unused

Remove unused import: ovos_core.intent_services.IntentService

(F401)


27-27: ovos_utils.fakebus.FakeBus imported but unused

Remove unused import: ovos_utils.fakebus.FakeBus

(F401)


28-28: ovos_workshop.intents.IntentBuilder imported but unused

Remove unused import: ovos_workshop.intents.IntentBuilder

(F401)

🧹 Nitpick comments (10)
requirements/mycroft.txt (1)

2-5: Audit core component version alignment
Major bumps for ovos_PHAL, ovos-audio[extras], ovos-audio, and ovos-gui[extras] require verifying that Mycroft integrations and downstream services still function. Consider consolidating the duplicate audio entries (plain vs. extras) to simplify the requirements file.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~2-~2: A comma might be missing here.
Context: ...ed to do ovos_PHAL[extras]>=0.2.9,<1.0.0 ovos-audio[extras]>=1.0.1,<2.0.0 ovos-au...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[uncategorized] ~5-~5: A punctuation mark might be missing here.
Context: ....1,<2.0.0 ovos-audio>=1.0.1,<2.0.0 ovos-gui[extras]>=1.3.3,<2.0.0 ovos-messagebus>=0.0.7,<1.0.0 ovos-dink...

(AI_EN_LECTOR_MISSING_PUNCTUATION)

ovos_core/intent_services/fallback_service.py (2)

76-81: Simplify conditional logic by combining branches.

The two conditional branches can be combined using logical or for better readability.

-        if opmode == FallbackMode.BLACKLIST and skill_id in \
-                self.config.get("fallback_blacklist", []):
-            return False
-        elif opmode == FallbackMode.WHITELIST and skill_id not in \
-                self.config.get("fallback_whitelist", []):
-            return False
-        return True
+        if (opmode == FallbackMode.BLACKLIST and skill_id in self.config.get("fallback_blacklist", [])) or \
+           (opmode == FallbackMode.WHITELIST and skill_id not in self.config.get("fallback_whitelist", [])):
+            return False
+        return True
🧰 Tools
🪛 Ruff (0.11.9)

76-81: Combine if branches using logical or operator

Combine if branches

(SIM114)

🪛 Pylint (3.3.7)

[refactor] 76-81: Unnecessary "elif" after "return", remove the leading "el" from "elif"

(R1705)


155-155: Rename unused loop variable.

The prio variable is not used within the loop body.

-        for skill_id, prio in sorted_handlers:
+        for skill_id, _ in sorted_handlers:
🧰 Tools
🪛 Ruff (0.11.9)

155-155: Loop control variable prio not used within loop body

Rename unused prio to _prio

(B007)

test/unittests/test_intent_service.py (1)

16-16: Remove unused import.

The unittest import is no longer needed after removing the TestIntentServiceApi class.

-import unittest
🧰 Tools
🪛 Ruff (0.11.9)

16-16: unittest imported but unused

Remove unused import: unittest

(F401)

test/end2end/test_fallback.py (3)

14-15: Consider extracting the skill ID to a test fixture or constant.

The skill ID is hardcoded here. For better maintainability, consider defining it as a class constant or loading it from a test configuration.

 class TestFallback(TestCase):
+    FALLBACK_SKILL_ID = "ovos-skill-fallback-unknown.openvoiceos"
 
     def setUp(self):
         LOG.set_level("DEBUG")
-        self.skill_id = "ovos-skill-fallback-unknown.openvoiceos"
+        self.skill_id = self.FALLBACK_SKILL_ID
         self.minicroft = get_minicroft([self.skill_id])  # reuse for speed, but beware if skills keeping internal state

34-34: Clarify the comment about routing exception.

The comment "for routing tests this is an exception" is unclear. Consider expanding it to explain why ovos.skills.fallback.ping needs to keep its original source in this specific test scenario.


54-54: Consider parameterizing the fallback handler name.

The handler name "UnknownSkill.handle_fallback" is hardcoded. If the skill's implementation changes, this test will break. Consider making it configurable or deriving it from the skill metadata.

ovos_core/skill_manager.py (2)

349-349: Remove unnecessary f-string prefixes.

These strings don't contain any placeholders, so the f-string prefix is not needed.

-        Message(f'mycroft.intents.is_ready',
+        Message('mycroft.intents.is_ready',
-                    LOG.debug(f"pipelines trained and ready to go")
+                    LOG.debug("pipelines trained and ready to go")

Also applies to: 454-454

🧰 Tools
🪛 Ruff (0.11.9)

349-349: f-string without any placeholders

Remove extraneous f prefix

(F541)


410-418: Missing implementations for skill unloading methods.

Three methods have TODO comments indicating missing implementations for unloading skills when network, internet, or GUI disconnects. This could lead to skills remaining loaded when they shouldn't be.

Would you like me to help implement these methods or create an issue to track this technical debt?

ovos_core/intent_services/service.py (1)

460-462: Use descriptive variable names in list comprehension.

The single-letter variable name reduces readability.

-                    langs += [l for l in get_valid_languages() if l != lang]
+                    langs += [valid_lang for valid_lang in get_valid_languages() if valid_lang != lang]
🧰 Tools
🪛 Ruff (0.11.9)

462-462: Ambiguous variable name: l

(E741)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a916266 and 4b52970.

📒 Files selected for processing (33)
  • .github/workflows/unit_tests.yml (1 hunks)
  • ovos_core/intent_services/__init__.py (1 hunks)
  • ovos_core/intent_services/adapt_service.py (0 hunks)
  • ovos_core/intent_services/commonqa_service.py (0 hunks)
  • ovos_core/intent_services/converse_service.py (5 hunks)
  • ovos_core/intent_services/fallback_service.py (5 hunks)
  • ovos_core/intent_services/ocp_service.py (0 hunks)
  • ovos_core/intent_services/padacioso_service.py (0 hunks)
  • ovos_core/intent_services/padatious_service.py (0 hunks)
  • ovos_core/intent_services/service.py (1 hunks)
  • ovos_core/intent_services/stop_service.py (8 hunks)
  • ovos_core/skill_manager.py (10 hunks)
  • ovos_core/transformers.py (2 hunks)
  • requirements/lgpl.txt (1 hunks)
  • requirements/mycroft.txt (1 hunks)
  • requirements/plugins.txt (1 hunks)
  • requirements/requirements.txt (1 hunks)
  • requirements/skills-audio.txt (1 hunks)
  • requirements/skills-desktop.txt (1 hunks)
  • requirements/skills-en.txt (1 hunks)
  • requirements/skills-essential.txt (1 hunks)
  • requirements/skills-extra.txt (1 hunks)
  • requirements/skills-gui.txt (1 hunks)
  • requirements/skills-internet.txt (1 hunks)
  • requirements/skills-media.txt (1 hunks)
  • requirements/tests.txt (1 hunks)
  • setup.py (1 hunks)
  • test/end2end/test_fallback.py (1 hunks)
  • test/end2end/test_helloworld.py (6 hunks)
  • test/end2end/test_no_skills.py (2 hunks)
  • test/unittests/test_intent_service.py (1 hunks)
  • test/unittests/test_manager.py (0 hunks)
  • test/unittests/test_skill_manager.py (3 hunks)
💤 Files with no reviewable changes (6)
  • ovos_core/intent_services/padacioso_service.py
  • ovos_core/intent_services/padatious_service.py
  • ovos_core/intent_services/adapt_service.py
  • ovos_core/intent_services/commonqa_service.py
  • ovos_core/intent_services/ocp_service.py
  • test/unittests/test_manager.py
🧰 Additional context used
🧬 Code Graph Analysis (3)
ovos_core/intent_services/__init__.py (1)
ovos_core/intent_services/service.py (1)
  • IntentService (59-604)
test/end2end/test_no_skills.py (2)
test/end2end/test_helloworld.py (6)
  • setUp (11-14)
  • setUp (140-143)
  • setUp (268-271)
  • tearDown (16-19)
  • tearDown (145-148)
  • tearDown (273-276)
ovos_core/skill_manager.py (1)
  • stop (539-549)
test/end2end/test_helloworld.py (2)
test/end2end/test_no_skills.py (2)
  • setUp (11-13)
  • tearDown (15-18)
ovos_core/skill_manager.py (1)
  • stop (539-549)
🪛 LanguageTool
requirements/skills-desktop.txt

[uncategorized] ~2-~2: A comma might be missing here.
Context: ...kill-application-launcher>=0.5.14,<1.0.0 ovos-skill-wallpapers>=1.0.2,<3.0.0 ovos...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)

requirements/mycroft.txt

[uncategorized] ~2-~2: A comma might be missing here.
Context: ...ed to do ovos_PHAL[extras]>=0.2.9,<1.0.0 ovos-audio[extras]>=1.0.1,<2.0.0 ovos-au...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[uncategorized] ~5-~5: A punctuation mark might be missing here.
Context: ....1,<2.0.0 ovos-audio>=1.0.1,<2.0.0 ovos-gui[extras]>=1.3.3,<2.0.0 ovos-messagebus>=0.0.7,<1.0.0 ovos-dink...

(AI_EN_LECTOR_MISSING_PUNCTUATION)

🪛 Ruff (0.11.9)
test/unittests/test_intent_service.py

16-16: unittest imported but unused

Remove unused import: unittest

(F401)

ovos_core/intent_services/__init__.py

1-1: ovos_core.intent_services.service.IntentService imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

ovos_core/skill_manager.py

18-18: threading.Lock imported but unused

Remove unused import: threading.Lock

(F401)


349-349: f-string without any placeholders

Remove extraneous f prefix

(F541)


454-454: f-string without any placeholders

Remove extraneous f prefix

(F541)

ovos_core/intent_services/fallback_service.py

76-81: Combine if branches using logical or operator

Combine if branches

(SIM114)


85-85: Do not perform function call FallbackRange in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable

(B008)


155-155: Loop control variable prio not used within loop body

Rename unused prio to _prio

(B007)

ovos_core/intent_services/stop_service.py

18-18: ovos_utils.log.deprecated imported but unused

Remove unused import: ovos_utils.log.deprecated

(F401)

ovos_core/intent_services/service.py

155-155: Ambiguous variable name: l

(E741)


462-462: Ambiguous variable name: l

(E741)


478-478: Do not use bare except

(E722)


590-590: Do not use bare except

(E722)


595-595: Do not use bare except

(E722)

🪛 Pylint (3.3.7)
ovos_core/intent_services/fallback_service.py

[refactor] 76-81: Unnecessary "elif" after "return", remove the leading "el" from "elif"

(R1705)

ovos_core/intent_services/service.py

[refactor] 59-59: Too many instance attributes (8/7)

(R0902)


[refactor] 66-66: Too many arguments (9/5)

(R0913)


[refactor] 66-66: Too many positional arguments (9/5)

(R0917)


[refactor] 162-167: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it

(R1705)


[refactor] 407-407: Either all return statements in a function should return an expression, or none of them should.

(R1710)

🔇 Additional comments (32)
.github/workflows/unit_tests.yml (2)

44-47: Intentional drop of Python version matrix?
Ensure that switching to a fixed Python 3.11 build fits the project's supported runtime policy. Confirm whether multi-version testing is no longer required or if documentation and compatibility guarantees should be updated accordingly.


44-47: Streamlined CI with single runtime
Locking CI to Python 3.11 reduces complexity and speeds up feedback loops, which aligns with the refactor removing legacy plugins.

requirements/skills-gui.txt (1)

1-1: Upgrade ovos-skill-homescreen minimum version
Bumped the minimum required version to >=3.0.3 to stay in sync with other skill packages.

requirements/skills-desktop.txt (1)

2-2: Bump ovos-skill-application-launcher to 0.5.14
Updated the minimum version to ensure compatibility with the refactored intent service infrastructure.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~2-~2: A comma might be missing here.
Context: ...kill-application-launcher>=0.5.14,<1.0.0 ovos-skill-wallpapers>=1.0.2,<3.0.0 ovos...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)

requirements/skills-en.txt (2)

3-3: Add translation placeholder comment
This clearly marks which skills need translation before moving to skill-extras.txt.


4-4: Include ovos-skill-days-in-history
Added the skill with version constraint >=0.3.11,<1.0.0, matching its removal from skills-extra.txt.

requirements/skills-audio.txt (1)

6-7: Update ovos-skill-volume and ovos-skill-naptime versions
Bumped to newer minimum versions (>=0.1.16 and >=0.3.15) as part of the coordinated skill dependency upgrades.

requirements/skills-essential.txt (2)

2-2: Upgrade ovos-skill-fallback-unknown minimum version
Bumped from >=0.1.5 to >=0.1.9 to align fallback behavior with core updates.


4-5: Bump ovos-skill-personal and ovos-skill-date-time versions
Updated to >=0.1.19 and >=1.1.3,<2.0.0 respectively for compatibility with the new IntentService implementation.

requirements/requirements.txt (2)

8-8: Verify ovos-plugin-manager major version bump
The bump to >=1.0.3,<2.0.0 from pre-1.0 may introduce breaking changes. Confirm compatibility with existing plugin integrations and update integration tests accordingly.


10-10: Confirm ovos-workshop update aligns with refactored pipeline plugins
Upgrading to >=7.0.2,<8.0.0 is consistent with the new intent service architecture, but ensure no deprecated workshop APIs are still referenced.

requirements/skills-media.txt (1)

3-6: Validate media skill version bumps
Ensure that raising the minimum versions for ovos-skill-news, ovos-skill-pyradios, ovos-skill-local-media, and ovos-skill-youtube-music does not drop any required features or introduce new dependency conflicts. Run media skill test suites to catch regressions.

requirements/skills-internet.txt (1)

2-7: Validate internet skill upgrades
The new minimum versions for weather, DDG, Wolfie, Wikipedia, WikiHow, and Speedtest skills may include API changes or added dependencies. Verify functionality—especially offline fallback behavior—and update tests as needed.

requirements/skills-extra.txt (2)

2-2: Review ovos-skill-wordnet bump
Updating to >=0.2.5 could introduce changes in dependencies or behavior; ensure it remains compatible with other NLP components in the pipeline.


5-10: Confirm removal of ovos-skill-days-in-history and other bumps
It appears ovos-skill-days-in-history was removed—ensure no residual references exist in docs or code. Also validate the bumped versions for number-facts, ISS-location, cmd, moviemaster, confucius-quotes, and icanhazdadjokes for backward compatibility.

requirements/mycroft.txt (1)

7-7: Verify ovos-dinkum-listener bump
Upgrading to >=0.4.1,<1.0.0 may include API changes; run listener integration tests to detect any breaking changes.

ovos_core/intent_services/fallback_service.py (1)

160-168: Clean implementation of the new IntentHandlerMatch return.

The return statement correctly constructs an IntentHandlerMatch object with all necessary fields, properly aligning with the new pipeline architecture.

requirements/tests.txt (1)

8-8: Dependency update looks good.

The ovoscope version update from 0.3.0 to 0.4.0 aligns with the broader refactoring efforts in this PR.

requirements/lgpl.txt (1)

1-2: Dependency updates and formatting improvements.

The ovos_padatious version bump and fann2 formatting cleanup are appropriate changes that support the broader refactoring effort.

setup.py (1)

102-103: New standalone intent service entry point.

The addition of the ovos-intent-service console script enables launching the refactored intent service independently, supporting the new modular architecture.

test/unittests/test_skill_manager.py (2)

92-94: LGTM! Attribute rename aligns with skill manager refactoring.

The update from skill_loaders to plugin_skills correctly reflects the removal of legacy skill loading mechanisms and standardization on plugin-based skills only.


156-158: Consistent test updates for the new skill management architecture.

All test methods have been properly updated to use plugin_skills instead of the deprecated skill_loaders attribute, maintaining test functionality while aligning with the refactored skill manager.

Also applies to: 172-173

ovos_core/intent_services/__init__.py (1)

1-1: LGTM! Successful modularization of IntentService.

This refactoring centralizes the IntentService implementation in a dedicated module while maintaining the public API. The static analysis warning about the unused import is a false positive - this is a valid re-export pattern that allows consumers to import IntentService from ovos_core.intent_services while the implementation lives in the service module.

🧰 Tools
🪛 Ruff (0.11.9)

1-1: ovos_core.intent_services.service.IntentService imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

ovos_core/transformers.py (2)

1-1: Approve type system simplification.

Removing the Union import and PipelineMatch import correctly reflects the standardization on IntentHandlerMatch objects across the intent service ecosystem.

Also applies to: 7-7


206-206: LGTM! Method signature standardization.

The transform method now exclusively accepts IntentHandlerMatch objects, aligning with the broader refactoring where pipeline plugins have been standardized to return this unified match type.

test/end2end/test_no_skills.py (2)

11-18: Excellent test infrastructure improvements.

The addition of setUp and tearDown methods with shared minicroft instance reuse follows best practices for test performance optimization while maintaining proper cleanup. The pattern is consistent with other end-to-end test files.


25-25: Proper utilization of shared test instance.

Both test methods correctly use the shared minicroft instance, improving test execution speed while maintaining isolation through proper setup/teardown.

Also applies to: 48-48

requirements/plugins.txt (3)

5-5: Version bump for utterance normalizer.

The update from >=0.2.1 to >=0.2.2 likely includes bug fixes or improvements needed by the refactored intent service.


9-16: Well-organized pipeline plugins section.

The new pipeline plugins section provides clear categorization and includes all the necessary plugins for the refactored intent service architecture. Version constraints are appropriately maintained.


17-19: Good addition of intent transformer plugins section.

The new intent transformer plugins section supports the enhanced transformer functionality in the refactored intent service, providing proper categorization for these specialized plugins.

🧰 Tools
🪛 LanguageTool

[locale-violation] ~18-~18: “template” é um estrangeirismo. É preferível dizer “modelo”.
Context: ...0 # intent transformer plugins keyword-template-matcher>=0.0.1,<1.0.0 ahocorasick-ner>=...

(PT_BARBARISMS_REPLACE_TEMPLATE)

ovos_core/intent_services/converse_service.py (1)

266-333: Well-structured match method implementation.

The refactored match method properly handles both get_response and converse modes, with clear separation of concerns and appropriate use of the new IntentHandlerMatch return type.

ovos_core/intent_services/stop_service.py (1)

198-213: Verify the intentional use of fixed skill_id for all stop matches.

The skill_id in IntentHandlerMatch is always set to "stop.openvoiceos" even when stopping specific skills. The actual skill being stopped is only reflected in the match_type. Is this intentional?

Please confirm if this design is intentional. If not, consider using the actual skill_id being stopped:

 return IntentHandlerMatch(
     match_type=f"{skill_id}.stop",
     match_data={"conf": conf},
     updated_session=sess,
     utterance=utterance,
-    skill_id="stop.openvoiceos"
+    skill_id=skill_id
 )

Also applies to: 295-301, 305-310

@github-actions github-actions bot added breaking breaks backwards compatibility (kinda) and removed feature breaking breaks backwards compatibility (kinda) labels Jun 10, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (5)
ovos_core/intent_services/service.py (5)

478-478: Replace bare except with specific exception handling.

🧰 Tools
🪛 Ruff (0.11.9)

478-478: Do not use bare except

(E722)


590-597: Improve exception handling in shutdown method.


155-155: Improve variable naming for clarity.

🧰 Tools
🪛 Ruff (0.11.9)

155-155: Ambiguous variable name: l

(E741)


162-167: Remove unnecessary else clause after return.

🧰 Tools
🪛 Pylint (3.3.7)

[refactor] 162-167: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it

(R1705)


407-496: Fix inconsistent return statements in handle_utterance.

🧰 Tools
🪛 Ruff (0.11.9)

462-462: Ambiguous variable name: l

(E741)


478-478: Do not use bare except

(E722)

🪛 Pylint (3.3.7)

[refactor] 407-407: Either all return statements in a function should return an expression, or none of them should.

(R1710)

🧹 Nitpick comments (3)
ovos_core/skill_manager.py (1)

456-456: Remove extraneous f-prefix from string literal.

The string literal doesn't contain any placeholders, so the f-prefix is unnecessary.

-                    LOG.debug(f"pipelines trained and ready to go")
+                    LOG.debug("pipelines trained and ready to go")
🧰 Tools
🪛 Ruff (0.11.9)

456-456: f-string without any placeholders

Remove extraneous f prefix

(F541)

ovos_core/intent_services/fallback_service.py (2)

76-81: Combine conditional branches for better readability.

The if-elif structure can be simplified by combining the conditions with logical operators.

-        if opmode == FallbackMode.BLACKLIST and skill_id in \
-                self.config.get("fallback_blacklist", []):
-            return False
-        elif opmode == FallbackMode.WHITELIST and skill_id not in \
-                self.config.get("fallback_whitelist", []):
-            return False
+        if ((opmode == FallbackMode.BLACKLIST and skill_id in self.config.get("fallback_blacklist", [])) or
+            (opmode == FallbackMode.WHITELIST and skill_id not in self.config.get("fallback_whitelist", []))):
+            return False
🧰 Tools
🪛 Ruff (0.11.9)

76-81: Combine if branches using logical or operator

Combine if branches

(SIM114)

🪛 Pylint (3.3.7)

[refactor] 76-81: Unnecessary "elif" after "return", remove the leading "el" from "elif"

(R1705)


157-157: Rename unused loop variable for clarity.

The prio variable is not used within the loop body.

-        for skill_id, prio in sorted_handlers:
+        for skill_id, _prio in sorted_handlers:
🧰 Tools
🪛 Ruff (0.11.9)

157-157: Loop control variable prio not used within loop body

Rename unused prio to _prio

(B007)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4b52970 and 433fc05.

📒 Files selected for processing (5)
  • ovos_core/intent_services/converse_service.py (5 hunks)
  • ovos_core/intent_services/fallback_service.py (5 hunks)
  • ovos_core/intent_services/service.py (1 hunks)
  • ovos_core/intent_services/stop_service.py (8 hunks)
  • ovos_core/skill_manager.py (10 hunks)
🧰 Additional context used
🪛 Ruff (0.11.9)
ovos_core/skill_manager.py

456-456: f-string without any placeholders

Remove extraneous f prefix

(F541)

ovos_core/intent_services/fallback_service.py

76-81: Combine if branches using logical or operator

Combine if branches

(SIM114)


157-157: Loop control variable prio not used within loop body

Rename unused prio to _prio

(B007)

ovos_core/intent_services/service.py

155-155: Ambiguous variable name: l

(E741)


462-462: Ambiguous variable name: l

(E741)


478-478: Do not use bare except

(E722)

🪛 Pylint (3.3.7)
ovos_core/intent_services/fallback_service.py

[refactor] 76-81: Unnecessary "elif" after "return", remove the leading "el" from "elif"

(R1705)

ovos_core/intent_services/service.py

[refactor] 59-59: Too many instance attributes (8/7)

(R0902)


[refactor] 66-66: Too many arguments (9/5)

(R0913)


[refactor] 66-66: Too many positional arguments (9/5)

(R0917)


[refactor] 162-167: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it

(R1705)


[refactor] 407-407: Either all return statements in a function should return an expression, or none of them should.

(R1710)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: unit_tests
  • GitHub Check: license_tests
  • GitHub Check: build_tests (3.11)
🔇 Additional comments (10)
ovos_core/skill_manager.py (2)

346-356: LGTM! Loop-based implementation resolves the stack overflow risk.

The recursive implementation has been successfully replaced with a loop that prevents potential stack overflow issues while waiting for the intent service. The addition of proper timeout handling and error checking improves robustness.


278-288: Verify plugin skills management approach.

The refactoring to use plugin_skills instead of skill_loaders looks clean and consistent. The logic properly checks for existing skills before loading new ones.

ovos_core/intent_services/fallback_service.py (1)

85-91: LGTM! Mutable default argument issue resolved.

The mutable default argument has been properly fixed by using Optional[FallbackRange] = None and initializing inside the function. This prevents potential issues with shared mutable state.

ovos_core/intent_services/service.py (1)

66-128: LGTM! Well-structured initialization and plugin loading.

The IntentService initialization is well-designed with proper status management, plugin loading, and event handler registration. The pipeline plugin loading with error handling is robust.

🧰 Tools
🪛 Pylint (3.3.7)

[refactor] 66-66: Too many arguments (9/5)

(R0913)


[refactor] 66-66: Too many positional arguments (9/5)

(R0917)

ovos_core/intent_services/stop_service.py (3)

25-28: LGTM! Constructor follows new pipeline pattern.

The constructor properly initializes with optional bus and config parameters, following the consistent pattern established across the refactored intent services.


137-150: LGTM! Good asynchronous event handling design.

The new handle_stop_confirmation method provides clean asynchronous handling of stop responses, replacing synchronous waiting patterns. The error handling and event emission logic is well-structured.


151-214: LGTM! Properly implemented pipeline matcher interface.

The renamed methods (match_high, match_medium, match_low) correctly implement the ConfidenceMatcherPipeline interface and return IntentHandlerMatch objects with appropriate metadata.

ovos_core/intent_services/converse_service.py (3)

247-247: LGTM! Message data modification issue resolved.

The message data is now properly copied using the spread operator {**message.data, "skill_id": skill_id} instead of modifying the original data in place, preventing potential side effects.


264-331: LGTM! Well-implemented state-aware converse matching.

The new match method properly handles different utterance states (RESPONSE vs INTENT), provides better skill filtering, and returns appropriate IntentHandlerMatch objects. The separation of get_response handling from regular converse logic is a good design improvement.


21-24: LGTM! Constructor follows consistent pattern.

The constructor properly adopts the new optional parameter pattern consistent with other refactored intent services.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
test/end2end/test_converse.py (1)

34-95: Expected message sequences are comprehensive but potentially brittle

The detailed expected message flows provide excellent test coverage but may be fragile if message formats change. Consider if some assertions could be more flexible while maintaining test value.

For maintainability, consider extracting common message patterns or using partial message matching for non-critical fields:

# Example: Create helper methods for common message patterns
def _create_activation_message(self, skill_id):
    return Message(f"{skill_id}.activate",
                  data={},
                  context={"skill_id": skill_id})

def _create_handler_start_message(self, skill_id, handler_name):
    return Message("mycroft.skill.handler.start",
                  data={"name": handler_name},
                  context={"skill_id": skill_id})
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 433fc05 and 0fdaca0.

📒 Files selected for processing (4)
  • requirements/skills-audio.txt (1 hunks)
  • requirements/skills-essential.txt (1 hunks)
  • requirements/tests.txt (1 hunks)
  • test/end2end/test_converse.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • requirements/tests.txt
  • requirements/skills-essential.txt
  • requirements/skills-audio.txt
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: unit_tests
  • GitHub Check: build_tests (3.10)
🔇 Additional comments (4)
test/end2end/test_converse.py (4)

1-8: LGTM - Clean imports and dependencies

The imports are well-organized and appropriate for an end-to-end test, using the correct testing framework and message handling utilities.


12-21: Consider test isolation concerns

The setup comment mentions potential state issues when reusing minicroft instances. While this optimizes test speed, it could lead to test flakiness if the parrot skill maintains internal state between test runs.

Consider adding state cleanup between tests or documenting the state management expectations for the parrot skill:

 def setUp(self):
     LOG.set_level("DEBUG")
     self.skill_id = "ovos-skill-parrot.openvoiceos"
     self.minicroft = get_minicroft([self.skill_id])  # reuse for speed, but beware if skills keeping internal state
+    # TODO: Add skill state reset if needed to ensure test isolation

97-109: Test configuration looks comprehensive

The End2EndTest configuration properly handles message flow verification with appropriate flip points and activation tracking. The timeout of 10 seconds should be sufficient for most scenarios.


22-33:

Details

✅ Verification successful

Verify pipeline plugin availability

The session configuration specifies pipeline plugins that need to be available in the test environment. Ensure these plugins exist and are properly configured.


🏁 Script executed:

#!/bin/bash
# Description: Verify that the specified pipeline plugins are available in the codebase
# Expected: Find configuration or implementation files for both plugins

echo "Searching for ovos-converse-pipeline-plugin..."
rg -i "ovos-converse-pipeline" --type py

echo "Searching for ovos-padatious-pipeline-plugin-high..."
rg -i "ovos-padatious-pipeline.*high" --type py

Length of output: 1269


Pipeline plugin availability confirmed

Both ovos-converse-pipeline-plugin and ovos-padatious-pipeline-plugin-high are present in setup.py and registered in ovos_core/intent_services/service.py. No further action required.

@github-actions github-actions bot added breaking breaks backwards compatibility (kinda) and removed breaking breaks backwards compatibility (kinda) labels Jun 10, 2025
@JarbasAl JarbasAl merged commit 62024db into dev Jun 10, 2025
4 of 5 checks passed
@JarbasAl JarbasAl deleted the drop_old_pipelines branch June 10, 2025 02:51
@coderabbitai coderabbitai bot mentioned this pull request Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking breaks backwards compatibility (kinda) feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants