Skip to content

Commit 9824e36

Browse files
committed
fix(test): split Testbox agentic processes
1 parent 1a95fb3 commit 9824e36

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

‎scripts/test-projects.test-support.mjs‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ const EXTENSION_VOICE_CALL_VITEST_CONFIG = "test/vitest/vitest.extension-voice-c
171171
const EXTENSION_WHATSAPP_VITEST_CONFIG = "test/vitest/vitest.extension-whatsapp.config.ts";
172172
const EXTENSION_ZALO_VITEST_CONFIG = "test/vitest/vitest.extension-zalo.config.ts";
173173
const EXTENSIONS_VITEST_CONFIG = "test/vitest/vitest.extensions.config.ts";
174+
const FULL_AGENTIC_VITEST_CONFIG = "test/vitest/vitest.full-agentic.config.ts";
174175
const FULL_EXTENSIONS_VITEST_CONFIG = "test/vitest/vitest.full-extensions.config.ts";
175176
const GATEWAY_CLIENT_VITEST_CONFIG = "test/vitest/vitest.gateway-client.config.ts";
176177
const GATEWAY_CORE_VITEST_CONFIG = "test/vitest/vitest.gateway-core.config.ts";
@@ -4758,12 +4759,13 @@ export function buildFullSuiteVitestRunPlans(args, cwd = process.cwd()) {
47584759
) {
47594760
return [];
47604761
}
4761-
// The remote Testbox full gate runs every extension project in this process tree.
4762-
// Bound project process lifetimes or the non-isolated aggregate exceeds V8's heap limit.
4762+
// The remote Testbox full gate runs every agentic and extension project in one process tree.
4763+
// Bound project and worker lifetimes before either aggregate reaches V8's heap limit.
47634764
const expandShard =
47644765
expandToProjectConfigs ||
4765-
(shard.config === FULL_EXTENSIONS_VITEST_CONFIG &&
4766-
process.env.OPENCLAW_TESTBOX_REMOTE_RUN === "1");
4766+
(process.env.OPENCLAW_TESTBOX_REMOTE_RUN === "1" &&
4767+
(shard.config === FULL_AGENTIC_VITEST_CONFIG ||
4768+
shard.config === FULL_EXTENSIONS_VITEST_CONFIG));
47674769
const configs = expandShard ? shard.projects : [shard.config];
47684770
return configs.flatMap((config) => {
47694771
if (expandShard && targetArgs.length === 0) {

‎test/scripts/test-projects.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4711,7 +4711,7 @@ describe("scripts/test-projects full-suite sharding", () => {
47114711
expect(specs[0]?.env.NODE_OPTIONS).toBe("--max-old-space-size=12288 --max_old_space_size=8192");
47124712
});
47134713

4714-
it("splits the Testbox full extension shard into bounded project processes", () => {
4714+
it("splits the Testbox agentic and extension shards into bounded processes", () => {
47154715
vi.stubEnv("CI", "1");
47164716
vi.stubEnv("GITHUB_ACTIONS", "");
47174717
vi.stubEnv("OPENCLAW_TESTBOX_REMOTE_RUN", "1");
@@ -4720,8 +4720,9 @@ describe("scripts/test-projects full-suite sharding", () => {
47204720
try {
47214721
const configs = buildFullSuiteVitestRunPlans([], process.cwd()).map((plan) => plan.config);
47224722

4723-
expect(configs).toContain("test/vitest/vitest.full-agentic.config.ts");
4723+
expect(configs).not.toContain("test/vitest/vitest.full-agentic.config.ts");
47244724
expect(configs).not.toContain("test/vitest/vitest.full-extensions.config.ts");
4725+
expect(configs).toContain("test/vitest/vitest.agents-core.config.ts");
47254726
expect(configs).toContain("test/vitest/vitest.extension-telegram.config.ts");
47264727
} finally {
47274728
vi.unstubAllEnvs();

0 commit comments

Comments
 (0)