Conversation
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>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greetings! The CI pipeline has delivered its findings. 🏗️I've aggregated the results of the automated checks for this PR below. 🔍 LintEnsuring your contribution is moving forward. 🚀 ❌ ruff: issues found — see job log ⚖️ License CheckReading 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 HealthEnsuring the repository remains in peak condition. 🏔️ ✅ All required files present. Latest Version: ✅ 📡 Channel Compat — stableThe 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 🔒 Security (pip-audit)Scanning for any potential privilege escalations. 🪜 ✅ No known vulnerabilities found (72 packages scanned). 📡 Channel Compat — testingI've finished the heavy lifting on this check. 🏋️♂️ ✅ Test suite passes on the Constraints: https://raw.githubusercontent.com/OpenVoiceOS/OpenVoiceOS/main/constraints-testing.txt 🔨 Build TestsI've laid the bricks for your new logic. 🧱 ✅ All versions pass
Transmitted from the OVOS mothership. 🛸 |
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 ofovos_utils.ocp's OCP dataclasses, only exercised when an oldovos-utilsis installed),ovos_workshop/skills/layers.py(a one-line deprecated re-export ofIntentLayers, which already lives atovos_workshop.decorators.layers), andovos_workshop/skills/intent_provider.py(the oldBaseIntentEngine/IntentEngineSkillbase 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: theset_adapt_context/remove_adapt_context/detach_intent/get_intent_namesmethods on bothIntentServiceInterfaceand its internal_AdaptIntentApiwere pure deprecated aliases — every one of them just re-dispatched to a real method (set_context/remove_context/remove_intent/intent_names) after logging aDeprecationWarning, and nothing in the package's own registration paths called them;OVOSSkilland the spec-native producer already go through the internal_adapt/_set_context/_remove_contexthelpers 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_intentandregister_padatious_entitywere investigated but left untouched. They carry the same_legacy_warntreatment 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) andregister_adapt_regexis called directly fromOVOSSkill.load_regex_files/register_regexin production. Deleting them means either dropping that regression coverage or rewriting each call site to go throughregister_keyword/register_intent/register_template/register_entitydirectly — a deliberate migration, not a mechanical strip, so it is left for the owner to call.Removals
ovos_workshop/backwards_compat.pyovos_utils.ocp(direct import; this was only the fallback path)ovos_workshop/skills/layers.pyovos_workshop.decorators.layers.IntentLayersovos_workshop/skills/intent_provider.py(BaseIntentEngine,IntentEngineSkill)_AdaptIntentApi/IntentServiceInterface:set_adapt_context,remove_adapt_context,detach_intent,get_intent_namesset_context/remove_context,remove_intent,intent_namespropertytest_intent4_producer.pyTotal 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 toregister_keyword/register_intent/register_template/register_entitydirectly.IntentServiceInterface.register_adapt_regexandOVOSSkill.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 inovos-utils): the code's own comment says theovos_spec_toolsreplacement 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 ofovos_config.read_mycroft_config/update_mycroft_config(deprecated in favor ofConfiguration()): small, but touches config write semantics and wasn't in scope for this pass.mycroft.*bus topics throughoutovos.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.{self.skill_id}.converse.ping/.converse.requesthandlers inconverse.pycoexist 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_workshopimports 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: theintents.pyhunk was reverted in isolation and re-run againstgit show :ovos_workshop/intents.py(unfixed source) confirmedget_intent_names/set_adapt_context/detach_intentstill exist and still raiseDeprecationWarning, then the removal was re-applied.