Skip to content

Commit 7580c80

Browse files
committed
refactor(channels): drop unused test helpers
1 parent 7f38b1a commit 7580c80

4 files changed

Lines changed: 1 addition & 13 deletions

File tree

extensions/telegram/src/bot-message-dispatch.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ import {
137137
buildTelegramNonInterruptingReplyFenceKey,
138138
buildTelegramReplyFenceLaneKey,
139139
endTelegramReplyFence,
140-
getTelegramReplyFenceSizeForTests,
141140
isTelegramReplyFenceSuperseded,
142141
releaseTelegramReplyFenceAbortController,
143142
resetTelegramReplyFenceForTests,
@@ -146,7 +145,7 @@ import {
146145
supersedeTelegramReplyFence,
147146
} from "./telegram-reply-fence.js";
148147

149-
export { getTelegramReplyFenceSizeForTests, resetTelegramReplyFenceForTests };
148+
export { resetTelegramReplyFenceForTests };
150149

151150
const EMPTY_RESPONSE_FALLBACK = "No response generated. Please try again.";
152151
const silentReplyDispatchLogger = createSubsystemLogger("telegram/silent-reply-dispatch");

extensions/telegram/src/telegram-reply-fence.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,6 @@ export function shouldSupersedeTelegramReplyFence(ctxPayload: {
234234
return true;
235235
}
236236

237-
export function getTelegramReplyFenceSizeForTests(): number {
238-
return telegramReplyFenceByKey.size;
239-
}
240-
241237
export function resetTelegramReplyFenceForTests(): void {
242238
telegramReplyFenceByKey.clear();
243239
telegramReplyFenceKeysByLane.clear();

src/channels/turn/bot-loop-protection.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
resolvePairLoopGuardSettings,
55
type PairLoopGuardConfig,
66
type PairLoopGuardResult,
7-
type PairLoopGuardSnapshotEntry,
87
} from "../../plugin-sdk/pair-loop-guard-runtime.js";
98

109
/** Facts used to detect repeated bot-to-bot channel reply loops. */
@@ -43,8 +42,3 @@ export function recordChannelBotPairLoopAndCheckSuppression(
4342
export function clearChannelBotPairLoopGuardForTests(): void {
4443
channelBotPairLoopGuard.clear();
4544
}
46-
47-
/** Lists tracked bot-loop pairs for isolated tests. */
48-
export function listTrackedChannelBotPairsForTests(): PairLoopGuardSnapshotEntry[] {
49-
return channelBotPairLoopGuard.snapshot();
50-
}

src/channels/turn/kernel.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export {
2525
export type { BuildChannelInboundEventContextParams } from "../inbound-event/context.js";
2626
export {
2727
clearChannelBotPairLoopGuardForTests,
28-
listTrackedChannelBotPairsForTests,
2928
recordChannelBotPairLoopAndCheckSuppression,
3029
} from "./bot-loop-protection.js";
3130
export { createChannelHistoryWindow } from "./history-window.js";

0 commit comments

Comments
 (0)