Skip to content

Conversation

@JarbasAl
Copy link
Member

@JarbasAl JarbasAl commented Jun 16, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Improved the shutdown process for plugin skills to ensure more thorough cleanup and better error logging during skill unloading.
  • Chores

    • Updated dependencies to require newer versions of ovos-workshop and ovoscope.

@coderabbitai
Copy link

coderabbitai bot commented Jun 16, 2025

Walkthrough

The changes update the skill shutdown process in the skill manager to attempt a skill-specific shutdown method before the default shutdown, with improved exception handling and logging. Additionally, the minimum required versions for ovos-workshop and ovoscope have been incremented in their respective requirements files.

Changes

File(s) Change Summary
ovos_core/skill_manager.py Enhanced _unload_plugin_skill to call a skill-specific shutdown() with exception handling.
requirements/requirements.txt Increased minimum ovos-workshop version from 7.0.4 to 7.0.5.
requirements/tests.txt Increased minimum ovoscope version from 0.6.0 to 0.7.1.

Sequence Diagram(s)

sequenceDiagram
    participant SkillManager
    participant SkillInstance
    Note over SkillManager: During plugin skill unload
    SkillManager->>SkillInstance: shutdown()
    alt Exception occurs
        SkillManager->>SkillManager: Log "Failed to run skill specific shutdown code"
    end
    SkillManager->>SkillInstance: default_shutdown()
    alt Exception occurs
        SkillManager->>SkillManager: Log "Failed to shutdown skill"
    end
    SkillManager->>SkillManager: Remove skill from plugin_skills
Loading

Poem

A shutdown here, a shutdown there,
With careful logs and gentle care.
Upgrades for tools, so tests run true,
The workshop's fresh, the scope anew.
Rabbits hop with glee tonight—
For code is tidy, safe, and right!
🐇✨


📜 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 ee9a23d and 078d8ca.

📒 Files selected for processing (3)
  • ovos_core/skill_manager.py (1 hunks)
  • requirements/requirements.txt (1 hunks)
  • requirements/tests.txt (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
ovos_core/skill_manager.py (6)
ovos_core/skill_installer.py (1)
  • shutdown (39-43)
ovos_core/intent_services/stop_service.py (1)
  • shutdown (390-392)
ovos_core/intent_services/converse_service.py (1)
  • shutdown (387-393)
ovos_core/transformers.py (3)
  • shutdown (52-57)
  • shutdown (112-117)
  • shutdown (196-204)
ovos_core/intent_services/fallback_service.py (1)
  • shutdown (189-191)
ovos_core/intent_services/service.py (1)
  • shutdown (589-612)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: unit_tests
  • GitHub Check: build_tests (3.11)
🔇 Additional comments (3)
requirements/requirements.txt (1)

10-10: Dependency bump looks safe – verify downstream compatibility.

Raising the lower bound from 7.0.4 to 7.0.5 for ovos-workshop is minor and unlikely to introduce breaking changes, but any optional-pin users (e.g., lockfiles, Docker images) will now be forced to upgrade. Make sure CI runs against the new version and that any features gated behind 7.0.5 are actually required by this PR.

requirements/tests.txt (1)

8-8: Acceptable test-only bump, but pin drift can creep in.

Updating ovoscope to >=0.7.1 is fine for test dependencies. Double-check that the runtime requirements.txt (if any) doesn’t pull in an older version transitively; otherwise pytest may import two different versions.

ovos_core/skill_manager.py (1)

490-498: ```shell
#!/bin/bash
set -eux

echo "Searching for any occurrences of 'default_shutdown' in the repository:"
rg -n default_shutdown || true

echo -e "\nSearching for assignment of default_shutdown to instances:"
rg -n "default_shutdown" -t py || true


</details>

</blockquote></details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEejqANiS7xmvfFMiIA1vAsWnsPLXwB3DAYActjMApRcAOwAjABsBgCqiOGQAFJoFAJoiACCFkb6xuBQZPT4AGY4BMRkyjT0TKzsXLz8wqLiUjLyTEpUqupaOgUmUHCoqJiVhKTkVHUKjRickFS+TiHM6fJyCr0qapraumCGhaYGDviIAPpMFCQA9C5uFtebGGikFBrcshwGACIgQYAMQgyDZACS1Vm1Do61YW34FQYsEwpEQZlgJEgAANrtgMBZ8GhaNduBZsER4Bhrs93LjIGxcLBFJBfFkmYp4GV4PC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CidAyV8MSFcOckCThmQJ3bMDUPGhROyCBk84JD7pag2U5+fACPghL0GExJrL3UuNxgce0K5NyD0vJ60lL5QaAVjagOrKFC2kV4TRW4FVeKtV7bfTSuQF221TgjASqUCodoqjhzmPCBoFcuCrARJsGOOxAJ9AOIMY4hhcFkPUNcBsNx7gSD5A1MkNZypMLOFAVmEQea0B5qmHmPMogMFoAIAAnDzVmrN5EAGYYgRDUWgNAPMygkAiLQVRotWai1vrQUR8jBEGBYSwBejoOHXC4Twug1wShMKAA -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

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.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=OpenVoiceOS/ovos-core&utm_content=716):

- 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](https://www.coderabbit.ai/contact-us/support) 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](https://docs.coderabbit.ai/finishing-touches/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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

@JarbasAl JarbasAl changed the title improve skill shutdown + more tests improve skill shutdown Jun 16, 2025
@github-actions
Copy link

github-actions bot commented Jun 16, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  ovos_core
  __main__.py
  skill_installer.py
  skill_manager.py 492-493, 497
  transformers.py
  version.py
  ovos_core/intent_services
  converse_service.py
  fallback_service.py
  service.py
  stop_service.py
Project Total  

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

@JarbasAl JarbasAl merged commit 5c0f6b1 into dev Jun 17, 2025
5 of 9 checks passed
@JarbasAl JarbasAl deleted the more-tests branch June 17, 2025 00:00
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