refactor: remove verified unused internals (#6460)

* refactor: remove verified unused internals

* test(linear): synchronize webhook shutdown with writer join
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-26 21:45:36 +08:00
1 parent 3230013963
commit f23a6d1485
105 files changed
+207 -1282

No files matched your search

@@ -104,7 +104,7 @@ async def test_dispatch_forwards_all_compaction_phases_before_adapter_filtering(
def test_global_notice_policy_and_channel_override(manager, global_value, override, key):
manager.config.channels.show_compaction_notices = global_value
section = {} if override is None else {key: override}
channel = manager._build_channel("mock", _MockChannel, section)
channel = manager._build_channel(_MockChannel, section)
assert channel.show_compaction_notices is (global_value if override is None else override)
@@ -112,10 +112,10 @@ def test_global_notice_config_round_trip_and_rebuild(manager):
assert Config().channels.show_compaction_notices is False
manager.config = Config.model_validate({"channels": {"showCompactionNotices": True}})
manager.config = Config.model_validate_json(manager.config.model_dump_json(by_alias=True))
assert manager._build_channel("mock", _MockChannel, {}).show_compaction_notices is True
assert manager._build_channel(_MockChannel, {}).show_compaction_notices is True
# Rebuilding an adapter after a config change must resolve the new default.
manager.config.channels.show_compaction_notices = False
assert manager._build_channel("mock", _MockChannel, {}).show_compaction_notices is False
assert manager._build_channel(_MockChannel, {}).show_compaction_notices is False
assert manager._build_channel(
"mock", _MockChannel, {"showCompactionNotices": True},
_MockChannel, {"showCompactionNotices": True},
).show_compaction_notices
@@ -77,7 +77,7 @@ def bus():
@pytest.fixture
def manager(config, bus, tmp_path):
manager = ChannelManager(config, bus, config_path=tmp_path / "config.json")
manager.channels["mock"] = manager._build_channel("mock", MockChannel, {})
manager.channels["mock"] = manager._build_channel(MockChannel, {})
return manager
@@ -288,7 +288,6 @@ class TestProgressFiltering:
def test_progress_visibility_uses_channel_overrides(self, manager, bus):
manager.channels["mock"] = manager._build_channel(
"mock",
MockChannel,
{"sendProgress": False, "sendToolHints": False},
)
@@ -307,7 +306,6 @@ class TestProgressFiltering:
manager.bus = bus
channel = manager._build_channel(
"mattermost",
MattermostChannel,
{"enabled": True},
)
@@ -316,7 +314,6 @@ class TestProgressFiltering:
assert channel.send_tool_hints is False
opted_in = manager._build_channel(
"mattermost",
MattermostChannel,
{
"enabled": True,
+1 -1
View File
@@ -110,5 +110,5 @@ def test_qq_inherits_global_unless_legacy_override_is_explicit(
section["showCompactionNotices"] = str(override).lower() if legacy_string else override
if typed:
section = QQConfig.model_validate(section)
channel = manager._build_channel("qq", QQChannel, section)
channel = manager._build_channel(QQChannel, section)
assert channel.show_compaction_notices is (global_value if override is None else override)