0860b9804f
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.