The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(telemetry): an opt-out from the CLI also drops the Desktop onboarding latches (m16)
teknium158530cc7f5aa
diff --git a/hermes_cli/observability/shared_metrics_process.py b/hermes_cli/observability/shared_metrics_process.pyindex a0e322b68f6..1d621e9b05f 100644--- a/hermes_cli/observability/shared_metrics_process.py+++ b/hermes_cli/observability/shared_metrics_process.py@@ -76,6 +76,7 @@ def begin_process(kind: str) -> None:try:from hermes_constants import get_hermes_home+ from .shared_metrics_desktop import ONBOARDING_LATCH_DIRNAMEfrom .shared_metrics_setup import markers_dir as setup_markers_dirfrom .shared_metrics_update import _collection_on, purge_pending_updates@@ -85,7 +86,8 @@ def begin_process(kind: str) -> None:if not _collection_on():home = get_hermes_home()purge_pending_updates(home) # parked while on, never to be counted once off- for directory in (markers_dir(home), setup_markers_dir(home)): # likewise pending exits/setups+ latches = home / "telemetry" / "shared_metrics" / ONBOARDING_LATCH_DIRNAME # an opt-out outside Desktop+ for directory in (markers_dir(home), setup_markers_dir(home), latches): # likewise pending exits/setupsshutil.rmtree(directory, ignore_errors=True)returnfrom gateway.status import get_process_start_timediff --git a/tests/hermes_cli/test_shared_metrics_reliability.py b/tests/hermes_cli/test_shared_metrics_reliability.pyindex 39bf3a6fcbf..b16e7b3022b 100644--- a/tests/hermes_cli/test_shared_metrics_reliability.py+++ b/tests/hermes_cli/test_shared_metrics_reliability.py@@ -171,7 +171,8 @@ def test_begin_process_marks_then_stamps_clean_and_crash(marks, monkeypatch):def test_opted_out_start_purges_markers_left_while_opted_in(marks, monkeypatch):from hermes_cli.observability import shared_metrics_setup as setup_metrics- left = [process_metrics.markers_dir(marks.home) / "cli-1.json", setup_metrics.markers_dir(marks.home) / "tui-1-1.json"]+ left = [process_metrics.markers_dir(marks.home) / "cli-1.json", setup_metrics.markers_dir(marks.home) / "tui-1-1.json",+ marks.home / "telemetry" / "shared_metrics" / "desktop_onboarding" / "provider.completed"] # CLI opt-outfor marker in left:marker.parent.mkdir(parents=True)marker.write_text(json.dumps({"pid": 1, "started_at": 0, "surface": "tui", "provider": "xai", "state": "running"}))