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

推荐订阅源

V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
月光博客
月光博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
博客园 - Franky
The GitHub Blog
The GitHub Blog
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
B
Blog RSS Feed
云风的 BLOG
云风的 BLOG
小众软件
小众软件
罗磊的独立博客
Microsoft Azure Blog
Microsoft Azure Blog
I
InfoQ
美团技术团队
H
Hackread – Cybersecurity News, Data Breaches, AI and More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
C
Check Point Blog
WordPress大学
WordPress大学
博客园 - 【当耐特】
博客园 - 司徒正美
D
Docker

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(qa): sanitize ux evidence artifact paths · openclaw/o...
vincentkoc · 2026-06-20 · via Recent Commits to openclaw:main

@@ -112,6 +112,33 @@ function relativeToArtifactBase(artifactBase: string, filePath: string) {

112112

return path.relative(artifactBase, filePath).split(path.sep).join("/");

113113

}

114114115+

function sanitizeArtifactText(

116+

value: string,

117+

params: {

118+

artifactBase?: string;

119+

repoRoot: string;

120+

},

121+

) {

122+

const roots = [

123+

{ from: path.resolve(params.repoRoot), to: "<repo-root>" },

124+

{ from: pathToFileURL(path.resolve(params.repoRoot)).href, to: "file://<repo-root>" },

125+

...(params.artifactBase

126+

? [

127+

{ from: path.resolve(params.artifactBase), to: "<artifact-base>" },

128+

{

129+

from: pathToFileURL(path.resolve(params.artifactBase)).href,

130+

to: "file://<artifact-base>",

131+

},

132+

]

133+

: []),

134+

{ from: os.homedir(), to: "<home>" },

135+

{ from: pathToFileURL(os.homedir()).href, to: "file://<home>" },

136+

].filter((entry) => entry.from && entry.from !== path.parse(entry.from).root);

137+

return roots

138+

.toSorted((a, b) => b.from.length - a.from.length)

139+

.reduce((text, entry) => text.replaceAll(entry.from, entry.to), value);

140+

}

141+115142

function buildExecution(params: {

116143

artifacts: MatrixCell["artifacts"];

117144

source: string;

@@ -195,6 +222,7 @@ function buildEvidenceSummary(params: {

195222196223

async function runCommandForCell(params: {

197224

args: string[];

225+

artifactBase: string;

198226

command: string;

199227

cwd: string;

200228

logPath: string;

@@ -209,13 +237,22 @@ async function runCommandForCell(params: {

209237

env: process.env,

210238

maxBuffer: 1024 * 1024,

211239

});

212-

await writeText(params.logPath, `$ ${commandLine}\n${stdout}${stderr}`);

240+

await writeText(

241+

params.logPath,

242+

sanitizeArtifactText(`$ ${commandLine}\n${stdout}${stderr}`, {

243+

artifactBase: params.artifactBase,

244+

repoRoot: params.cwd,

245+

}),

246+

);

213247

return {

214248

status: "pass" as const,

215249

wallMs: Date.now() - startedAt,

216250

};

217251

} catch (error) {

218-

const details = error instanceof Error ? error.message : String(error);

252+

const details = sanitizeArtifactText(error instanceof Error ? error.message : String(error), {

253+

artifactBase: params.artifactBase,

254+

repoRoot: params.cwd,

255+

});

219256

await writeText(params.logPath, `$ ${commandLine}\nblocked: ${details}\n`);

220257

return {

221258

failureReason: details,

@@ -242,6 +279,7 @@ async function captureControlUiScreenshot(params: {

242279

artifactBase: string;

243280

htmlPath: string;

244281

logPath: string;

282+

repoRoot: string;

245283

screenshotPath: string;

246284

}) {

247285

const startedAt = Date.now();

@@ -264,7 +302,10 @@ async function captureControlUiScreenshot(params: {

264302

wallMs: Date.now() - startedAt,

265303

};

266304

} catch (error) {

267-

const details = error instanceof Error ? error.message : String(error);

305+

const details = sanitizeArtifactText(error instanceof Error ? error.message : String(error), {

306+

artifactBase: params.artifactBase,

307+

repoRoot: params.repoRoot,

308+

});

268309

await writeText(params.logPath, `blocked: ${details}\n`);

269310

return {

270311

failureReason: details,

@@ -363,8 +404,10 @@ async function writeProducerArtifactFixtureHtml(params: {

363404

}

364405365406

async function captureProducerArtifactFixtureProof(params: {

407+

artifactBase: string;

366408

htmlPath: string;

367409

logPath: string;

410+

repoRoot: string;

368411

screenshotPath: string;

369412

skipVisualProof: boolean;

370413

videoPath: string;

@@ -423,7 +466,10 @@ async function captureProducerArtifactFixtureProof(params: {

423466

wallMs: Date.now() - startedAt,

424467

};

425468

} catch (error) {

426-

const details = error instanceof Error ? error.message : String(error);

469+

const details = sanitizeArtifactText(error instanceof Error ? error.message : String(error), {

470+

artifactBase: params.artifactBase,

471+

repoRoot: params.repoRoot,

472+

});

427473

await writeText(params.logPath, `blocked: ${details}\n`);

428474

return {

429475

failureReason: details,

@@ -494,8 +540,9 @@ export async function runUxMatrixEvidenceProducer(options: ProducerOptions) {

494540

"logs.txt",

495541

);

496542

const cliResult = await runCommandForCell({

497-

command: process.execPath,

498543

args: ["openclaw.mjs", "--help"],

544+

artifactBase: options.artifactBase,

545+

command: process.execPath,

499546

cwd: options.repoRoot,

500547

logPath: cliLogPath,

501548

timeoutMs: 30_000,

@@ -515,6 +562,7 @@ export async function runUxMatrixEvidenceProducer(options: ProducerOptions) {

515562

artifactBase: options.artifactBase,

516563

htmlPath: matrixHtmlPath,

517564

logPath: path.join(screenshotCellDir, "logs.txt"),

565+

repoRoot: options.repoRoot,

518566

screenshotPath: matrixScreenshotPath,

519567

});

520568

@@ -575,8 +623,10 @@ export async function runUxMatrixEvidenceProducer(options: ProducerOptions) {

575623

});

576624577625

const fixtureProofResult = await captureProducerArtifactFixtureProof({

626+

artifactBase: options.artifactBase,

578627

htmlPath: fixtureHtmlPath,

579628

logPath: path.join(fixtureProofDir, "logs.txt"),

629+

repoRoot: options.repoRoot,

580630

screenshotPath: path.join(fixtureProofDir, "producer-artifact-fixture.png"),

581631

skipVisualProof: options.skipVisualProof,

582632

videoPath: path.join(fixtureProofDir, "producer-artifact-fixture.webm"),