You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
consolidation(extensions): collapse the duplicate extensions/ package into middleware/ and remove it #9794
PR #9787 shimmed the 3 duplicate builtin/ extensions, but the top-levelextensions/ package is still a near-verbatim duplicate of middleware/ (renamed in #7426). It is kept alive only by tests — no production code imports the top-level extensions.* (verified: only chat_workflow/*_test.py and transcriber/tests/test_extension.py reference extensions.base/.manager/.hooks).
Duplication evidence (extensions/ vs middleware/)
file
differing lines
size
extension_manifest.py
0 (identical)
8
hooks.py
2
232
base.py
4
556
manager.py
4
404
hook_invoker.py
8
358
Duplicated classes: Extension, HookContext (base.py ×2), ExtensionManager (manager.py ×2), HookPoint (hooks.py), ExtensionManifest. Two parallel class hierarchies coexist; ExtensionManager.register() is duck-typed (name-only) so they don't clash at runtime — masking the duplication.
Proposed work
Repoint the remaining test importers (chat_workflow/prompt_hooks_test.py, wired_hooks_test.py, transcriber/tests/test_extension.py, extensions/extension_hooks_test.py) to middleware.*.
Keep TranscriberExtension (the one genuinely-unique builtin) — migrate it to middleware/builtin/.
Notes
Completes the #7426 rename + #9779/#9786/PR #9787 line of work. Discovered while reviewing PR #9787. The None | None base-class fix already landed on PR #9787's branch.
Bug sweep 2026-06-10 → TOO-BIG (not behavior-preserving). Confirmed the top-level autobot-backend/extensions/ package is still a near-verbatim duplicate of middleware/ (e.g. extensions/base.py is the full Issue #658 implementation, not a re-export shim). Collapsing it requires repointing the remaining test importers (chat_workflow/*_test.py, transcriber/tests/test_extension.py) to middleware.*, replacing the modules with shims, migrating TranscriberExtension to middleware/builtin/, then removing the package — a multi-file consolidation with test churn, not a localized fix. Leaving for a dedicated PR.
Closed — merged to Dev_new_gui. Commit: d211625 (PR #10004). Criteria met: top-level extensions/ package removed (12 pure-shim files verified by diff before deletion); all test importers repointed to middleware.* (151 tests pass); TranscriberExtension already existed identically in middleware/builtin/; CI find-path, telemetry-plugin import, boundary lint tool, semgrep rule and live docs retargeted. Discoveries: none (review findings fixed in-PR). Completes the #7426 rename line of work.
Activity
refactor(dedup): eliminate code duplication via behavior-preserving e…
mrveiss commentedon Jun 10, 2026
Bug sweep 2026-06-10 → TOO-BIG (not behavior-preserving). Confirmed the top-level
autobot-backend/extensions/package is still a near-verbatim duplicate ofmiddleware/(e.g.extensions/base.pyis the full Issue #658 implementation, not a re-export shim). Collapsing it requires repointing the remaining test importers (chat_workflow/*_test.py,transcriber/tests/test_extension.py) tomiddleware.*, replacing the modules with shims, migratingTranscriberExtensiontomiddleware/builtin/, then removing the package — a multi-file consolidation with test churn, not a localized fix. Leaving for a dedicated PR.refactor(extensions): collapse duplicate extensions/ package into mid…
github-actions commentedon Jun 12, 2026
PR #10004 (merged to
Dev_new_gui) references this issue with a close keyword.If this issue is fully resolved, close it manually. If work remains, no action is needed.
mrveiss commentedon Jun 12, 2026
Closed — merged to Dev_new_gui. Commit: d211625 (PR #10004). Criteria met: top-level
extensions/package removed (12 pure-shim files verified by diff before deletion); all test importers repointed tomiddleware.*(151 tests pass);TranscriberExtensionalready existed identically inmiddleware/builtin/; CI find-path, telemetry-plugin import, boundary lint tool, semgrep rule and live docs retargeted. Discoveries: none (review findings fixed in-PR). Completes the #7426 rename line of work.