Skip to content

Commit 60e3d5f

Browse files
steipeteampagent
andauthored
fix: prevent Feishu and Mattermost suite collection stalls (#130142)
* test(extensions): narrow ingress state import graph * test(extensions): migrate ingress-only state imports * test(extensions): sync xai ingress boundary alias --------- Co-authored-by: Amp <[email protected]>
1 parent f07ac00 commit 60e3d5f

52 files changed

Lines changed: 94 additions & 79 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎extensions/discord/src/monitor/ingress.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import fs from "node:fs/promises";
33
import os from "node:os";
44
import path from "node:path";
55
import type { APIMessage } from "discord-api-types/v10";
6-
import type { ChannelIngressQueue } from "openclaw/plugin-sdk/channel-outbound";
7-
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
86
import {
97
closeOpenClawStateDatabaseForTest,
108
createChannelIngressQueueForTests,
11-
} from "openclaw/plugin-sdk/plugin-state-test-runtime";
9+
} from "openclaw/plugin-sdk/channel-ingress-test-runtime";
10+
import type { ChannelIngressQueue } from "openclaw/plugin-sdk/channel-outbound";
11+
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
1212
import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
1313
import { afterEach, describe, expect, it, vi } from "vitest";
1414
import { createDiscordIngressMonitor, type DiscordIngressLifecycle } from "./ingress.js";

‎extensions/discord/src/monitor/message-handler.ingress-recovery.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import fs from "node:fs/promises";
33
import os from "node:os";
44
import path from "node:path";
55
import type { APIMessage } from "discord-api-types/v10";
6+
import {
7+
closeOpenClawStateDatabaseForTest,
8+
createChannelIngressQueueForTests,
9+
} from "openclaw/plugin-sdk/channel-ingress-test-runtime";
610
import {
711
type ChannelIngressQueue,
812
DEFAULT_INGRESS_RETRY_MAX_ATTEMPTS,
913
} from "openclaw/plugin-sdk/channel-outbound";
1014
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
11-
import {
12-
closeOpenClawStateDatabaseForTest,
13-
createChannelIngressQueueForTests,
14-
} from "openclaw/plugin-sdk/plugin-state-test-runtime";
1515
import { describe, expect, it, vi } from "vitest";
1616
import { createDiscordIngressMonitor } from "./ingress.js";
1717
import { createDiscordMessageHandler } from "./message-handler.js";

‎extensions/discord/src/monitor/message-handler.queue.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ import os from "node:os";
55
import path from "node:path";
66
import type { APIMessage } from "discord-api-types/v10";
77
import { fanInChannelIngressLifecycles } from "openclaw/plugin-sdk/channel-ingress-runtime";
8+
import {
9+
closeOpenClawStateDatabaseForTest,
10+
createChannelIngressQueueForTests,
11+
} from "openclaw/plugin-sdk/channel-ingress-test-runtime";
812
import {
913
type ChannelIngressQueue,
1014
DEFAULT_INGRESS_RETRY_MAX_ATTEMPTS,
1115
} from "openclaw/plugin-sdk/channel-outbound";
1216
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
1317
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
14-
import {
15-
closeOpenClawStateDatabaseForTest,
16-
createChannelIngressQueueForTests,
17-
} from "openclaw/plugin-sdk/plugin-state-test-runtime";
1818
import { beforeEach, describe, expect, it, vi } from "vitest";
1919
import { buildDiscordInboundJob } from "./inbound-job.js";
2020
import { createDiscordIngressMonitor, type DiscordIngressLifecycle } from "./ingress.js";

‎extensions/feishu/src/feishu-ingress.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type * as Lark from "@larksuiteoapi/node-sdk";
77
import {
88
closeOpenClawStateDatabaseForTest,
99
createChannelIngressQueueForTests,
10-
} from "openclaw/plugin-sdk/plugin-state-test-runtime";
10+
} from "openclaw/plugin-sdk/channel-ingress-test-runtime";
1111
import { createNonExitingRuntimeEnv } from "openclaw/plugin-sdk/plugin-test-runtime";
1212
import { afterEach, describe, expect, it, vi } from "vitest";
1313
import { feishuDedupeState } from "./dedup-state.js";

