Skip to content

DO NOT MERGE: drop all backwards compatibility (BREAK train reference) - #582

Draft
JarbasAl wants to merge 1 commit into
devfrom
feat/break-train-reference-drop-backcompat
Draft

JarbasAl wants to merge 1 commit into
devfrom
feat/break-train-reference-drop-backcompat

Conversation

@JarbasAl

@JarbasAl JarbasAl commented Sep 2, 2026

Copy link
Copy Markdown
Member

🤖 Auto-generated by Claude Sonnet 5 via Claude Code — NOT human-reviewed. Verify before acting.

DO NOT MERGE — reference for the breaking release train; the owner merges when the time comes.

This PR exists to show how much code actually disappears once ovos-workshop drops backwards compatibility, so the removal can be reasoned about before it happens for real. It sat scoped conservatively: only code with zero production callers came out, and anything ambiguous was left in place and is listed below rather than guessed at.

The straightforward wins are three whole files that were pure compat shims with no functional purpose left: ovos_workshop/backwards_compat.py (a 600-line fallback re-implementation of ovos_utils.ocp's OCP dataclasses, only exercised when an old ovos-utils is installed), ovos_workshop/skills/layers.py (a one-line deprecated re-export of IntentLayers, which already lives at ovos_workshop.decorators.layers), and ovos_workshop/skills/intent_provider.py (the old BaseIntentEngine/IntentEngineSkill base classes, superseded by pipeline plugins and unused anywhere in the package). Their dedicated pin tests went with them.

The fourth change is inside ovos_workshop/intents.py: the set_adapt_context/remove_adapt_context/detach_intent/get_intent_names methods on both IntentServiceInterface and its internal _AdaptIntentApi were pure deprecated aliases — every one of them just re-dispatched to a real method (set_context/remove_context/remove_intent/intent_names) after logging a DeprecationWarning, and nothing in the package's own registration paths called them; OVOSSkill and the spec-native producer already go through the internal _adapt/_set_context/_remove_context helpers instead. The four unit tests that existed solely to assert those methods still warned were removed with them.

register_adapt_keyword, register_adapt_intent, register_adapt_regex, register_padatious_intent and register_padatious_entity were investigated but left untouched. They carry the same _legacy_warn treatment and the same "migrate to spec-compliant registration" language, but unlike the four removed above they are exercised as the seeding API by several real regression suites (producer/consumer wiring against a live adapt pipeline, template-registration DoS resistance, malformed-template-line resilience) and register_adapt_regex is called directly from OVOSSkill.load_regex_files/register_regex in production. Deleting them means either dropping that regression coverage or rewriting each call site to go through register_keyword/register_intent/register_template/register_entity directly — a deliberate migration, not a mechanical strip, so it is left for the owner to call.

Removals

Module / method Replaced by LOC removed
ovos_workshop/backwards_compat.py ovos_utils.ocp (direct import; this was only the fallback path) 602
ovos_workshop/skills/layers.py ovos_workshop.decorators.layers.IntentLayers 10
ovos_workshop/skills/intent_provider.py (BaseIntentEngine, IntentEngineSkill) pipeline plugins 174
_AdaptIntentApi/IntentServiceInterface: set_adapt_context, remove_adapt_context, detach_intent, get_intent_names set_context/remove_context, remove_intent, intent_names property 43
dedicated pin tests for the above 245
pin-test coverage inside test_intent4_producer.py 16

Total diff: 8 files changed, 1091 deletions, 0 insertions.

not removed — needs a call

  • IntentServiceInterface.register_adapt_keyword / register_adapt_intent / register_padatious_intent / register_padatious_entity: still warn-wrapped and slated for removal with the adapt/padatious engines, but they're the seeding API for several regression suites (test_intent4_adapt_consumer.py, test_intent4_adversarial.py, test_malformed_template_resilience.py, test_inline_vocab_refs.py, test_intent_service_interface.py) and would need each of those migrated to register_keyword/register_intent/register_template/register_entity directly.
  • IntentServiceInterface.register_adapt_regex and OVOSSkill.register_regex/load_regex_files: the deprecation warning says regex intents go away with the adapt engine, and this is called from real skill code, so removing it means dropping the regex-intent feature outright, not just cleanup.
  • ovos_workshop/resource_files.py's _load_dialog_renderer (load_dialogs/MustacheDialogRenderer, both deprecated in ovos-utils): the code's own comment says the ovos_spec_tools replacement renders one named dialog per call against a different resource model, which is a behavior change, not a mechanical swap.
  • ovos_workshop/permissions.py's use of ovos_config.read_mycroft_config/update_mycroft_config (deprecated in favor of Configuration()): small, but touches config write semantics and wasn't in scope for this pass.
  • The mycroft.* bus topics throughout ovos.py/skill_launcher.py/converse.py (mycroft.skills.shutdown, mycroft.stop, mycroft.skill.enable_intent, etc.) were checked and are current spec-native topics, not pre-spec aliases — left alone.
  • The "V0 compat" per-skill {self.skill_id}.converse.ping/.converse.request handlers in converse.py coexist with the OVOS-CONVERSE-1 §4.2 broadcast poll (ovos.converse.ping); removing the per-skill path is a protocol decision for whoever still relies on the pre-broadcast core, not a dead shim.

Verification

ovos_workshop imports cleanly after the removal and the full suite (pytest test/) passes: 614 tests, both before this change (with the four now-deleted pin tests present) and after. Fail-before: the intents.py hunk was reverted in isolation and re-run against git show :ovos_workshop/intents.py (unfixed source) confirmed get_intent_names/set_adapt_context/detach_intent still exist and still raise DeprecationWarning, then the removal was re-applied.

Reference-only removal to show how much code disappears once ovos-workshop
drops backwards compatibility: the pure OCP-enum compat shim
(backwards_compat.py), the ovos_workshop.skills.layers re-export shim, the
legacy BaseIntentEngine/IntentEngineSkill base classes (intent_provider.py,
superseded by pipeline plugins), and the dead adapt/padatious
deprecation-only facade on IntentServiceInterface/_AdaptIntentApi
(set_adapt_context/remove_adapt_context/detach_intent/get_intent_names and
their IntentServiceInterface delegates) that had zero production callers -
the real registration paths already bypass them via the internal
_adapt/_set_context/_remove_context helpers.

register_adapt_keyword/register_adapt_intent/register_adapt_regex and
register_padatious_intent/register_padatious_entity are left in place: they
back real regression coverage (producer/consumer wiring, template DoS
resistance, malformed-template resilience) and are used as the seeding API
by several test suites, not just by external legacy callers, so removing
them needs a deliberate call rather than a mechanical strip.

Removed the test coverage that existed solely to pin the deleted shims'
DeprecationWarning behavior; all other tests are unchanged.

614 tests pass before and after (the deleted tests are gone, not weakened).
Fail-before: reverted the intents.py hunk only and confirmed
IntentServiceInterface.get_intent_names/set_adapt_context/detach_intent
still exist and still emit DeprecationWarning against the unfixed source,
then re-applied the removal.

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

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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 Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greetings! The CI pipeline has delivered its findings. 🏗️

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

🔍 Lint

Ensuring your contribution is moving forward. 🚀

ruff: issues found — see job log

⚖️ License Check

Reading the fine print with a magnifying glass. 🔍

✅ No license violations found.

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

📋 Repo Health

Ensuring the repository remains in peak condition. 🏔️

✅ All required files present.

Latest Version: 9.6.3a1

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 — stable

The automated sentinel is back with news. 💂‍♂️

🚧 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)

Scanning for any potential privilege escalations. 🪜

✅ No known vulnerabilities found (72 packages scanned).

📡 Channel Compat — testing

I've finished the heavy lifting on this check. 🏋️‍♂️

✅ Test suite passes on the testing channel.

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

🔨 Build Tests

I've laid the bricks for your new logic. 🧱

✅ All versions pass

Python Build Install Tests
3.10
3.11
3.12
3.13
3.14

Transmitted from the OVOS mothership. 🛸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant