mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-30 19:09:28 +00:00
DEFAULT_DB_PATH in hermes_state.py is computed at import time, freezing the developer's real ~/.hermes even when a test fixture (or runtime profile switch) later redirects HERMES_HOME. Any default SessionDB() — e.g. gateway SessionStore — then opened the real state.db. Add _default_db_path(): resolves get_hermes_home() fresh at call time, while a deliberately re-pointed DEFAULT_DB_PATH (the established monkeypatch escape hatch) still wins via an import-time snapshot comparison, preserving existing test behavior. SessionDB.__init__ and session_search's requirement check now use the resolver; explicit db_path arguments are untouched. Reimplemented from PR #11875 by @JorkeyLiu (original diff predates the hermes_state rewrite); regression test ported and modernized.
2 lines
30 B
Text
2 lines
30 B
Text
JorkeyLiu
|
|
# PR #11875 salvage
|