refactor(channels): drop unused test helpers

This commit is contained in:
Vincent Koc
2026-06-19 17:06:47 +08:00
parent 7f38b1a910
commit 7580c80f37
4 changed files with 1 additions and 13 deletions
@@ -137,7 +137,6 @@ import {
buildTelegramNonInterruptingReplyFenceKey,
buildTelegramReplyFenceLaneKey,
endTelegramReplyFence,
getTelegramReplyFenceSizeForTests,
isTelegramReplyFenceSuperseded,
releaseTelegramReplyFenceAbortController,
resetTelegramReplyFenceForTests,
@@ -146,7 +145,7 @@ import {
supersedeTelegramReplyFence,
} from "./telegram-reply-fence.js";
export { getTelegramReplyFenceSizeForTests, resetTelegramReplyFenceForTests };
export { resetTelegramReplyFenceForTests };
const EMPTY_RESPONSE_FALLBACK = "No response generated. Please try again.";
const silentReplyDispatchLogger = createSubsystemLogger("telegram/silent-reply-dispatch");
@@ -234,10 +234,6 @@ export function shouldSupersedeTelegramReplyFence(ctxPayload: {
return true;
}
export function getTelegramReplyFenceSizeForTests(): number {
return telegramReplyFenceByKey.size;
}
export function resetTelegramReplyFenceForTests(): void {
telegramReplyFenceByKey.clear();
telegramReplyFenceKeysByLane.clear();
-6
View File
@@ -4,7 +4,6 @@ import {
resolvePairLoopGuardSettings,
type PairLoopGuardConfig,
type PairLoopGuardResult,
type PairLoopGuardSnapshotEntry,
} from "../../plugin-sdk/pair-loop-guard-runtime.js";
/** Facts used to detect repeated bot-to-bot channel reply loops. */
@@ -43,8 +42,3 @@ export function recordChannelBotPairLoopAndCheckSuppression(
export function clearChannelBotPairLoopGuardForTests(): void {
channelBotPairLoopGuard.clear();
}
/** Lists tracked bot-loop pairs for isolated tests. */
export function listTrackedChannelBotPairsForTests(): PairLoopGuardSnapshotEntry[] {
return channelBotPairLoopGuard.snapshot();
}
-1
View File
@@ -25,7 +25,6 @@ export {
export type { BuildChannelInboundEventContextParams } from "../inbound-event/context.js";
export {
clearChannelBotPairLoopGuardForTests,
listTrackedChannelBotPairsForTests,
recordChannelBotPairLoopAndCheckSuppression,
} from "./bot-loop-protection.js";
export { createChannelHistoryWindow } from "./history-window.js";