Lightweight containerized prosody tooling + moved auth scripts + xmpp reconnect/auth stabilization

This commit is contained in:
2026-03-05 02:18:12 +00:00
parent 0718a06c19
commit 2140c5facf
69 changed files with 3767 additions and 144 deletions

View File

@@ -0,0 +1,39 @@
from __future__ import annotations
from pathlib import Path
from django.test import SimpleTestCase
class AdapterBoundaryRulesTests(SimpleTestCase):
def test_client_adapters_do_not_import_business_engines(self):
clients_dir = Path(__file__).resolve().parents[1] / "clients"
banned_prefixes = (
"from core.commands",
"import core.commands",
"from core.tasks",
"import core.tasks",
"from core.assist",
"import core.assist",
"from core.translation",
"import core.translation",
)
violations = []
for file_path in sorted(clients_dir.glob("*.py")):
if file_path.name == "__init__.py":
continue
content = file_path.read_text(encoding="utf-8")
for line_no, line in enumerate(content.splitlines(), start=1):
stripped = line.strip()
if any(stripped.startswith(prefix) for prefix in banned_prefixes):
violations.append(f"{file_path.name}:{line_no}: {stripped}")
self.assertEqual(
[],
violations,
msg=(
"Adapter modules must stay translator-only and must not import "
"business policy/task/assist/translation engines directly."
),
)