mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-26 01:01:40 +00:00
Follow-up to 15ac253b per /simplify review:
- gateway/platforms/discord.py:3638 - move self.resolved = True *after*
the `if interaction.data is None: return` guard. Previously the view
was marked resolved before the None-guard, so a None data payload
silently rejected the user's next click.
- agent/display.py:732 - replace `if self.start_time is None: continue`
with `assert self.start_time is not None`. start() sets start_time
before the animate thread starts, so the None branch was dead; the
`continue` form would have busy-looped (skipping the 0.12s sleep).
- tests/hermes_cli/test_config_shapes.py - drop __total__ dunder
restatement test (it just echoes the class declaration); trim commit
narration from module docstring.
- tests/agent/test_credential_pool.py, tests/tools/test_rl_training_tool.py -
drop "added in commit ..." banners (narrates the change per CLAUDE.md).
28 lines
851 B
Python
28 lines
851 B
Python
"""Runtime smoke tests for `_CamofoxConfig` / `_BrowserConfig` TypedDict shapes."""
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
def test_camofox_config_is_partial_typeddict():
|
|
from hermes_cli.config import _CamofoxConfig
|
|
|
|
cfg_empty: _CamofoxConfig = {}
|
|
cfg_with_field: _CamofoxConfig = {"managed_persistence": True}
|
|
|
|
assert cfg_empty == {}
|
|
assert cfg_with_field.get("managed_persistence") is True
|
|
|
|
|
|
def test_camofox_config_nested_in_browser_config():
|
|
from hermes_cli.config import _BrowserConfig
|
|
|
|
browser: _BrowserConfig = {
|
|
"inactivity_timeout": 60,
|
|
"command_timeout": 10,
|
|
"record_sessions": False,
|
|
"allow_private_urls": False,
|
|
"cdp_url": "http://localhost:9222",
|
|
"camofox": {"managed_persistence": False},
|
|
}
|
|
|
|
assert browser["camofox"].get("managed_persistence") is False
|