Skip to content

The agent that grows with you

test: trim the roster-poll memo tests to the invariants

teknium12a7658989faf
diff --git a/tests/hermes_cli/test_profile_listing_cache.py b/tests/hermes_cli/test_profile_listing_cache.py
index 45687771729..3ea10119561 100644
--- a/tests/hermes_cli/test_profile_listing_cache.py
+++ b/tests/hermes_cli/test_profile_listing_cache.py
@@ -43,34 +43,6 @@ def test_an_edited_config_model_is_seen_on_the_next_read(profile_dir):
assert profiles._read_config_model(profile_dir) == ("claude-opus-4.6", "anthropic")
-def test_an_edited_profile_meta_is_seen_on_the_next_read(profile_dir):
- assert profiles.read_profile_meta(profile_dir)["display_name"] == "Bob"
-
- (profile_dir / "profile.yaml").write_text("display_name: Roberta\ndescription: second\n", encoding="utf-8")
-
- meta = profiles.read_profile_meta(profile_dir)
- assert meta["display_name"] == "Roberta"
- assert meta["description"] == "second"
-
-
-def test_an_edited_distribution_is_seen_on_the_next_read(profile_dir):
- assert profiles._read_distribution_meta(profile_dir) == ("starter", "1.0.0", "registry")
-
- (profile_dir / "distribution.yaml").write_text(
- "name: pro\nversion: 2.0.0\nsource: local\n", encoding="utf-8")
-
- assert profiles._read_distribution_meta(profile_dir) == ("pro", "2.0.0", "local")
-
-
-def test_the_real_writer_round_trips(profile_dir):
- """``write_profile_meta`` renames a temp file into place; the memo must follow the new inode."""
- assert profiles.read_profile_meta(profile_dir)["display_name"] == "Bob"
-
- profiles.write_profile_meta(profile_dir, display_name="Bobby")
-
- assert profiles.read_profile_meta(profile_dir)["display_name"] == "Bobby"
-
-
def test_a_missing_file_is_not_cached_and_is_picked_up_when_created(tmp_path):
bare = tmp_path / "profiles" / "bare"
bare.mkdir(parents=True)
@@ -83,14 +55,6 @@ def test_a_missing_file_is_not_cached_and_is_picked_up_when_created(tmp_path):
assert profiles._read_distribution_meta(bare) == ("late", 9, "registry")
-def test_mutating_a_returned_meta_does_not_poison_the_next_reader(profile_dir):
- first = profiles.read_profile_meta(profile_dir)
- first["display_name"] = "clobbered"
- first["description"] = "clobbered"
-
- assert profiles.read_profile_meta(profile_dir)["display_name"] == "Bob"
-
-
def test_an_unchanged_file_is_parsed_once_across_repeated_reads(profile_dir, monkeypatch):
"""The saving itself — the roster poll stops re-parsing files that have not moved."""
parsed: list = []
diff --git a/tests/tui_gateway/test_profiles_list_session_field_cache.py b/tests/tui_gateway/test_profiles_list_session_field_cache.py
index af2751cbaf3..bb96ace363d 100644
--- a/tests/tui_gateway/test_profiles_list_session_field_cache.py
+++ b/tests/tui_gateway/test_profiles_list_session_field_cache.py
@@ -84,18 +84,6 @@ def test_a_profile_without_a_store_is_not_memoised_and_picks_one_up(home):
assert _row("bare")["last_session"]["title"] == "now it exists"
-def test_one_profile_s_rows_never_answer_for_another(home):
- bob, ann = home / "profiles" / "bob", home / "profiles" / "ann"
- ann.mkdir()
- _seed(bob, "20260920_000001_a", "bob's chat")
- _seed(ann, "20260920_000002_b", "ann's chat")
-
- rows = {p["name"]: p for p in _rows()}
-
- assert rows["bob"]["last_session"]["title"] == "bob's chat"
- assert rows["ann"]["last_session"]["title"] == "ann's chat"
-
-
def test_an_unchanged_store_is_read_once_across_repeated_polls(home, monkeypatch):
"""The saving itself: the 5s poll stops reopening a store that has not moved."""
bob = home / "profiles" / "bob"
diff --git a/tests/tui_gateway/test_profiles_list_ui_meta_cache.py b/tests/tui_gateway/test_profiles_list_ui_meta_cache.py
index 9feb0b101be..e7a90565cd4 100644
--- a/tests/tui_gateway/test_profiles_list_ui_meta_cache.py
+++ b/tests/tui_gateway/test_profiles_list_ui_meta_cache.py
@@ -43,18 +43,6 @@ def _row(name="bob", **params):
return next(p for p in envelope["result"]["profiles"] if p["name"] == name)
-def test_an_edited_ui_meta_shows_on_the_very_next_listing(home):
- assert _row()["ui_meta"]["hermes-bots"]["title"] == "Bob"
-
- (home / "profiles" / "bob" / "profile.yaml").write_text(
- "display_name: Bob\nui_meta:\n hermes-bots:\n title: Roberta\n"
- "_ui_meta_revisions:\n hermes-bots: 2\n", encoding="utf-8")
-
- row = _row()
- assert row["ui_meta"]["hermes-bots"]["title"] == "Roberta"
- assert row["ui_meta_revisions"] == {"hermes-bots": 2}
-
-
def test_the_cas_writer_round_trips_through_the_listing(home):
"""The real write path: profiles.configure reads the raw document, mutates and writes it back."""
before = _row()["ui_meta_revisions"]["hermes-bots"]
@@ -82,32 +70,6 @@ def test_an_avatar_added_without_touching_profile_yaml_is_still_seen(home):
assert _row()["has_avatar"] is True
-def test_a_profile_without_profile_yaml_is_not_cached_and_picks_one_up(home):
- bare = home / "profiles" / "bare"
- bare.mkdir()
- (bare / "config.yaml").write_text("model:\n provider: openai\n", encoding="utf-8")
-
- assert _row("bare")["ui_meta_revisions"] == {}
- assert "ui_meta" not in _row("bare")
- assert cache.profile_yaml_signature(bare) is None
-
- (bare / "profile.yaml").write_text(
- "ui_meta:\n hermes-bots:\n title: Late\n_ui_meta_revisions:\n hermes-bots: 1\n",
- encoding="utf-8")
-
- assert _row("bare")["ui_meta"]["hermes-bots"]["title"] == "Late"
-
-
-def test_mutating_a_returned_ui_meta_does_not_poison_the_next_listing(home):
- first = _row()
- first["ui_meta"]["hermes-bots"]["title"] = "clobbered"
- first["ui_meta_revisions"]["hermes-bots"] = 999
-
- row = _row()
- assert row["ui_meta"]["hermes-bots"]["title"] == "Bob"
- assert row["ui_meta_revisions"] == {"hermes-bots": 1}
-
-
def test_an_unchanged_profile_yaml_is_parsed_once_across_repeated_polls(home, monkeypatch):
"""The saving itself. Counted at the server-published name: the module's bodies are rebound."""
parsed: list = []