‎extensions/feishu/src/monitor.cleanup.test-helpers.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { closeOpenClawStateDatabaseForTest } from "openclaw/plugin-sdk/plugin-state-test-runtime";
1+
import { closeOpenClawStateDatabaseForTest } from "openclaw/plugin-sdk/channel-ingress-test-runtime";
22
import { botNames, botOpenIds, httpServers, wsClients } from "./monitor.state.js";
33

44
export function cleanupFeishuMonitorStateForTests(): void {

‎extensions/feishu/src/monitor.message-handler.ingress.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import fs from "node:fs/promises";
33
import os from "node:os";
44
import path from "node:path";
55
import { createInboundDebouncer } from "openclaw/plugin-sdk/channel-inbound-debounce";
6-
import { DEFAULT_INGRESS_RETRY_MAX_ATTEMPTS } from "openclaw/plugin-sdk/channel-outbound";
7-
import { createTestInboundDebounceFlush } from "openclaw/plugin-sdk/channel-test-helpers";
86
import {
97
closeOpenClawStateDatabaseForTest,
108
createChannelIngressQueueForTests,
11-
} from "openclaw/plugin-sdk/plugin-state-test-runtime";
9+
} from "openclaw/plugin-sdk/channel-ingress-test-runtime";
10+
import { DEFAULT_INGRESS_RETRY_MAX_ATTEMPTS } from "openclaw/plugin-sdk/channel-outbound";
11+
import { createTestInboundDebounceFlush } from "openclaw/plugin-sdk/channel-test-helpers";
1212
import { createNonExitingRuntimeEnv } from "openclaw/plugin-sdk/plugin-test-runtime";
1313
import { afterEach, describe, expect, it, vi } from "vitest";
1414
import type { ClawdbotConfig, PluginRuntime, RuntimeEnv } from "../runtime-api.js";

‎extensions/feishu/src/monitor.test-mocks.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Feishu plugin module implements monitor mocks behavior.
22
import { randomUUID } from "node:crypto";
33
import path from "node:path";
4+
import { createChannelIngressQueueForTests } from "openclaw/plugin-sdk/channel-ingress-test-runtime";
45
import type { PluginRuntime } from "openclaw/plugin-sdk/core";
5-
import { createChannelIngressQueueForTests } from "openclaw/plugin-sdk/plugin-state-test-runtime";
66
import { vi } from "vitest";
77

88
export function createFeishuClientMockModule(): {

‎extensions/googlechat/src/monitor-ingress.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import path from "node:path";
55
import {
66
closeOpenClawStateDatabaseForTest,
77
createChannelIngressQueueForTests,
8-
} from "openclaw/plugin-sdk/plugin-state-test-runtime";
8+
} from "openclaw/plugin-sdk/channel-ingress-test-runtime";
99
import { afterEach, describe, expect, it, vi } from "vitest";
1010
import { createGoogleChatIngressMonitor } from "./monitor-ingress.js";
1111

‎extensions/googlechat/src/monitor.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import fs from "node:fs/promises";
33
import os from "node:os";
44
import path from "node:path";
55
import { recordChannelBotPairLoopAndCheckSuppression } from "openclaw/plugin-sdk/channel-inbound";
6-
import { MediaFetchError } from "openclaw/plugin-sdk/media-runtime";
76
import {
87
closeOpenClawStateDatabaseForTest,
98
createChannelIngressQueueForTests,
10-
} from "openclaw/plugin-sdk/plugin-state-test-runtime";
9+
} from "openclaw/plugin-sdk/channel-ingress-test-runtime";
10+
import { MediaFetchError } from "openclaw/plugin-sdk/media-runtime";
1111
import { beforeEach, describe, expect, it, vi } from "vitest";
1212
import type { ResolvedGoogleChatAccount } from "./accounts.js";
1313
import {

‎extensions/imessage/src/monitor/ingress.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import path from "node:path";
55
import {
66
closeOpenClawStateDatabaseForTest,
77
createChannelIngressQueueForTests,
8-
} from "openclaw/plugin-sdk/plugin-state-test-runtime";
8+
} from "openclaw/plugin-sdk/channel-ingress-test-runtime";
99
import { afterEach, describe, expect, it, vi } from "vitest";
1010
import { createIMessageDurableIngress } from "./ingress.js";
1111

0 commit comments

Comments
 (0)