From d532c67292e43db81508379752d809783f418d9e Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Sun, 7 Jun 2026 06:01:40 -0700 Subject: [PATCH] test: convert gateway COMPONENT_PREFIXES test to membership invariant Was an exact-tuple snapshot ('gateway','hermes_plugins'); now asserts the required prefixes (incl. the new plugins.platforms from #41112) as an invariant so future gateway-component prefixes don't break it. --- tests/test_hermes_logging.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/test_hermes_logging.py b/tests/test_hermes_logging.py index 0aa4bc9604a0..dfd129e36f27 100644 --- a/tests/test_hermes_logging.py +++ b/tests/test_hermes_logging.py @@ -591,10 +591,16 @@ class TestComponentPrefixes: def test_gateway_prefix(self): assert "gateway" in hermes_logging.COMPONENT_PREFIXES - # The gateway component captures both core gateway logs and the - # hermes_plugins facility (plugin-installed gateway adapters log - # under that prefix). - assert ("gateway", "hermes_plugins") == hermes_logging.COMPONENT_PREFIXES["gateway"] + # The gateway component captures core gateway logs, the hermes_plugins + # facility, and plugins.platforms (messaging-platform adapters that + # migrated out of gateway/platforms/ into bundled plugins, #41112). + # Assert the required members as an invariant rather than an exact + # tuple snapshot so adding future gateway-component prefixes doesn't + # break this test. + gateway_prefixes = hermes_logging.COMPONENT_PREFIXES["gateway"] + assert "gateway" in gateway_prefixes + assert "hermes_plugins" in gateway_prefixes + assert "plugins.platforms" in gateway_prefixes def test_agent_prefix(self): prefixes = hermes_logging.COMPONENT_PREFIXES["agent"]