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

推荐订阅源

罗磊的独立博客
Recent Announcements
Recent Announcements
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
有赞技术团队
有赞技术团队
J
Java Code Geeks
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
aimingoo的专栏
aimingoo的专栏
U
Unit 42
The GitHub Blog
The GitHub Blog
云风的 BLOG
云风的 BLOG
T
Tailwind CSS Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
博客园 - 司徒正美
腾讯CDC
I
InfoQ
GbyAI
GbyAI
博客园_首页

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): hide absolute evidence artifact paths · openclaw...
vincentkoc · 2026-06-20 · via Recent Commits to openclaw:main

@@ -31,6 +31,7 @@ export type {

31313232

const TEXT_PREVIEW_BYTES = 12 * 1024;

3333

const ARTIFACT_VIEW_CONCURRENCY = 8;

34+

const REPO_ROOT_ARTIFACT_PATH_PREFIX = "<repo-root>/";

34353536

const UX_MATRIX_PRODUCER_FILES = [

3637

{ key: "commands", path: "commands.txt", previewKind: "text" },

@@ -171,6 +172,13 @@ function isExplicitRepoRootArtifactPath(raw: string): boolean {

171172

return normalized.startsWith(".artifacts/");

172173

}

173174175+

function repoRootTokenArtifactPath(raw: string): string | null {

176+

const normalized = raw.split(/[\\/]+/u).join("/");

177+

return normalized.startsWith(REPO_ROOT_ARTIFACT_PATH_PREFIX)

178+

? normalized.slice(REPO_ROOT_ARTIFACT_PATH_PREFIX.length)

179+

: null;

180+

}

181+174182

// Resolve an artifact path against pre-resolved roots without re-reading the evidence file.

175183

// Returns null when the path is missing or escapes both roots; callers map that to an error.

176184

async function resolveArtifactFileWithinRoots(params: {

@@ -182,8 +190,13 @@ async function resolveArtifactFileWithinRoots(params: {

182190

if (!raw) {

183191

return null;

184192

}

185-

const candidates = path.isAbsolute(raw) ? [raw] : [path.resolve(params.evidenceDir, raw)];

186-

if (!path.isAbsolute(raw) && isExplicitRepoRootArtifactPath(raw)) {

193+

const tokenPath = repoRootTokenArtifactPath(raw);

194+

const candidates = tokenPath

195+

? [path.resolve(params.repoRoot, tokenPath)]

196+

: path.isAbsolute(raw)

197+

? [raw]

198+

: [path.resolve(params.evidenceDir, raw)];

199+

if (!tokenPath && !path.isAbsolute(raw) && isExplicitRepoRootArtifactPath(raw)) {

187200

candidates.push(path.resolve(params.repoRoot, raw));

188201

}

189202

for (const candidate of candidates) {

@@ -345,6 +358,7 @@ async function buildArtifactView(params: {

345358

allowedArtifactFiles: ReadonlySet<string>;

346359

artifact: QaEvidenceArtifact;

347360

evidenceDir: string;

361+

extraRoots: readonly string[];

348362

hrefEvidencePath: string;

349363

repoRoot: string;

350364

}): Promise<QaEvidenceArtifactView> {

@@ -354,6 +368,16 @@ async function buildArtifactView(params: {

354368

evidenceDir: params.evidenceDir,

355369

repoRoot: params.repoRoot,

356370

}).catch(() => null);

371+

const realFileRepoPath =

372+

realFile && isInside(params.repoRoot, realFile)

373+

? toRepoRelativePath(params.repoRoot, realFile)

374+

: null;

375+

const displayPath =

376+

realFileRepoPath ??

377+

sanitizeGalleryText(params.artifact.path, {

378+

extraRoots: params.extraRoots,

379+

repoRoot: params.repoRoot,

380+

});

357381

if (!realFile || !params.allowedArtifactFiles.has(realFile)) {

358382

return {

359383

exists: false,

@@ -363,18 +387,22 @@ async function buildArtifactView(params: {

363387

href: null,

364388

kind: params.artifact.kind,

365389

mediaKind,

366-

path: params.artifact.path,

390+

path: displayPath,

367391

preview: null,

368392

source: params.artifact.source,

369393

};

370394

}

395+

const hrefArtifactPath =

396+

realFileRepoPath && path.isAbsolute(params.artifact.path)

397+

? `${REPO_ROOT_ARTIFACT_PATH_PREFIX}${realFileRepoPath}`

398+

: params.artifact.path;

371399

return {

372400

exists: true,

373401

error: null,

374-

href: artifactHref(params.hrefEvidencePath, params.artifact.path),

402+

href: artifactHref(params.hrefEvidencePath, hrefArtifactPath),

375403

kind: params.artifact.kind,

376404

mediaKind,

377-

path: params.artifact.path,

405+

path: displayPath,

378406

preview: await readPreview(realFile, mediaKind).catch(

379407

(error: unknown) => `Preview unavailable: ${formatErrorMessage(error)}`,

380408

),

@@ -701,6 +729,7 @@ export async function buildQaEvidenceGalleryModel(params: {

701729

allowedArtifactFiles,

702730

artifact,

703731

evidenceDir,

732+

extraRoots: [requestedRepoRoot],

704733

hrefEvidencePath,

705734

repoRoot,

706735

}),