[claude] Add sovereignty metrics tracking + dashboard panel (#981) (#1083)

This commit is contained in:
2026-03-23 14:09:03 +00:00
parent fc53a33361
commit 7f875398fc
9 changed files with 636 additions and 1 deletions

View File

@@ -147,10 +147,12 @@ def clean_database(tmp_path):
# IMPORTANT: swarm.task_queue.models also has a DB_PATH that writes to
# tasks.db — it MUST be patched too, or error_capture.capture_error()
# will write test data to the production database.
tmp_sovereignty_db = tmp_path / "sovereignty_metrics.db"
for mod_name, tmp_db in [
("dashboard.routes.tasks", tmp_tasks_db),
("dashboard.routes.work_orders", tmp_work_orders_db),
("swarm.task_queue.models", tmp_tasks_db),
("infrastructure.sovereignty_metrics", tmp_sovereignty_db),
]:
try:
mod = __import__(mod_name, fromlist=["DB_PATH"])