hermes-agent/tests/tui_gateway
Jeff Watts 0860b9804f test(tui_gateway): pin goal-command config home against collection-time _hermes_home freeze
Sibling files (test_billing_rpc etc.) import tui_gateway.server at
collection time, freezing module-level _hermes_home = get_hermes_home()
(server.py:54) to the developer's real home before conftest isolation
runs. _load_cfg() then reads the REAL ~/.hermes/config.yaml — e.g. a
local MoA preset — instead of what _write_moa_config wrote.

The server fixture now monkeypatches _hermes_home to the isolated
HERMES_HOME and resets the mtime-keyed cfg cache (_cfg_cache/_cfg_mtime/
_cfg_path); monkeypatch restores originals on teardown.

Complementary to the #57066 autouse teardown, which only restores the
cfg cache to its pre-test value and never re-points _hermes_home.

Combined tests/tui_gateway + tests/test_tui_gateway_server.py:
792 passed.

Salvaged from PR #63981 by @lEWFkRAD.
2026-07-29 21:30:53 -07:00
..
__init__.py
test_auto_continue.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_billing_rpc.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_change_watcher.py feat(pairing): give pairing its own change signal 2026-07-29 18:50:09 -05:00
test_codex_app_server_live_events.py feat(codex): stream live app-server events to TUI/desktop tool cards 2026-07-17 13:44:12 -07:00
test_compaction_status.py fix(update): test runs never mutate the live checkout — pytest-guard the marker and repair paths 2026-07-29 21:30:53 -07:00
test_compress_lock_skip.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_compute_host.py feat(dashboard): isolate turns in compute host (#65895) 2026-07-16 15:24:03 -04:00
test_compute_host_phase1.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_custom_provider_session_persistence.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_delegation_session_lifecycle.py
test_entry_import_off_main_thread.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_entry_sys_path.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_failed_turn_retention.py fix(tui_gateway): retain failed turns as replayable inflight snapshots 2026-07-24 23:31:49 -05:00
test_fast_session_scope.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_finalize_session_persist.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_gateway_owned_session_reap.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_goal_command.py test(tui_gateway): pin goal-command config home against collection-time _hermes_home freeze 2026-07-29 21:30:53 -07:00
test_image_routing_stale_model.py fix(tui): route images with the live switched model 2026-07-17 09:08:30 -07:00
test_inline_rpc_gil_starvation.py fix(update): test runs never mutate the live checkout — pytest-guard the marker and repair paths 2026-07-29 21:30:53 -07:00
test_interim_assistant_callback.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_iso_certify_seam.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_kanban_notify_poller.py fix(kanban): snap notify-sub cursor to current MAX(task_events.id) at creation 2026-07-26 16:14:15 -07:00
test_make_agent_provider.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_mcp_late_refresh_thread_owner.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_mcp_reload_rev.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_moa_reference_emit.py fix(update): test runs never mutate the live checkout — pytest-guard the marker and repair paths 2026-07-29 21:30:53 -07:00
test_model_switch_marker_role.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_pet_generate_rpc.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_project_tree.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_projects_rpc.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_protocol.py test(tui_gateway): make the tui gateway suite order-independent 2026-07-29 21:30:53 -07:00
test_reasoning_config_per_model.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_reasoning_session_scope.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_render.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_review_summary_callback.py fix(update): test runs never mutate the live checkout — pytest-guard the marker and repair paths 2026-07-29 21:30:53 -07:00
test_session_cwd_follow.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_session_id_injection.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_session_platform_resolution.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_slash_worker_ansi.py
test_slash_worker_mcp_discovery.py test(tui): cover profile-local MCP discovery 2026-07-10 18:09:17 +05:30
test_slash_worker_profile_home.py test: prune low-value tests suite-wide (wave 1) — 46,820 → 28,106 test functions 2026-07-29 13:10:23 -07:00
test_slash_worker_sys_path.py
test_subagent_child_mirror.py fix(update): test runs never mutate the live checkout — pytest-guard the marker and repair paths 2026-07-29 21:30:53 -07:00
test_subprocess_encoding.py fix: address review — add regression test, revert cosmetic churn, cross-link #61595 2026-07-24 09:48:28 -07:00
test_undo_command.py fix(update): test runs never mutate the live checkout — pytest-guard the marker and repair paths 2026-07-29 21:30:53 -07:00
test_wait_for_mcp_discovery.py fix(ci): make tests, workflows, and attribution reliable under load (#66373) 2026-07-17 20:55:24 +00:00