Story: Fix telegram plugin call_extension API mismatch #104

Closed
opened 2026-02-26 14:48:56 +00:00 by doxios · 0 comments
Collaborator

Epic: #101

Description

The telegram plugin's _call_extension method (line 582) calls self._registry.call_extension(point, ctx), but PluginRegistry no longer has a call_extension method. This was moved to BasePlugin.call_extension() (async, line 125 of base.py).

This causes an AttributeError crash in the telegram poll loop at runtime.

Root Cause

API refactoring moved call_extension from PluginRegistry to BasePlugin but the telegram plugin was not updated.

Fix Options

  1. Async route (proper): Make _call_extension async, use await self.call_extension(point, ctx) from BasePlugin, propagate async to callers
  2. Quick fix (minimal): Remove the self._registry.call_extension() call since the local handler loop already works

Recommend option 1 for long-term alignment.

Acceptance Criteria

  • Telegram plugin's _call_extension uses BasePlugin.call_extension() (not registry directly)
  • Telegram poll loop no longer crashes with AttributeError
  • Extension point handlers still fire correctly
  • Existing telegram tests pass (after Story #2 fixes collection)
  • ruff check cobot/ passes
**Epic:** #101 ## Description The telegram plugin's `_call_extension` method (line 582) calls `self._registry.call_extension(point, ctx)`, but `PluginRegistry` no longer has a `call_extension` method. This was moved to `BasePlugin.call_extension()` (async, line 125 of base.py). This causes an `AttributeError` crash in the telegram poll loop at runtime. ### Root Cause API refactoring moved `call_extension` from `PluginRegistry` to `BasePlugin` but the telegram plugin was not updated. ### Fix Options 1. **Async route (proper):** Make `_call_extension` async, use `await self.call_extension(point, ctx)` from BasePlugin, propagate async to callers 2. **Quick fix (minimal):** Remove the `self._registry.call_extension()` call since the local handler loop already works Recommend option 1 for long-term alignment. ## Acceptance Criteria - [ ] Telegram plugin's `_call_extension` uses `BasePlugin.call_extension()` (not registry directly) - [ ] Telegram poll loop no longer crashes with `AttributeError` - [ ] Extension point handlers still fire correctly - [ ] Existing telegram tests pass (after Story #2 fixes collection) - [ ] `ruff check cobot/` passes
k9ert closed this issue 2026-02-26 15:51:42 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ultanio/cobot#104
No description provided.