- Do not advance _config_mtime until mcp_servers reload succeeds; on failure
restore previous mtime so the next poll retries the same file change.
- Only assign _config_mcp_servers after a successful _reload_mcp().
- Treat reload thread timeout as failure (same mtime rollback).
- _reload_mcp() returns bool; /reload-mcp warns on failure.
- Add regression tests for failed vs successful reload snapshots.
Fixes https://github.com/NousResearch/hermes-agent/issues/14716
Made-with: Cursor
* refactor: re-architect tests to mirror the codebase
* Update tests.yml
* fix: add missing tool_error imports after registry refactor
* fix(tests): replace patch.dict with monkeypatch to prevent env var leaks under xdist
patch.dict(os.environ) can leak TERMINAL_ENV across xdist workers,
causing test_code_execution tests to hit the Modal remote path.
* fix(tests): fix update_check and telegram xdist failures
- test_update_check: replace patch("hermes_cli.banner.os.getenv") with
monkeypatch.setenv("HERMES_HOME") — banner.py no longer imports os
directly, it uses get_hermes_home() from hermes_constants.
- test_telegram_conflict/approval_buttons: provide real exception classes
for telegram.error mock (NetworkError, TimedOut, BadRequest) so the
except clause in connect() doesn't fail with "catching classes that do
not inherit from BaseException" when xdist pollutes sys.modules.
* fix(tests): accept unavailable_models kwarg in _prompt_model_selection mock
2026-04-07 17:19:07 -07:00
Renamed from tests/test_cli_mcp_config_watch.py (Browse further)