trustgraph/tests/unit/test_concurrency
Cyber MacGeddon 7d230f11fa RabbitMQ fixes: thread safety, subscriber resilience, config errors
Consumer thread safety:
- Dedicated ThreadPoolExecutor per consumer so all pika operations
  (create, receive, acknowledge, negative_acknowledge) run on the
  same thread — pika BlockingConnection is not thread-safe
- Applies to both Consumer and Subscriber classes

Subscriber resilience:
- Move consumer creation from start() into the run() loop so it is
  recreated after connection failures instead of spinning on None

Config handler type audit — fix four mismatched type registrations:
- librarian: was ["librarian"] (non-existent type), now ["flow",
  "active-flow"] (matches config["flow"] that the handler reads)
- cores/service: was ["kg-core"], now ["flow"] (reads
  config["flow"])
- metering/counter: was ["token-costs"], now ["token-cost"]
  (singular)
- agent/mcp_tool: was ["mcp-tool"], now ["mcp"] (reads
  config["mcp"])

Update tests
2026-04-07 14:49:11 +01:00
..
__init__.py Updated test suite for explainability & provenance (#696) 2026-03-13 14:27:42 +00:00
test_consumer_concurrency.py RabbitMQ fixes: thread safety, subscriber resilience, config errors 2026-04-07 14:49:11 +01:00
test_dispatcher_semaphore.py Updated test suite for explainability & provenance (#696) 2026-03-13 14:27:42 +00:00
test_graph_rag_concurrency.py Updated test suite for explainability & provenance (#696) 2026-03-13 14:27:42 +00:00