惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
Recent Announcements
Recent Announcements
雷峰网
雷峰网
The GitHub Blog
The GitHub Blog
罗磊的独立博客
月光博客
月光博客
J
Java Code Geeks
A
About on SuperTechFans
Microsoft Security Blog
Microsoft Security Blog
D
Docker
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
F
Fortinet All Blogs
U
Unit 42
C
Check Point Blog
Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
酷 壳 – CoolShell
酷 壳 – CoolShell
Blog — PlanetScale
Blog — PlanetScale
大猫的无限游戏
大猫的无限游戏
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
阮一峰的网络日志
阮一峰的网络日志
MyScale Blog
MyScale Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(test): chunk broad script test routing · openclaw/ope...
vincentkoc · 2026-06-20 · via Recent Commits to openclaw:main

@@ -287,6 +287,11 @@ const TOOLING_ISOLATED_VITEST_CONFIG = "test/vitest/vitest.tooling-isolated.conf

287287

const TOOLING_VITEST_CONFIG = "test/vitest/vitest.tooling.config.ts";

288288

const TOOLING_DOCKER_TEST_TARGET = "test/scripts/docker-build-helper.test.ts";

289289

const TOOLING_ISOLATED_TEST_TARGET = "test/scripts/openclaw-e2e-instance.test.ts";

290+

const BROAD_TOOLING_SCRIPT_TEST_PATTERNS = new Set([

291+

"test/scripts/**/*.test.ts",

292+

"test/scripts/*.test.ts",

293+

]);

294+

const BROAD_TOOLING_SCRIPT_TEST_TARGET_CHUNK_SIZE = 60;

290295

const TUI_VITEST_CONFIG = "test/vitest/vitest.tui.config.ts";

291296

const TUI_PTY_VITEST_CONFIG = "test/vitest/vitest.tui-pty.config.ts";

292297

const UI_VITEST_CONFIG = "test/vitest/vitest.ui.config.ts";

@@ -1465,6 +1470,64 @@ function splitTargetChunks(targets, chunkCount) {

14651470

return chunks;

14661471

}

146714721473+

function listBroadScriptTestTargets(pattern, cwd) {

1474+

const root = path.join(cwd, "test/scripts");

1475+

if (!fs.existsSync(root)) {

1476+

return [];

1477+

}

1478+

return listRepoFilesRecursive(root, cwd)

1479+

.filter((file) => file.endsWith(".test.ts") && path.matchesGlob(file, pattern))

1480+

.toSorted((left, right) => left.localeCompare(right));

1481+

}

1482+1483+

function listBroadToolingScriptTestTargets(pattern, cwd) {

1484+

return listBroadScriptTestTargets(pattern, cwd).filter(

1485+

(file) => classifyTarget(file, cwd) === "tooling",

1486+

);

1487+

}

1488+1489+

function createBroadToolingScriptPlans({ config, forwardedArgs, includePatterns, watchMode, cwd }) {

1490+

if (watchMode || config !== TOOLING_VITEST_CONFIG || !includePatterns) {

1491+

return null;

1492+

}

1493+

const [pattern] = includePatterns;

1494+

const targets =

1495+

includePatterns.length === 1 && BROAD_TOOLING_SCRIPT_TEST_PATTERNS.has(pattern)

1496+

? listBroadToolingScriptTestTargets(pattern, cwd)

1497+

: includePatterns.every((target) => target.startsWith("test/scripts/"))

1498+

? includePatterns

1499+

: [];

1500+

if (targets.length <= BROAD_TOOLING_SCRIPT_TEST_TARGET_CHUNK_SIZE) {

1501+

return null;

1502+

}

1503+

const chunkCount = Math.ceil(targets.length / BROAD_TOOLING_SCRIPT_TEST_TARGET_CHUNK_SIZE);

1504+

const chunks = splitTargetChunks(targets, chunkCount);

1505+

return chunks.length > 0

1506+

? chunks.map((chunk) => ({

1507+

config,

1508+

forwardedArgs,

1509+

includePatterns: chunk,

1510+

watchMode,

1511+

}))

1512+

: null;

1513+

}

1514+1515+

function expandBroadToolingScriptTargets(targetArgs, cwd, watchMode) {

1516+

if (watchMode) {

1517+

return targetArgs;

1518+

}

1519+

return uniqueOrdered(

1520+

targetArgs.flatMap((targetArg) => {

1521+

const pattern = toScopedIncludePattern(targetArg, cwd);

1522+

if (!BROAD_TOOLING_SCRIPT_TEST_PATTERNS.has(pattern)) {

1523+

return [targetArg];

1524+

}

1525+

const targets = listBroadScriptTestTargets(pattern, cwd);

1526+

return targets.length > 0 ? targets : [targetArg];

1527+

}),

1528+

);

1529+

}

1530+14681531

function isExistingPathTarget(arg, cwd) {

14691532

return fs.existsSync(path.resolve(cwd, arg));

14701533

}

@@ -2755,7 +2818,11 @@ export function buildVitestRunPlans(

27552818

const changedTargetArgs =

27562819

targetArgs.length === 0 ? resolveChangedTargetArgs(args, cwd, listChangedPaths, options) : null;

27572820

const requestedTargetArgs = changedTargetArgs ?? targetArgs;

2758-

const activeTargetArgs = expandExplicitSourceTestTargets(requestedTargetArgs, cwd);

2821+

const activeTargetArgs = expandBroadToolingScriptTargets(

2822+

expandExplicitSourceTestTargets(requestedTargetArgs, cwd),

2823+

cwd,

2824+

watchMode,

2825+

);

27592826

const activeForwardedArgs =

27602827

changedTargetArgs !== null ? stripChangedArgs(forwardedArgs) : forwardedArgs;

27612828

if (changedTargetArgs !== null && activeTargetArgs.length === 0) {

@@ -2964,9 +3031,21 @@ export function buildVitestRunPlans(

29643031

}),

29653032

);

29663033

const scopedTargetArgs = useCliTargetArgs ? uniqueOrdered(grouped) : [];

3034+

const forwardedPlanArgs = [...nonTargetArgs, ...scopedTargetArgs];

3035+

const broadToolingScriptPlans = createBroadToolingScriptPlans({

3036+

config,

3037+

cwd,

3038+

forwardedArgs: forwardedPlanArgs,

3039+

includePatterns,

3040+

watchMode,

3041+

});

3042+

if (broadToolingScriptPlans) {

3043+

plans.push(...broadToolingScriptPlans);

3044+

continue;

3045+

}

29673046

plans.push({

29683047

config,

2969-

forwardedArgs: [...nonTargetArgs, ...scopedTargetArgs],

3048+

forwardedArgs: forwardedPlanArgs,

29703049

includePatterns,

29713050

watchMode,

29723051

});