From 1aa8ef2f5b429d786b172ed859fa9e3d87a459f1 Mon Sep 17 00:00:00 2001 From: Jonah Date: Sun, 8 Feb 2026 15:10:30 -0500 Subject: [PATCH] fix(review): [minor] Document config.name graceful degradation and align subscribe check - Documented: service_kernel.py config.name error log is intentional graceful degradation (OMN-1992), not a regression from fail-fast - Fixed: plugin.py subscribe capability check now uses hasattr() + callable() guard, matching the kernel's contract registry pattern Review iteration: 1/10 --- .../nodes/node_registration_orchestrator/plugin.py | 5 ++++- src/omnibase_infra/runtime/service_kernel.py | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/omnibase_infra/nodes/node_registration_orchestrator/plugin.py b/src/omnibase_infra/nodes/node_registration_orchestrator/plugin.py index cee36f081b..3ed45a37b2 100644 --- a/src/omnibase_infra/nodes/node_registration_orchestrator/plugin.py +++ b/src/omnibase_infra/nodes/node_registration_orchestrator/plugin.py @@ -867,7 +867,10 @@ async def start_consumers( # Duck typing: check for subscribe capability rather than concrete type # Per CLAUDE.md: "Protocol Resolution - Duck typing through protocols, never isinstance" - if not hasattr(config.event_bus, "subscribe"): + if not ( + hasattr(config.event_bus, "subscribe") + and callable(getattr(config.event_bus, "subscribe", None)) + ): return ModelDomainPluginResult.skipped( plugin_id=self.plugin_id, reason="Event bus does not support subscribe", diff --git a/src/omnibase_infra/runtime/service_kernel.py b/src/omnibase_infra/runtime/service_kernel.py index 96dd3101de..b3687a53b7 100644 --- a/src/omnibase_infra/runtime/service_kernel.py +++ b/src/omnibase_infra/runtime/service_kernel.py @@ -730,6 +730,11 @@ async def bootstrap() -> int: version=config.contract_version or "v1", ) else: + # Graceful degradation (OMN-1992): config.name absence is logged + # rather than raising ProtocolConfigurationError so kernels with + # optional introspection can still boot. Plugins that require + # node_identity (e.g. PluginRegistration.start_consumers) will + # return a "skipped" result instead of failing. logger.error( "runtime_config.yaml missing 'name' field — plugin consumers " "will not subscribe to introspection events. "