ADR-008: Remove Compat Shim Layer
Status: Implemented Date: 2026-05-20 Updated: 2026-07-14 Deciders: Project team
Context
micboard/manufacturers/ is a backward-compatibility shim layer. Its __init__.py (93 lines) dynamically mirrors micboard.integrations.* modules into sys.modules under the old micboard.manufacturers namespace.
The directory contains:
__init__.py— module loader that patches sys.modulesbase.py(98 lines) — abstract base classes (BaseAPIClient,BasePlugin,ManufacturerPlugin)
The actual plugin implementations live in micboard/integrations/shure/ and micboard/integrations/sennheiser/. The shim exists so that legacy import paths like from micboard.manufacturers.shure import ... continue to work.
Maintaining this shim:
- Creates confusion about the canonical import path.
- Uses dynamic sys.modules manipulation, which is fragile and hard to debug.
- Duplicates class definitions now owned by
micboard/services/common/base/. - Adds a maintenance burden for zero functional value.
Decision
- Remove
micboard/manufacturers/entirely in a single PR. - Update all import references from
micboard.manufacturers.*tomicboard.integrations.*. - Use the canonical contracts in
micboard/services/common/base/; do not create another shared hierarchy or compatibility export undermicboard/integrations/. - Remove all sys.modules patching logic from the shim
__init__.py.
Consequences
- Positive: One fewer layer of indirection. Manufacturer implementations live under
integrations/, while shared contracts have one source of truth underservices/common/base/. About 100 lines of dead code were removed. - Negative: Every file importing from
micboard.manufacturersmust be updated (estimate: 15-25 import sites). This must be coordinated to avoid breaking CI mid-migration. - Migration: Single PR. No deprecation window — the shim has existed long enough that any actively maintained code paths should already be migrated. Verify by grepping for
micboard.manufacturersacross the entire repo.
Compliance
- CI will fail if any file imports from
micboard.manufacturers. - Package initializers do not re-export plugin contracts or implementations.
