Skip to content

The agent that grows with you

test(sessions): prune preview keeps whole_lineages out of the open-count kwargs

teknium1e63b6fa197e7
diff --git a/tests/hermes_cli/test_sessions_delete.py b/tests/hermes_cli/test_sessions_delete.py
index ee45cf8b592..7015e47c5ca 100644
--- a/tests/hermes_cli/test_sessions_delete.py
+++ b/tests/hermes_cli/test_sessions_delete.py
@@ -76,7 +76,9 @@ def _run_prune(monkeypatch, capsys, argv_tail, candidates=None, skipped_open=0):
return rows
def count_open_prune_matches(self, **kwargs):
- assert kwargs == seen
+ # Same filters as the preview. `whole_lineages` is the preview's selection mode, not a
+ # filter: an open row is never a compression ancestor, so the count never takes it.
+ assert kwargs == {k: v for k, v in seen.items() if k != "whole_lineages"}
return skipped_open
def count_prune_matches(self, **kwargs):