The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(cron): preserve explicit suggestions path override
이민재e48bb828d4ca
diff --git a/cron/suggestions.py b/cron/suggestions.pyindex 85d2db49ef3..afbd44dbda1 100644--- a/cron/suggestions.py+++ b/cron/suggestions.py@@ -46,11 +46,10 @@ logger = logging.getLogger(__name__)# profile's cron store. Anchor on get_hermes_home() (profile home), not the# shared default root. See cron/jobs.py for the full rationale.#-# Optional test overrides. Production resolves the path at call time so+# Optional test override. Production resolves the path at call time so# multiplexed profile ticks (set_hermes_home_override) cannot leak one# profile's suggestions into the import-time home (#86519). Same pattern as# cron/executions.py.-CRON_DIR: Optional[Path] = NoneSUGGESTIONS_FILE: Optional[Path] = Nonediff --git a/tests/cron/test_suggestions.py b/tests/cron/test_suggestions.pyindex d0be3c666c0..3abaf54d313 100644--- a/tests/cron/test_suggestions.py+++ b/tests/cron/test_suggestions.py@@ -37,6 +37,26 @@ def _add(store, key="k1", title="Test", source="catalog", schedule="0 9 * * *"):class TestStore:+ def test_explicit_file_override_wins_over_profile_home(self, tmp_path, monkeypatch):+ from hermes_constants import (+ reset_hermes_home_override,+ set_hermes_home_override,+ )+ import cron.suggestions as suggestions_mod++ explicit_file = tmp_path / "explicit" / "suggestions.json"+ profile_home = tmp_path / "profile"+ monkeypatch.setattr(suggestions_mod, "SUGGESTIONS_FILE", explicit_file)++ token = set_hermes_home_override(profile_home)+ try:+ _add(suggestions_mod, key="explicit-file")+ finally:+ reset_hermes_home_override(token)++ assert explicit_file.exists()+ assert not (profile_home / "cron" / "suggestions.json").exists()+def test_profile_override_routes_writes_to_current_home(self, tmp_path):from hermes_constants import (reset_hermes_home_override,