From 77e588ebc303dec232dc440f655d2a731ca2bf91 Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Fri, 17 Apr 2026 16:39:48 -0400 Subject: [PATCH] test: avoid bundled session normalizer fallback Keep explicit session-key normalization on loaded channel plugins so unknown provider contexts pass through without cold-loading bundled channel runtimes. This preserves active plugin behavior and removes the slow unknown-provider test path. --- src/config/sessions/explicit-session-key-normalization.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/sessions/explicit-session-key-normalization.ts b/src/config/sessions/explicit-session-key-normalization.ts index 6a2bc61ea7f..c8ba4af8127 100644 --- a/src/config/sessions/explicit-session-key-normalization.ts +++ b/src/config/sessions/explicit-session-key-normalization.ts @@ -1,5 +1,5 @@ import type { MsgContext } from "../../auto-reply/templating.js"; -import { getChannelPlugin, listChannelPlugins } from "../../channels/plugins/index.js"; +import { getLoadedChannelPlugin, listChannelPlugins } from "../../channels/plugins/index.js"; import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, @@ -38,7 +38,7 @@ function resolveExplicitSessionKeyNormalizerCandidates( export function normalizeExplicitSessionKey(sessionKey: string, ctx: MsgContext): string { const normalized = normalizeLowercaseStringOrEmpty(sessionKey); for (const channelId of resolveExplicitSessionKeyNormalizerCandidates(normalized, ctx)) { - const normalize = getChannelPlugin(channelId)?.messaging?.normalizeExplicitSessionKey; + const normalize = getLoadedChannelPlugin(channelId)?.messaging?.normalizeExplicitSessionKey; const next = normalize?.({ sessionKey: normalized, ctx }); if (typeof next === "string" && next.trim()) { return normalizeLowercaseStringOrEmpty(next);