Commit Graph
3 Commits
Author SHA1 Message Date
Louis King 81dcd3dead Remove SQLite support; PostgreSQL is now the only database backend 2026-08-30 10:19:12 +01:00
Louis King b23e7bcf15 fix: silent config drops, metrics event-loop stall, and route/decoder bugs
- api CLI single-process path now passes spam_detection_enabled /
  spam_score_threshold to create_app() so the messages hide-filter
  actually runs in the default (Docker) deployment
- OIDC role names (oidc_role_admin/operator/member/test) moved from
  WebSettings to CommonSettings and wired onto API app.state; the API
  tier previously matched hardcoded role names, ignoring customized
  OIDC_ROLE_* config in authz, channel visibility, and tag/adoption
  checks (oidc_roles_claim stays web-only)
- /metrics handler is now sync def so collection runs in the
  threadpool instead of blocking the event loop; hoisted fragile
  in-loop imports
- evaluate_route_history gates max_path_length on the packet's true
  hop count (RawPacket.path_len) instead of the prefix-filtered hop
  list, so history day buckets agree with snapshot evaluation
- reload_keys clears the decode cache: negatively-cached packets for
  a newly added channel key were permanently dropped by the normalizer

Also documents 'sudo npx playwright install-deps chromium' in the
AGENTS.md e2e setup.
2026-08-29 22:08:25 +01:00
Louis KingandClaude Opus 4.8 ce4f0da205 test(api): cover --workers CLI branch and factory metrics path
Raise diff coverage above target by exercising the previously untested
lines:

- test_cli.py: invoke the `api` command with uvicorn.run mocked to assert
  the default path passes the app object (no workers/factory) and that
  --workers / API_WORKERS launches the env factory by import string with
  the requested worker count and factory=True.
- test_app_factory.py: add METRICS_ENABLED true/false cases that toggle
  the /metrics route, covering the env-bool parsing branch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 12:17:40 +01:00