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

推荐订阅源

G
Google Developers Blog
阮一峰的网络日志
阮一峰的网络日志
A
About on SuperTechFans
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
V
Visual Studio Blog
Martin Fowler
Martin Fowler
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 叶小钗
I
InfoQ
B
Blog RSS Feed
aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
Blog — PlanetScale
Blog — PlanetScale
IT之家
IT之家
P
Proofpoint News Feed
WordPress大学
WordPress大学
小众软件
小众软件
B
Blog
MongoDB | Blog
MongoDB | Blog
人人都是产品经理
人人都是产品经理
量子位
Hugging Face - Blog
Hugging Face - 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
test(gateway): split full-suite gateway-server shard · op...
vincentkoc · 2026-05-03 · via Recent Commits to openclaw:main

@@ -404,6 +404,19 @@ const BROAD_CHANGED_ENV_KEY = "OPENCLAW_TEST_CHANGED_BROAD";

404404

const VITEST_NO_OUTPUT_TIMEOUT_ENV_KEY = "OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS";

405405

const VITEST_NO_OUTPUT_RETRY_ENV_KEY = "OPENCLAW_VITEST_NO_OUTPUT_RETRY";

406406

export const DEFAULT_TEST_PROJECTS_VITEST_NO_OUTPUT_TIMEOUT_MS = "300000";

407+

const GATEWAY_SERVER_FULL_SUITE_TARGET_CHUNK_COUNT = 4;

408+

const GATEWAY_SERVER_BACKED_HTTP_TEST_TARGETS = [

409+

"src/gateway/embeddings-http.test.ts",

410+

"src/gateway/models-http.test.ts",

411+

"src/gateway/openai-http.test.ts",

412+

"src/gateway/openresponses-http.test.ts",

413+

"src/gateway/probe.auth.integration.test.ts",

414+

];

415+

const GATEWAY_SERVER_EXCLUDED_TEST_TARGETS = new Set([

416+

"src/gateway/gateway.test.ts",

417+

"src/gateway/server.startup-matrix-migration.integration.test.ts",

418+

"src/gateway/sessions-history-http.test.ts",

419+

]);

407420

const VITEST_CONFIG_TARGET_KIND_BY_PATH = new Map(

408421

Object.entries(VITEST_CONFIG_BY_KIND).map(([kind, config]) => [config, kind]),

409422

);

@@ -455,6 +468,62 @@ function normalizePathPattern(value) {

455468

return value.replaceAll("\\", "/");

456469

}

457470471+

function listRepoFilesRecursive(root, cwd) {

472+

const entries = fs.readdirSync(root, { withFileTypes: true });

473+

return entries.flatMap((entry) => {

474+

const absolute = path.join(root, entry.name);

475+

if (entry.isDirectory()) {

476+

return listRepoFilesRecursive(absolute, cwd);

477+

}

478+

if (!entry.isFile()) {

479+

return [];

480+

}

481+

return [normalizePathPattern(path.relative(cwd, absolute))];

482+

});

483+

}

484+485+

function isGatewayServerFullSuiteTarget(relative) {

486+

if (

487+

GATEWAY_SERVER_EXCLUDED_TEST_TARGETS.has(relative) ||

488+

relative.startsWith("src/gateway/server-methods/")

489+

) {

490+

return false;

491+

}

492+

return (

493+

GATEWAY_SERVER_BACKED_HTTP_TEST_TARGETS.includes(relative) ||

494+

(relative.startsWith("src/gateway/") &&

495+

path.posix.basename(relative).includes("server") &&

496+

relative.endsWith(".test.ts"))

497+

);

498+

}

499+500+

function resolveGatewayServerFullSuiteTargets(cwd) {

501+

const gatewayDir = path.join(cwd, "src/gateway");

502+

if (!fs.existsSync(gatewayDir)) {

503+

return [];

504+

}

505+

return listRepoFilesRecursive(gatewayDir, cwd)

506+

.filter(isGatewayServerFullSuiteTarget)

507+

.sort((a, b) => a.localeCompare(b));

508+

}

509+510+

function splitTargetChunks(targets, chunkCount) {

511+

if (targets.length === 0) {

512+

return [];

513+

}

514+

const normalizedChunkCount = Math.min(chunkCount, targets.length);

515+

const baseSize = Math.floor(targets.length / normalizedChunkCount);

516+

const remainder = targets.length % normalizedChunkCount;

517+

const chunks = [];

518+

let offset = 0;

519+

for (let index = 0; index < normalizedChunkCount; index += 1) {

520+

const chunkSize = baseSize + (index < remainder ? 1 : 0);

521+

chunks.push(targets.slice(offset, offset + chunkSize));

522+

offset += chunkSize;

523+

}

524+

return chunks;

525+

}

526+458527

function isExistingPathTarget(arg, cwd) {

459528

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

460529

}

@@ -1299,7 +1368,7 @@ export function buildVitestRunPlans(

12991368

}

1300136913011370

export function buildFullSuiteVitestRunPlans(args, cwd = process.cwd()) {

1302-

const { forwardedArgs, watchMode } = parseTestProjectsArgs(args, cwd);

1371+

const { forwardedArgs, targetArgs, watchMode } = parseTestProjectsArgs(args, cwd);

13031372

if (watchMode) {

13041373

return [

13051374

{

@@ -1324,12 +1393,30 @@ export function buildFullSuiteVitestRunPlans(args, cwd = process.cwd()) {

13241393

}

13251394

const expandShard = expandToProjectConfigs;

13261395

const configs = expandShard ? shard.projects : [shard.config];

1327-

return configs.map((config) => ({

1328-

config,

1329-

forwardedArgs,

1330-

includePatterns: null,

1331-

watchMode: false,

1332-

}));

1396+

return configs.flatMap((config) => {

1397+

if (expandShard && targetArgs.length === 0 && config === GATEWAY_SERVER_VITEST_CONFIG) {

1398+

const chunks = splitTargetChunks(

1399+

resolveGatewayServerFullSuiteTargets(cwd),

1400+

GATEWAY_SERVER_FULL_SUITE_TARGET_CHUNK_COUNT,

1401+

);

1402+

if (chunks.length > 0) {

1403+

return chunks.map((targets) => ({

1404+

config,

1405+

forwardedArgs: [...forwardedArgs, ...targets],

1406+

includePatterns: null,

1407+

watchMode: false,

1408+

}));

1409+

}

1410+

}

1411+

return [

1412+

{

1413+

config,

1414+

forwardedArgs,

1415+

includePatterns: null,

1416+

watchMode: false,

1417+

},

1418+

];

1419+

});

13331420

});

13341421

}

13351422