fix(M5): automation-MiniApp-Registrierung — Legacy-Doppelregistrierung entfernt (#363)
Check Cross-Plugin Imports / check (push) Has been cancelled

- on_activate re-registrierte Manifest-MiniApps OHNE component/permission und
  ueberschrieb die korrekte M1-Registrierung aus super().on_activate()
  (live gemessen: automation_status comp=no/perm=- auf Produktion)
- Regressionstest sichert das Entfernen (test_automation_legacy_reregistration_removed)
- Regression: M5 8/8 + lifecycle + registry 26/26
This commit is contained in:
Agent Zero
2026-08-31 00:15:44 +02:00
parent 7ed5349e86
commit cd34bab3a8
2 changed files with 22 additions and 16 deletions
+18
View File
@@ -84,3 +84,21 @@ class TestPluginMiniAppContributions:
assert any(f["name"] == "max_items" for f in fields), (
f"{app_id}: max_items missing in settings_schema"
)
def test_automation_legacy_reregistration_removed():
"""M5 fix: automation's on_activate used to re-register manifest
miniapps with only a subset of fields AFTER super().on_activate(),
overwriting the correct M1 registration (component/permission lost —
measured live on production 2026-08-30: automation_status comp=no).
The legacy block must stay removed; super() owns the registration.
"""
import inspect
from app.plugins.builtins.automation.plugin import AutomationPlugin
src = inspect.getsource(AutomationPlugin.on_activate)
assert "for miniapp in self.manifest.miniapps" not in src, (
"legacy miniapp re-registration re-introduced"
)
assert "kommunikation.contracts import get_miniapp_registry" not in src