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

推荐订阅源

罗磊的独立博客
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
IT之家
IT之家
B
Blog
博客园_首页
博客园 - 司徒正美
有赞技术团队
有赞技术团队
博客园 - 聂微东
I
InfoQ
美团技术团队
GbyAI
GbyAI
阮一峰的网络日志
阮一峰的网络日志
H
Help Net Security
大猫的无限游戏
大猫的无限游戏
MyScale Blog
MyScale Blog
WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
人人都是产品经理
人人都是产品经理
Microsoft Azure Blog
Microsoft Azure Blog
Engineering at Meta
Engineering at Meta
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Cloudflare 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: share repo file helpers · openclaw/openclaw@b5b1930
vincentkoc · 2026-05-17 · via Recent Commits to openclaw:main

@@ -5,37 +5,24 @@ import { fileURLToPath } from "node:url";

55

import { bundledPluginFile } from "openclaw/plugin-sdk/test-fixtures";

66

import { describe, expect, it } from "vitest";

77

import { expectNoReaddirSyncDuring } from "../../test-utils/fs-scan-assertions.js";

8+

import {

9+

listGitTrackedFiles,

10+

sortRepoPaths,

11+

toRepoRelativePath,

12+

} from "../../test-utils/repo-files.js";

813914

const thisFilePath = fileURLToPath(import.meta.url);

1015

const thisDir = path.dirname(thisFilePath);

1116

const repoRoot = path.resolve(thisDir, "../../..");

1217

const loadConfigPattern = /\b(?:getRuntimeConfig|config\.getRuntimeConfig)\s*\(/;

131814-

function toPosix(relativePath: string): string {

15-

return relativePath.split(path.sep).join("/");

16-

}

17-1819

function readRepoFile(relativePath: string): string {

1920

const absolute = path.join(repoRoot, relativePath);

2021

return readFileSync(absolute, "utf8");

2122

}

22232324

function listGitFiles(pathspecs: string[]): string[] | null {

24-

const result = spawnSync("git", ["ls-files", "--", ...pathspecs], {

25-

cwd: repoRoot,

26-

encoding: "utf8",

27-

maxBuffer: 1024 * 1024,

28-

stdio: ["ignore", "pipe", "ignore"],

29-

});

30-

if (result.status !== 0) {

31-

return null;

32-

}

33-

return result.stdout

34-

.split("\n")

35-

.map((line) => line.trim())

36-

.filter((line) => line.length > 0)

37-

.map(toPosix)

38-

.toSorted();

25+

return listGitTrackedFiles({ repoRoot, pathspecs });

3926

}

40274128

function listFindFiles(args: string[]): string[] | null {

@@ -52,9 +39,8 @@ function listFindFiles(args: string[]): string[] | null {

5239

.split("\n")

5340

.map((line) => line.trim())

5441

.filter((line) => line.length > 0)

55-

.map((file) => path.relative(repoRoot, file))

56-

.map(toPosix)

57-

.toSorted();

42+

.map((file) => toRepoRelativePath(repoRoot, file))

43+

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

5844

}

59456046

function listCoreOutboundEntryFiles(): string[] {

@@ -70,17 +56,16 @@ function listCoreOutboundEntryFiles(): string[] {

7056

"*.ts",

7157

]);

7258

if (externalFiles) {

73-

return externalFiles

74-

.filter((file) => !file.endsWith(".test.ts"))

75-

.map(toPosix)

76-

.toSorted();

59+

return sortRepoPaths(externalFiles.filter((file) => !file.endsWith(".test.ts")));

7760

}

78617962

const outboundDir = path.join(repoRoot, "src/channels/plugins/outbound");

8063

return fs

8164

.readdirSync(outboundDir)

8265

.filter((name) => name.endsWith(".ts") && !name.endsWith(".test.ts"))

83-

.map((name) => toPosix(path.join("src/channels/plugins/outbound", name)))

66+

.map((name) =>

67+

toRepoRelativePath(repoRoot, path.join(repoRoot, "src/channels/plugins/outbound", name)),

68+

)

8469

.toSorted();

8570

}

8671

@@ -113,7 +98,7 @@ function listExtensionFiles(): {

11398

const srcDir = path.join(extensionsRoot, entry.name, "src");

11499

const outboundPath = path.join(srcDir, "outbound.ts");

115100

if (existsSync(outboundPath)) {

116-

adapterEntrypoints.push(toPosix(path.join("extensions", entry.name, "src/outbound.ts")));

101+

adapterEntrypoints.push(path.posix.join("extensions", entry.name, "src/outbound.ts"));

117102

}

118103119104

const channelPath = path.join(srcDir, "channel.ts");

@@ -122,7 +107,7 @@ function listExtensionFiles(): {

122107

}

123108

const source = readFileSync(channelPath, "utf8");

124109

if (/\boutbound\s*:\s*\{/.test(source)) {

125-

inlineChannelEntrypoints.push(toPosix(path.join("extensions", entry.name, "src/channel.ts")));

110+

inlineChannelEntrypoints.push(path.posix.join("extensions", entry.name, "src/channel.ts"));

126111

}

127112

}

128113