test(verbose): align with telegram tier-1 inbox default

Two tests in test_verbose_command.py asserted Telegram's tool_progress
default was "new" and expected /verbose to cycle that to "all". The
default has since been overridden to "off" in gateway/display_config.py
(_PLATFORM_DEFAULTS for telegram — tier-1 inbox preset that keeps mobile
chats final-answer-first), making the first /verbose invocation cycle
off → new, not all → verbose.

The behavioral change was intentional; the tests were stale and missing
from the same commit. Surfaced as a pre-existing failure on origin/main
during CI for the unrelated #33164 / #33168 Codex auth salvages.
This commit is contained in:
Teknium 2026-05-27 03:04:36 -07:00
parent f1422ffd77
commit 0b6ace6498

View file

@ -128,8 +128,14 @@ class TestVerboseCommand:
f"Expected {mode}, got {actual}"
@pytest.mark.asyncio
async def test_defaults_to_all_when_no_tool_progress_set(self, tmp_path, monkeypatch):
"""When tool_progress is not in config, defaults to platform default then cycles."""
async def test_defaults_to_platform_default_when_no_tool_progress_set(self, tmp_path, monkeypatch):
"""When tool_progress is not in config, starts from platform default then cycles.
Telegram's tier-1 preset overrides ``tool_progress`` to ``"off"`` so the
platform stays final-answer-first by default on mobile inboxes. The
first ``/verbose`` invocation therefore cycles ``off new``, not
``all ...``.
"""
hermes_home = tmp_path / "hermes"
hermes_home.mkdir()
config_path = hermes_home / "config.yaml"
@ -143,17 +149,18 @@ class TestVerboseCommand:
runner = _make_runner()
result = await runner._handle_verbose_command(_make_event())
# Telegram platform default is "new" → cycles to "all"
assert "ALL" in result
# Telegram platform default is "off" → cycles to "new"
assert "NEW" in result
saved = yaml.safe_load(config_path.read_text(encoding="utf-8"))
assert saved["display"]["platforms"]["telegram"]["tool_progress"] == "all"
assert saved["display"]["platforms"]["telegram"]["tool_progress"] == "new"
@pytest.mark.asyncio
async def test_per_platform_isolation(self, tmp_path, monkeypatch):
"""Cycling /verbose on Telegram doesn't change Slack's setting.
Without a global tool_progress, each platform uses its built-in
default: Telegram = 'new' (overridden high tier), Slack = 'off' (quiet Slack default).
default Telegram = 'off' (tier-1 inbox override), Slack = 'off'
(quiet Slack default). Both cycle to 'new' on first /verbose.
"""
hermes_home = tmp_path / "hermes"
hermes_home.mkdir()
@ -178,8 +185,8 @@ class TestVerboseCommand:
saved = yaml.safe_load(config_path.read_text(encoding="utf-8"))
platforms = saved["display"]["platforms"]
# Telegram: new -> all (platform default = new)
assert platforms["telegram"]["tool_progress"] == "all"
# Telegram: off -> new (platform default = off, tier-1 inbox override)
assert platforms["telegram"]["tool_progress"] == "new"
# Slack: off -> new (first /verbose cycle from quiet default)
assert platforms["slack"]["tool_progress"] == "new"