refactor(channels): drop unused test helpers · openclaw/openclaw@7580c80
vincentkoc
·
2026-06-19
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -137,7 +137,6 @@ import {
|
137 | 137 | buildTelegramNonInterruptingReplyFenceKey, |
138 | 138 | buildTelegramReplyFenceLaneKey, |
139 | 139 | endTelegramReplyFence, |
140 | | -getTelegramReplyFenceSizeForTests, |
141 | 140 | isTelegramReplyFenceSuperseded, |
142 | 141 | releaseTelegramReplyFenceAbortController, |
143 | 142 | resetTelegramReplyFenceForTests, |
@@ -146,7 +145,7 @@ import {
|
146 | 145 | supersedeTelegramReplyFence, |
147 | 146 | } from "./telegram-reply-fence.js"; |
148 | 147 | |
149 | | -export { getTelegramReplyFenceSizeForTests, resetTelegramReplyFenceForTests }; |
| 148 | +export { resetTelegramReplyFenceForTests }; |
150 | 149 | |
151 | 150 | const EMPTY_RESPONSE_FALLBACK = "No response generated. Please try again."; |
152 | 151 | const silentReplyDispatchLogger = createSubsystemLogger("telegram/silent-reply-dispatch"); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -234,10 +234,6 @@ export function shouldSupersedeTelegramReplyFence(ctxPayload: {
|
234 | 234 | return true; |
235 | 235 | } |
236 | 236 | |
237 | | -export function getTelegramReplyFenceSizeForTests(): number { |
238 | | -return telegramReplyFenceByKey.size; |
239 | | -} |
240 | | - |
241 | 237 | export function resetTelegramReplyFenceForTests(): void { |
242 | 238 | telegramReplyFenceByKey.clear(); |
243 | 239 | telegramReplyFenceKeysByLane.clear(); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,6 @@ import {
|
4 | 4 | resolvePairLoopGuardSettings, |
5 | 5 | type PairLoopGuardConfig, |
6 | 6 | type PairLoopGuardResult, |
7 | | -type PairLoopGuardSnapshotEntry, |
8 | 7 | } from "../../plugin-sdk/pair-loop-guard-runtime.js"; |
9 | 8 | |
10 | 9 | /** Facts used to detect repeated bot-to-bot channel reply loops. */ |
@@ -43,8 +42,3 @@ export function recordChannelBotPairLoopAndCheckSuppression(
|
43 | 42 | export function clearChannelBotPairLoopGuardForTests(): void { |
44 | 43 | channelBotPairLoopGuard.clear(); |
45 | 44 | } |
46 | | - |
47 | | -/** Lists tracked bot-loop pairs for isolated tests. */ |
48 | | -export function listTrackedChannelBotPairsForTests(): PairLoopGuardSnapshotEntry[] { |
49 | | -return channelBotPairLoopGuard.snapshot(); |
50 | | -} |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -25,7 +25,6 @@ export {
|
25 | 25 | export type { BuildChannelInboundEventContextParams } from "../inbound-event/context.js"; |
26 | 26 | export { |
27 | 27 | clearChannelBotPairLoopGuardForTests, |
28 | | -listTrackedChannelBotPairsForTests, |
29 | 28 | recordChannelBotPairLoopAndCheckSuppression, |
30 | 29 | } from "./bot-loop-protection.js"; |
31 | 30 | export { createChannelHistoryWindow } from "./history-window.js"; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。