The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(pets): lock the quoted-false behavior on the CLI surfaces
thatssoheil8052d5dd243b
diff --git a/tests/hermes_cli/test_pet_toggle.py b/tests/hermes_cli/test_pet_toggle.pyindex 7b8c4783587..c1b55f939f3 100644--- a/tests/hermes_cli/test_pet_toggle.py+++ b/tests/hermes_cli/test_pet_toggle.py@@ -50,6 +50,35 @@ def test_toggle_pet_display_errors_with_no_installed_pets(tmp_path, monkeypatch)assert err is not None+def test_pets_cli_quoted_false_disables_and_toggle_enables(tmp_path, monkeypatch):+ """Quoted `display.pet.enabled: "false"` must read as disabled.++ bool('false') is True — before the is_truthy_value fix, _has_active_pet+ reported an active pet and /pet toggle DISABLED instead of enabling.+ """+ import yaml++ from hermes_cli.pets import _has_active_pet, toggle_pet_display++ home = tmp_path / ".hermes"+ home.mkdir()+ monkeypatch.setenv("HERMES_HOME", str(home))+ (home / "config.yaml").write_text(+ yaml.safe_dump(+ {"display": {"pet": {"enabled": "false", "slug": "", "scale": 0.33}}}+ ),+ encoding="utf-8",+ )++ assert _has_active_pet() is False+ # Toggle must take the ENABLE branch (reaching the "no pets installed"+ # error), not the disable branch (which would return err=None).+ enabled, name, err = toggle_pet_display()+ assert err is not None and "no pets installed" in err+ assert enabled is False+ assert name is None++@pytest.fixturedef empty_home(tmp_path, monkeypatch):home = tmp_path / ".hermes"