fix: harden salvaged session and browser improvements
Polish salvaged contributor work before PR review: - read browser inactivity timeout from config with documented fallback - skip redundant v10 trigram backfill before v11 FTS rebuild - show delegate_task goals safely in progress previews - show gateway status model/context without redundant token wording - wire gateway /sessions to shared session-listing helpers - map Ravenwolf author emails for release attribution Co-authored-by: Wolfram Ravenwolf <github.com@wolfram.ravenwolf.de> Co-authored-by: Amy Ravenwolf <amy@ravenwolf.de>
This commit is contained in:
co-authored by
Wolfram Ravenwolf
Amy Ravenwolf
parent
ead38107a2
commit
3e7e9b24d4
@@ -117,11 +117,12 @@ class TestCommandTimeoutCache:
|
||||
|
||||
class TestSessionInactivityTimeout:
|
||||
|
||||
def test_default_is_300(self, monkeypatch):
|
||||
def test_default_matches_config_default(self, monkeypatch):
|
||||
from hermes_cli.config import DEFAULT_CONFIG
|
||||
from tools.browser_tool import _get_session_inactivity_timeout
|
||||
monkeypatch.delenv("BROWSER_INACTIVITY_TIMEOUT", raising=False)
|
||||
with patch("hermes_cli.config.read_raw_config", return_value={}):
|
||||
assert _get_session_inactivity_timeout() == 300
|
||||
assert _get_session_inactivity_timeout() == DEFAULT_CONFIG["browser"]["inactivity_timeout"]
|
||||
|
||||
def test_reads_from_config_over_env(self, monkeypatch):
|
||||
from tools.browser_tool import _get_session_inactivity_timeout
|
||||
@@ -137,6 +138,13 @@ class TestSessionInactivityTimeout:
|
||||
with patch("hermes_cli.config.read_raw_config", return_value=cfg):
|
||||
assert _get_session_inactivity_timeout() == 30
|
||||
|
||||
def test_invalid_config_preserves_env_fallback(self, monkeypatch):
|
||||
from tools.browser_tool import _get_session_inactivity_timeout
|
||||
monkeypatch.setenv("BROWSER_INACTIVITY_TIMEOUT", "240")
|
||||
cfg = {"browser": {"inactivity_timeout": "not-an-int"}}
|
||||
with patch("hermes_cli.config.read_raw_config", return_value=cfg):
|
||||
assert _get_session_inactivity_timeout() == 240
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Caching: _discover_homebrew_node_dirs
|
||||
|
||||
Reference in New Issue
Block a user