Skip to content

Commit 54d66dd

Browse files
committed
fix(test): split Testbox agentic processes
1 parent eb6fe70 commit 54d66dd

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";
@@ -4757,12 +4758,13 @@ export function buildFullSuiteVitestRunPlans(args, cwd = process.cwd()) {
47574758
) {
47584759
return [];
47594760
}
4760-
// The remote Testbox full gate runs every extension project in this process tree.
4761-
// Bound project process lifetimes or the non-isolated aggregate exceeds V8's heap limit.
4761+
// The remote Testbox full gate runs every agentic and extension project in one process tree.
4762+
// Bound project and worker lifetimes before either aggregate reaches V8's heap limit.
47624763
const expandShard =
47634764
expandToProjectConfigs ||
4764-
(shard.config === FULL_EXTENSIONS_VITEST_CONFIG &&
4765-
process.env.OPENCLAW_TESTBOX_REMOTE_RUN === "1");
4765+
(process.env.OPENCLAW_TESTBOX_REMOTE_RUN === "1" &&
4766+
(shard.config === FULL_AGENTIC_VITEST_CONFIG ||
4767+
shard.config === FULL_EXTENSIONS_VITEST_CONFIG));
47664768
const configs = expandShard ? shard.projects : [shard.config];
47674769
return configs.flatMap((config) => {
47684770
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
@@ -4693,7 +4693,7 @@ describe("scripts/test-projects full-suite sharding", () => {
46934693
expect(specs[0]?.env.NODE_OPTIONS).toBe("--max-old-space-size=12288 --max_old_space_size=8192");
46944694
});
46954695

4696-
it("splits the Testbox full extension shard into bounded project processes", () => {
4696+
it("splits the Testbox agentic and extension shards into bounded processes", () => {
46974697
vi.stubEnv("CI", "1");
46984698
vi.stubEnv("GITHUB_ACTIONS", "");
46994699
vi.stubEnv("OPENCLAW_TESTBOX_REMOTE_RUN", "1");
@@ -4702,8 +4702,9 @@ describe("scripts/test-projects full-suite sharding", () => {
47024702
try {
47034703
const configs = buildFullSuiteVitestRunPlans([], process.cwd()).map((plan) => plan.config);
47044704

4705-
expect(configs).toContain("test/vitest/vitest.full-agentic.config.ts");
4705+
expect(configs).not.toContain("test/vitest/vitest.full-agentic.config.ts");
47064706
expect(configs).not.toContain("test/vitest/vitest.full-extensions.config.ts");
4707+
expect(configs).toContain("test/vitest/vitest.agents-core.config.ts");
47074708
expect(configs).toContain("test/vitest/vitest.extension-telegram.config.ts");
47084709
} finally {
47094710
vi.unstubAllEnvs();

0 commit comments

Comments
 (0)