






















@@ -3,6 +3,7 @@ import { join, relative, resolve } from "node:path";
33import fg from "fast-glob";
44import { describe, expect, it } from "vitest";
55import { createNodeTestShards } from "../../scripts/lib/ci-node-test-plan.mjs";
6+import { commandsLightTestFiles } from "../vitest/vitest.commands-light-paths.mjs";
67import { createPluginsVitestConfig } from "../vitest/vitest.plugins.config.ts";
7889type VitestTestConfig = {
@@ -169,10 +170,14 @@ describe("scripts/lib/ci-node-test-plan.mjs", () => {
169170]);
170171});
171172172-it("splits the agentic lane into control-plane, commands, agent, SDK, and plugin shards", () => {
173+it("splits the agentic lane into control-plane, command, agent, SDK, and plugin shards", () => {
173174const shards = createNodeTestShards();
174175const controlPlaneShard = shards.find((shard) => shard.shardName === "agentic-control-plane");
175-const commandsShard = shards.find((shard) => shard.shardName === "agentic-commands");
176+const cliShard = shards.find((shard) => shard.shardName === "agentic-cli");
177+const commandSupportShard = shards.find(
178+(shard) => shard.shardName === "agentic-command-support",
179+);
180+const commandShards = shards.filter((shard) => shard.shardName.startsWith("agentic-commands-"));
176181const agentShard = shards.find((shard) => shard.shardName === "agentic-agents");
177182const pluginSdkShard = shards.find((shard) => shard.shardName === "agentic-plugin-sdk");
178183const pluginsShard = shards.find((shard) => shard.shardName === "agentic-plugins");
@@ -184,17 +189,46 @@ describe("scripts/lib/ci-node-test-plan.mjs", () => {
184189runner: "blacksmith-4vcpu-ubuntu-2404",
185190requiresDist: false,
186191});
187-expect(commandsShard).toEqual({
188-checkName: "checks-node-agentic-commands",
189-shardName: "agentic-commands",
192+expect(cliShard).toEqual({
193+checkName: "checks-node-agentic-cli",
194+shardName: "agentic-cli",
195+configs: ["test/vitest/vitest.cli.config.ts"],
196+requiresDist: false,
197+});
198+expect(commandSupportShard).toEqual({
199+checkName: "checks-node-agentic-command-support",
200+shardName: "agentic-command-support",
190201configs: [
191-"test/vitest/vitest.cli.config.ts",
192202"test/vitest/vitest.commands-light.config.ts",
193-"test/vitest/vitest.commands.config.ts",
194203"test/vitest/vitest.daemon.config.ts",
195204],
196205requiresDist: false,
197206});
207+expect(commandShards.map((shard) => shard.shardName)).toEqual([
208+"agentic-commands-agent-channel",
209+"agentic-commands-doctor",
210+"agentic-commands-doctor-shared",
211+"agentic-commands-models",
212+"agentic-commands-onboard-config",
213+"agentic-commands-status-tools",
214+]);
215+expect(commandShards).toEqual(
216+commandShards.map((shard) => ({
217+checkName: `checks-node-${shard.shardName}`,
218+configs: ["test/vitest/vitest.commands.config.ts"],
219+includePatterns: shard.includePatterns,
220+requiresDist: false,
221+shardName: shard.shardName,
222+})),
223+);
224+const commandShardFiles = commandShards
225+.flatMap((shard) => shard.includePatterns ?? [])
226+.toSorted((a, b) => a.localeCompare(b));
227+const expectedCommandFiles = listTestFiles("src/commands")
228+.filter((file) => !commandsLightTestFiles.includes(file))
229+.toSorted((a, b) => a.localeCompare(b));
230+expect(commandShardFiles).toEqual(expectedCommandFiles);
231+expect(new Set(commandShardFiles).size).toBe(commandShardFiles.length);
198232expect(agentShard).toEqual({
199233checkName: "checks-node-agentic-agents",
200234shardName: "agentic-agents",
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。