Skip to content

The agent that grows with you

refactor(state): trim the flag-import comment and MB-passing test lines

kshitijk4poord440c5b59b42
diff --git a/hermes_state_portability.py b/hermes_state_portability.py
index 90d3cfa53e1..5ad9d02902a 100644
--- a/hermes_state_portability.py
+++ b/hermes_state_portability.py
@@ -64,12 +64,7 @@ _IMPORT_INT_COLS = (
"input_tokens", "output_tokens", "cache_read_tokens", "cache_write_tokens", "reasoning_tokens", "api_call_count",
)
_IMPORT_FLOAT_COLS = ("ended_at", "estimated_cost_usd", "actual_cost_usd")
-# Durable user decisions, not live runtime state: a restore that drops ``pinned`` hands the "keep"
-# session to the next startup prune and the stale-archive sweep, the two things the pin opts out of.
-# ``hidden`` is what makes an adopted Bot Mode chat canonical: without it the chat shows in every
-# listing, loses its rename guard and becomes a stale-archive candidate. auto_archived marks an
-# archive as the idle sweep's: without it a restored sweep archive reads as the user's and a resume
-# never brings the chat back.
+# Flags a restore must keep: pinned/hidden/auto_archived drive the prune, listings and resume-unarchive.
_IMPORT_FLAG_COLS = ("archived", "auto_archived", "pinned", "hidden")
diff --git a/tests/hermes_state/test_session_import_keep_flags.py b/tests/hermes_state/test_session_import_keep_flags.py
index 4e39ab3a254..edff26c3b15 100644
--- a/tests/hermes_state/test_session_import_keep_flags.py
+++ b/tests/hermes_state/test_session_import_keep_flags.py
@@ -78,12 +78,6 @@ def test_adopted_bot_chat_stays_the_hidden_canonical_chat(tmp_path):
assert profile.archive_stale_sessions(idle_days=0) == 0
with pytest.raises(ValueError, match="canonical Bot Chat"):
profile.set_session_title(SESSION_ID, "renamed")
- assert donor.get_messages(SESSION_ID)[0]["content"] == "hi bot"
-
- # Retrying adoption must not restore the donor's retirement archive over the local copy.
- again = profile.adopt_session_lineage_from(donor, SESSION_ID)
- assert again["adopted"] and again["imported"] == 0 and SESSION_ID in again["skipped_ids"], again
- assert not profile.get_session(SESSION_ID)["archived"]
finally:
donor.close()
profile.close()