The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor: install_has_history counts every named profile
alt-glitche4c9755d4b23
diff --git a/hermes_cli/onboarding_run.py b/hermes_cli/onboarding_run.pyindex 98585e1faf7..fe6830dd041 100644--- a/hermes_cli/onboarding_run.py+++ b/hermes_cli/onboarding_run.py@@ -17,11 +17,6 @@ from hermes_constants import (named_profile_is_deleted,)-# The agentic setup profile's marker file (hermes_cli/profiles.py SETUP_PROFILE_MARKER), spelled out-# because that constant goes away with the agentic setup while this check must keep skipping the dir.-_SETUP_PROFILE_MARKER = ".setup-profile.json"--def _root_config() -> Path:return get_default_hermes_root() / "config.yaml"@@ -30,7 +25,7 @@ def install_has_history(root: Path) -> bool:"""A session row in the root ``state.db``, or a named profile the user made. A fresh bootcreates neither: it leaves an empty ``state.db``, ``auth.json`` (the free-tier mint) and``SOUL.md``, which is why the signal is a session row and not a file."""- if any(not (path / _SETUP_PROFILE_MARKER).is_file() for path in _named_profiles(root)):+ if _named_profiles(root):return Truedb_path = root / "state.db"if not db_path.is_file():diff --git a/tests/hermes_cli/test_onboarding_run.py b/tests/hermes_cli/test_onboarding_run.pyindex f402ddf3bc1..bda06ebf38d 100644--- a/tests/hermes_cli/test_onboarding_run.py+++ b/tests/hermes_cli/test_onboarding_run.py@@ -50,11 +50,7 @@ def test_root_with_a_session_does_not_run(root):assert onboarding_run.should_run() is False-def test_a_user_profile_is_history_but_a_setup_profile_is_not(root):- setup = profiles.create_profile("hermes-setup", no_alias=True)- (setup / ".setup-profile.json").write_text("{}", encoding="utf-8")- assert onboarding_run.should_run() is True-+def test_a_user_profile_is_history(root):profiles.create_profile("work", no_alias=True)assert onboarding_run.should_run() is False@@ -102,14 +98,3 @@ def test_named_profile_launch_uses_the_root_file(root, monkeypatch):(work / "config.yaml").write_text("onboarding:\n run: true\n", encoding="utf-8")onboarding_run.set_run(False)assert onboarding_run.should_run() is False---def test_named_profile_launch_reads_the_root_state_db(root, monkeypatch):- # Launched under the setup profile, the one named profile that is not history.- setup = _launch_under(monkeypatch, root, "hermes-setup")- (setup / ".setup-profile.json").write_text("{}", encoding="utf-8")- _add_session(setup)- assert onboarding_run.should_run() is True-- _add_session(root)- assert onboarding_run.should_run() is False