The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(sessions): pin /save json timings intervals to kept rows
kshitijk4poorb2860025adc1
diff --git a/tests/hermes_cli/test_save_transcript_history.py b/tests/hermes_cli/test_save_transcript_history.pyindex 259e031913d..2d84c5c7f19 100644--- a/tests/hermes_cli/test_save_transcript_history.py+++ b/tests/hermes_cli/test_save_transcript_history.py@@ -96,6 +96,7 @@ def test_save_json_restores_compacted_history_as_archived(tmp_path, monkeypatch,kept = [m["id"] for m in db.get_messages("s1", include_inactive=True) if m["active"] or m["compacted"]]assert [m["id"] for m in snapshot["messages"]] == kept # every kept row, not the deduped display readassert sum(snapshot["timings"]["role_counts"].values()) == len(kept) # timings name no undone row+ assert {i[k] for i in snapshot["timings"]["intervals"] for k in ("from_message_id", "to_message_id")} <= set(kept)# Like `hermes sessions export`, the in-memory backup is capped per session (sessions.max_export_messages).monkeypatch.setattr("hermes_state.resolved_max_export_messages", lambda: 5)assert "max_export_messages" in save(db, "json", tmp_path / "capped.json")