Skip to content

The agent that grows with you

refactor(shared_metrics): remove reset_warning_latch_for_tests

kshitijk4poor1ad403f50877
diff --git a/hermes_cli/observability/shared_metrics_send_config.py b/hermes_cli/observability/shared_metrics_send_config.py
index de8ac454ade..02ceae3ea85 100644
--- a/hermes_cli/observability/shared_metrics_send_config.py
+++ b/hermes_cli/observability/shared_metrics_send_config.py
@@ -87,9 +87,3 @@ def resolve_send_config(config: dict | None) -> SendConfig:
return SendConfig(enabled=enabled, send=False, endpoint=endpoint)
return SendConfig(enabled=enabled, send=send_requested, endpoint=endpoint)
-
-
-def reset_warning_latch_for_tests() -> None:
- """Clear the once-per-process error latch (test support only)."""
- global _warned_send_without_collection
- _warned_send_without_collection = False
diff --git a/tests/hermes_cli/test_shared_metrics_send_config.py b/tests/hermes_cli/test_shared_metrics_send_config.py
index b9cc949e28e..7c3ad2a7a2d 100644
--- a/tests/hermes_cli/test_shared_metrics_send_config.py
+++ b/tests/hermes_cli/test_shared_metrics_send_config.py
@@ -10,17 +10,9 @@ from hermes_cli.config import DEFAULT_CONFIG
from hermes_cli.observability.shared_metrics_send_config import (
DEFAULT_ENDPOINT,
resolve_send_config,
- reset_warning_latch_for_tests,
)
[email protected](autouse=True)
-def _reset_latch():
- reset_warning_latch_for_tests()
- yield
- reset_warning_latch_for_tests()
-
-
def _config(**shared):
return {"telemetry": {"shared_metrics": shared}}