From d22f0dfdac4aeedd9db12bfa934a88f9c810f192 Mon Sep 17 00:00:00 2001 From: GareArc Date: Wed, 11 Mar 2026 23:40:53 -0700 Subject: [PATCH] fix: export telemetry routing constants for tests Export CASE_ROUTING and CASE_TO_TRACE_TASK as module-level constants to fix import errors in enterprise telemetry tests. Tests were failing with: - ImportError: cannot import name 'CASE_ROUTING' from 'core.telemetry.gateway' - ImportError: cannot import name 'CASE_TO_TRACE_TASK' from 'core.telemetry.gateway' This fix allows tests to access the routing configuration without breaking the lazy-loading pattern used internally. --- api/core/telemetry/gateway.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/core/telemetry/gateway.py b/api/core/telemetry/gateway.py index b2b8d3d470..64f608f1cf 100644 --- a/api/core/telemetry/gateway.py +++ b/api/core/telemetry/gateway.py @@ -87,6 +87,10 @@ def _get_case_routing() -> dict: } return _case_routing +# Public exports for tests and external consumers +CASE_TO_TRACE_TASK = _get_case_to_trace_task() +CASE_ROUTING = _get_case_routing() + # --------------------------------------------------------------------------- # Helpers