The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(sessions): verify gateway status after timer removal
Teknium9c53128cc88b
diff --git a/docs/session-lifecycle.md b/docs/session-lifecycle.mdindex 7d528666136..ddce596be8f 100644--- a/docs/session-lifecycle.md+++ b/docs/session-lifecycle.md@@ -88,7 +88,7 @@ behavior on the next access.| Flag | Type | Default | Description ||---|---|---|---|| `was_auto_reset` | `bool` | `False` | Set when explicit suspension causes a replacement session. Also retained for historical records. |-| `auto_reset_reason` | `Optional[str]` | `None` | `"idle"` or `"daily"` — why the previous session was auto-reset. |+| `auto_reset_reason` | `Optional[str]` | `None` | `"suspended"` for explicit suspension; older rows may retain historical reset reasons. || `reset_had_activity` | `bool` | `False` | Whether the replaced session had prior activity. || `is_fresh_reset` | `bool` | `False` | Set by explicit `/new` or `/reset`. Triggers topic/channel skill re-injection on first message. Distinguished from `was_auto_reset` to avoid misleading "session expired" notices. || `expiry_finalized` | `bool` | `False` | Historical finalization fence retained for recovery; no timer writes it. |diff --git a/evals/gateway/session_time_persistence_controls.py b/evals/gateway/session_time_persistence_controls.pyindex dd75e8e7a3f..63d72b33b99 100644--- a/evals/gateway/session_time_persistence_controls.py+++ b/evals/gateway/session_time_persistence_controls.py@@ -93,4 +93,13 @@ migrator.migrate_session_config({"session": {"reset": {"mode": "daily", "atHour"assert (target / "config.yaml").read_bytes() == beforeassert json.loads((migrator.archive_dir / "session-config.json").read_text(encoding="utf-8")) == {"identityLinks": {"test": "identity"}}results["migration_timers_ignored_advanced_archived"] = True+from contextlib import redirect_stdout+from io import StringIO+from hermes_cli.cli_info_mixin import CLIInfoMixin+status_output = StringIO()+with redirect_stdout(status_output):+ CLIInfoMixin._show_gateway_status(object.__new__(CLIInfoMixin))+assert "Error loading gateway config" not in status_output.getvalue()+assert "Conversations persist" in status_output.getvalue()+results["gateway_status_without_policy"] = Trueprint(json.dumps(results, indent=2), flush=True)diff --git a/tests/gateway/test_session_load_bool.py b/tests/gateway/test_session_load_bool.pyindex a648987e883..e527226aed6 100644--- a/tests/gateway/test_session_load_bool.py+++ b/tests/gateway/test_session_load_bool.py@@ -23,15 +23,11 @@ class TestSessionLoadBoolCorruption:(sessions_dir / "sessions.json").write_text(json.dumps(sessions_data), encoding="utf-8")- # SessionStore requires a config object with session reset policy+ # Only routing configuration is needed for loading the index.class FakeConfig:- session_idle_ttl = 0- session_daily_ttl = 0group_sessions_per_user = Truethread_sessions_per_user = Falsemultiplex_profiles = False- def get_reset_policy(self, *a, **kw):- return Nonestore = SessionStore.__new__(SessionStore)store.sessions_dir = sessions_dir