From e2ad6457330fab3f3851222a87e6ad3c8721d917 Mon Sep 17 00:00:00 2001 From: jenkins Date: Mon, 24 Aug 2026 04:44:28 -0300 Subject: [PATCH] hermes(router-plugin): deliver hux_mode.py through the auto-router ConfigMap The generator now ships the HUX-06 adoption module alongside the plugin, and the plugin degrades to its previous behaviour (no mode adoption) if it starts against a ConfigMap rendered before the module existed - the plugin can never fail to load mid-transition. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01BvMSXH8VH2tMWXanb8SJdf --- services/hermes/kustomization.yaml | 1 + services/hermes/plugins/auto-router/__init__.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/services/hermes/kustomization.yaml b/services/hermes/kustomization.yaml index 9378ca51..6647273d 100644 --- a/services/hermes/kustomization.yaml +++ b/services/hermes/kustomization.yaml @@ -188,6 +188,7 @@ configMapGenerator: namespace: hermes files: - __init__.py=plugins/auto-router/__init__.py + - hux_mode.py=plugins/auto-router/hux_mode.py - provider_status.py=plugins/auto-router/provider_status.py - plugin.yaml=plugins/auto-router/plugin.yaml - dashboard-manifest.json=plugins/auto-router/dashboard/manifest.json diff --git a/services/hermes/plugins/auto-router/__init__.py b/services/hermes/plugins/auto-router/__init__.py index aacc54bd..3231a02f 100644 --- a/services/hermes/plugins/auto-router/__init__.py +++ b/services/hermes/plugins/auto-router/__init__.py @@ -15,8 +15,12 @@ except ImportError: # Direct module loading in the small unit-test harness. try: from .hux_mode import selection as _hux_mode_selection -except ImportError: # Direct module loading in the small unit-test harness. - from hux_mode import selection as _hux_mode_selection +except ImportError: + try: # Direct module loading in the small unit-test harness. + from hux_mode import selection as _hux_mode_selection + except ImportError: # A ConfigMap rendered before hux_mode.py shipped. + def _hux_mode_selection(session): # noqa: ARG001 - contract shim + return None POLICY_PATH = Path("/opt/data/workspace/coordinator/route-policy.json")