Skip to content

fix: harden transformer services per review - #412

Merged
JarbasAl merged 3 commits into
devfrom
fix/transformer-services-review
Jul 15, 2026
Merged

fix: harden transformer services per review#412
JarbasAl merged 3 commits into
devfrom
fix/transformer-services-review

Conversation

@JarbasAl

Copy link
Copy Markdown
Member

Follow-up to #410 addressing the review findings, all verified against current code:

  • No masked constructor errors: plugin construction now inspects the constructor signature for a config kwarg instead of catching TypeError — a TypeError raised inside a config-accepting constructor propagates to the load-error log instead of triggering a silent no-config retry.
  • cancel_by cannot be injected: a plugin-supplied cancel_by outside a valid §8.1 cancellation pair is stripped before the context merge (it is orchestrator-stamped only).
  • Shutdown coverage: shutdown() iterates loaded_plugins, so plugins excluded from an explicit "order" chain still get shut down.
  • Feeder isolation: feed_audio/feed_hotword/feed_speech wrap each plugin call individually — one broken feeder no longer starves the rest.
  • Default-context overlay: AudioTransformersService.transform merges caller context over the default context instead of discarding the defaults when a context is passed.
  • Dialog blacklist enforced in the runner: dialog from a skill_id in blacklisted_skills passes through untransformed.
  • Ruff-clean re-exports: the tts transformer helpers re-exported from dialog_transformers use explicit self-aliases.

Each fix has a dedicated unit test.

🤖 Generated with Claude Code

- plugin construction uses signature inspection instead of a TypeError
  retry, so a TypeError raised inside a config-accepting constructor
  propagates instead of triggering a silent no-config fallback
- a plugin-supplied cancel_by outside a valid cancellation signal is
  stripped before merging into context (orchestrator-stamped only)
- shutdown() iterates all loaded plugins, not just the execution chain,
  so plugins excluded by an explicit 'order' list are still shut down
- feed_audio/feed_hotword/feed_speech isolate per-plugin failures so a
  broken feeder does not starve subsequent plugins
- AudioTransformersService.transform overlays caller context onto the
  default context instead of discarding the defaults
- DialogTransformersService.transform skips dialog from blacklisted
  skills (context skill_id checked against blacklisted_skills)
- explicit re-export aliases for the tts transformer helpers kept in
  dialog_transformers for backwards compatibility

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 15, 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: 54 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: c9e9e839-74a0-4375-b15e-d67e86add13a

📥 Commits

Reviewing files that changed from the base of the PR and between 59bba98 and f9ea737.

📒 Files selected for processing (5)
  • docs/index.md
  • docs/transformers.md
  • ovos_plugin_manager/dialog_transformers.py
  • ovos_plugin_manager/transformer_services.py
  • test/unittests/test_transformer_services.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/transformer-services-review

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 added the fix label Jul 15, 2026
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Checking in! Here's how the automated tests are looking. 🧐

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

🔍 Lint

Checking for any potential issues or concerns. 🔍

ruff: issues found — see job log

📊 Coverage

How well do we know our own code? 🧠

85.2% total coverage

Files below 80% coverage (21 files)
File Coverage Missing lines
ovos_plugin_manager/utils/audio.py 22.5% 69
ovos_plugin_manager/hardware/__init__.py 31.6% 13
ovos_plugin_manager/templates/gui.py 39.0% 25
ovos_plugin_manager/audio.py 40.5% 22
ovos_plugin_manager/templates/language.py 58.0% 21
ovos_plugin_manager/audio2ipa.py 58.1% 13
ovos_plugin_manager/gui.py 62.5% 15
ovos_plugin_manager/postag.py 63.0% 17
ovos_plugin_manager/segmentation.py 63.0% 17
ovos_plugin_manager/tokenization.py 63.0% 17
ovos_plugin_manager/templates/solvers.py 68.5% 82
ovos_plugin_manager/plugin_entry.py 69.1% 46
ovos_plugin_manager/coreference.py 69.2% 16
ovos_plugin_manager/templates/ocp.py 72.2% 5
ovos_plugin_manager/templates/segmentation.py 73.7% 5
ovos_plugin_manager/templates/audio2ipa.py 75.0% 3
ovos_plugin_manager/templates/postag.py 75.0% 5
ovos_plugin_manager/media_provider.py 75.7% 9
ovos_plugin_manager/templates/hotwords.py 77.4% 7
ovos_plugin_manager/persona.py 77.8% 2
ovos_plugin_manager/templates/keywords.py 78.9% 4

Full report: download the coverage-report artifact.

⚖️ License Check

I've checked for any conflicting terms of service. 📜

✅ No license violations found.

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

📋 Repo Health

A routine checkup to keep the repo running smoothly. 🏥

✅ All required files present.

Latest Version: 2.10.0a1

ovos_plugin_manager/version.py — Version file
README.md — README
LICENSE — License file
pyproject.toml — pyproject.toml
⚠️ setup.py — setup.py
CHANGELOG.md — Changelog
ovos_plugin_manager/version.py has valid version block markers

🏷️ Release Preview

Crystal ball analysis: predicting the next version! 🔮

Current: 2.10.0a1Next: 2.10.1a1

Signal Value
Label fix
PR title fix: harden transformer services per review
Bump build

✅ PR title follows conventional commit format.


🚀 Release Channel Compatibility

Predicted next version: 2.10.1a1

Channel Status Note Current Constraint
Stable Too new (must be <0.10.0) ovos-plugin-manager>=0.9.0,<0.10.0
Testing Compatible ovos-plugin-manager>=1.0.3,<3.0.0
Alpha Compatible ovos-plugin-manager>=2.9.0a1

🔨 Build Tests

Construction of your features is officially finished. 🏠

✅ All versions pass

Python Build Install Tests
3.10
3.11
3.12
3.13
3.14

🔒 Security (pip-audit)

I've scanned the dependencies for any hidden surprises. 🔍

✅ No known vulnerabilities found (65 packages scanned).


An automated high-five for your latest changes! 🖐️

JarbasAl and others added 2 commits July 15, 2026 04:33
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ovos-utterance-plugin-cancel (and other pre-OVOS-TRANSFORM plugins)
signal cancellation with 'canceled' alone. The strict §8.1 pair
validation stripped those signals, breaking mid-sentence cancellation
in ovos-core (caught by its ovoscope e2e). Honor 'canceled: true'
without a reason, defaulting cancel_reason to the spec's universal
fallback 'other' and logging a warning nudging plugins to add it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@JarbasAl
JarbasAl marked this pull request as ready for review July 15, 2026 04:29
@JarbasAl
JarbasAl merged commit ce2efcf into dev Jul 15, 2026
13 checks passed
@JarbasAl
JarbasAl deleted the fix/transformer-services-review branch July 15, 2026 04:31
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