diff --git a/agent/display.py b/agent/display.py index 070364e9d..0c72075e7 100644 --- a/agent/display.py +++ b/agent/display.py @@ -729,8 +729,7 @@ class KawaiiSpinner: time.sleep(0.1) continue frame = self.spinner_frames[self.frame_idx % len(self.spinner_frames)] - if self.start_time is None: - continue + assert self.start_time is not None # start() sets it before thread starts elapsed = time.time() - self.start_time if wings: left, right = wings[self.frame_idx % len(wings)] diff --git a/gateway/platforms/discord.py b/gateway/platforms/discord.py index 4b4267d6c..ddd4f75b4 100644 --- a/gateway/platforms/discord.py +++ b/gateway/platforms/discord.py @@ -3670,9 +3670,9 @@ if DISCORD_AVAILABLE: ) return - self.resolved = True if interaction.data is None: return + self.resolved = True model_id = interaction.data["values"][0] # ty: ignore[invalid-key] try: diff --git a/tests/agent/test_credential_pool.py b/tests/agent/test_credential_pool.py index 5877a53c4..293641cc9 100644 --- a/tests/agent/test_credential_pool.py +++ b/tests/agent/test_credential_pool.py @@ -1164,10 +1164,6 @@ def test_load_pool_does_not_seed_qwen_oauth_when_no_token(tmp_path, monkeypatch) assert pool.entries() == [] -# --------------------------------------------------------------------------- -# Tests for CredentialPool.remove_entry (added in commit fc00f699) -# --------------------------------------------------------------------------- - def _build_pool_with_entries(tmp_path, monkeypatch, provider="openrouter", entries=None): """Helper: build a CredentialPool directly without seeding side-effects.""" monkeypatch.setenv("HERMES_HOME", str(tmp_path / "hermes")) diff --git a/tests/hermes_cli/test_config_shapes.py b/tests/hermes_cli/test_config_shapes.py index 4abeca8a3..67f90d6a5 100644 --- a/tests/hermes_cli/test_config_shapes.py +++ b/tests/hermes_cli/test_config_shapes.py @@ -1,17 +1,11 @@ -"""Tests for TypedDict shape definitions added in commit fc00f699. - -Verifies that _CamofoxConfig is importable, honours total=False -(all fields optional), and nests correctly inside _BrowserConfig. -""" +"""Runtime smoke tests for `_CamofoxConfig` / `_BrowserConfig` TypedDict shapes.""" from __future__ import annotations def test_camofox_config_is_partial_typeddict(): - """_CamofoxConfig should accept zero or more keys (total=False).""" - from hermes_cli.config import _CamofoxConfig, _BrowserConfig + from hermes_cli.config import _CamofoxConfig - # total=False: constructing with no keys must succeed at runtime cfg_empty: _CamofoxConfig = {} cfg_with_field: _CamofoxConfig = {"managed_persistence": True} @@ -20,8 +14,7 @@ def test_camofox_config_is_partial_typeddict(): def test_camofox_config_nested_in_browser_config(): - """_CamofoxConfig should be accepted in the camofox slot of _BrowserConfig.""" - from hermes_cli.config import _CamofoxConfig, _BrowserConfig + from hermes_cli.config import _BrowserConfig browser: _BrowserConfig = { "inactivity_timeout": 60, @@ -33,10 +26,3 @@ def test_camofox_config_nested_in_browser_config(): } assert browser["camofox"].get("managed_persistence") is False - - -def test_camofox_config_total_false_flag(): - """_CamofoxConfig.__total__ must be False (all fields optional).""" - from hermes_cli.config import _CamofoxConfig - - assert _CamofoxConfig.__total__ is False diff --git a/tests/tools/test_rl_training_tool.py b/tests/tools/test_rl_training_tool.py index f9a24c1a8..7485132dd 100644 --- a/tests/tools/test_rl_training_tool.py +++ b/tests/tools/test_rl_training_tool.py @@ -120,12 +120,7 @@ class TestStopTrainingRunProcesses: trainer.terminate.assert_not_called() -# --------------------------------------------------------------------------- -# Tests for RunState log_file fields (added in commit fc00f699) -# --------------------------------------------------------------------------- - class TestRunStateLogFileFields: - """Verify api_log_file, trainer_log_file, env_log_file exist with None defaults.""" def test_log_file_fields_default_none(self): """All three log_file fields should default to None."""