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

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Blog — PlanetScale
Blog — PlanetScale
小众软件
小众软件
F
Fortinet All Blogs
博客园 - 叶小钗
博客园_首页
D
DataBreaches.Net
Apple Machine Learning Research
Apple Machine Learning Research
U
Unit 42
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
博客园 - Franky
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
The Cloudflare Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
IT之家
IT之家
M
MIT News - Artificial intelligence
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
S
SegmentFault 最新的问题
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
fix(qa): hide evidence producer href paths · openclaw/ope...
vincentkoc · 2026-06-20 · via Recent Commits to openclaw:main

@@ -7,6 +7,7 @@ import {

77

buildQaEvidenceGalleryModel,

88

resolveQaEvidenceArtifactFileByIndex,

99

resolveQaEvidenceArtifactFile,

10+

resolveQaEvidenceProducerFile,

1011

resolveQaEvidenceFile,

1112

} from "./evidence-gallery.js";

1213

import {

@@ -24,6 +25,23 @@ async function writeJson(filePath: string, value: unknown) {

2425

await fs.writeFile(filePath, `${JSON.stringify(value, null, 2)}\n`, "utf8");

2526

}

262728+

function producerRootLeakSegments(repoRoot: string) {

29+

if (process.platform !== "win32") {

30+

return [`nested${repoRoot}`];

31+

}

32+

return [

33+

"nested",

34+

...repoRoot

35+

.split(/[\\/]+/u)

36+

.filter(Boolean)

37+

.map((part) => part.replace(/[^A-Za-z0-9._-]/gu, "_")),

38+

];

39+

}

40+41+

function repoRelativePath(repoRoot: string, filePath: string) {

42+

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

43+

}

44+2745

function vitestArtifactEvidence(params: {

2846

id: string;

2947

title: string;

@@ -276,7 +294,21 @@ describe("evidence gallery", () => {

276294

it("detects UX Matrix producer context from suite-level evidence artifacts", async () => {

277295

const repoRoot = await createTempRepo();

278296

const suiteDir = path.join(repoRoot, ".artifacts", "qa-e2e", "suite");

279-

const runDir = path.join(suiteDir, "script", "ux-matrix-evidence-dashboard", "run-1");

297+

const runDir = path.join(

298+

suiteDir,

299+

"script",

300+

...producerRootLeakSegments(repoRoot),

301+

"ux-matrix-evidence-dashboard",

302+

"run-1",

303+

);

304+

const expectedWebScreenshotNeedle =

305+

process.platform === "win32"

306+

? ".artifacts/qa-e2e/suite/script/nested"

307+

: ".artifacts/qa-e2e/suite/script/nested<repo-root>/ux-matrix-evidence-dashboard/run-1/surfaces/web-ui/stages/first-run/screenshot.png";

308+

const expectedCliLogNeedle =

309+

process.platform === "win32"

310+

? ".artifacts/qa-e2e/suite/script/nested"

311+

: ".artifacts/qa-e2e/suite/script/nested<repo-root>/ux-matrix-evidence-dashboard/run-1/surfaces/cli/stages/error-state/logs.txt";

280312

await fs.mkdir(path.join(runDir, "surfaces", "web-ui", "stages", "first-run"), {

281313

recursive: true,

282314

});

@@ -430,7 +462,10 @@ describe("evidence gallery", () => {

430462

artifacts: [

431463

{

432464

kind: "log",

433-

path: ".artifacts/qa-e2e/suite/script/ux-matrix-evidence-dashboard/run-1/surfaces/cli/stages/error-state/logs.txt",

465+

path: repoRelativePath(

466+

repoRoot,

467+

path.join(runDir, "surfaces", "cli", "stages", "error-state", "logs.txt"),

468+

),

434469

source: "ux-matrix:cli:error-state",

435470

},

436471

],

@@ -478,9 +513,7 @@ describe("evidence gallery", () => {

478513

expect(model.producerContext?.matrix?.cells).toEqual([

479514

{

480515

artifactKinds: ["screenshot"],

481-

artifactPaths: [

482-

".artifacts/qa-e2e/suite/script/ux-matrix-evidence-dashboard/run-1/surfaces/web-ui/stages/first-run/screenshot.png",

483-

],

516+

artifactPaths: [expect.stringContaining(expectedWebScreenshotNeedle)],

484517

coverageIds: ["<repo-root>/ui.control"],

485518

runner: {

486519

availability: "local",

@@ -512,9 +545,7 @@ describe("evidence gallery", () => {

512545

},

513546

{

514547

artifactKinds: ["log"],

515-

artifactPaths: [

516-

".artifacts/qa-e2e/suite/script/ux-matrix-evidence-dashboard/run-1/surfaces/cli/stages/error-state/logs.txt",

517-

],

548+

artifactPaths: [expect.stringContaining(expectedCliLogNeedle)],

518549

coverageIds: [],

519550

runner: null,

520551

stage: "error-state",

@@ -526,9 +557,12 @@ describe("evidence gallery", () => {

526557

]);

527558

expect(model.producerContext?.scorecard?.preview).toContain("# UX Matrix");

528559

expect(model.producerContext?.scorecard?.href).toContain("/api/evidence/artifact?");

529-

expect(model.producerContext?.scorecard?.href).not.toContain(repoRoot);

560+

expect(decodeURIComponent(model.producerContext?.scorecard?.href ?? "")).not.toContain(

561+

repoRoot,

562+

);

530563

expect(model.producerContext?.commands?.preview).toBe("node ux matrix\n");

531564

expect(model.producerContext?.commands?.path).toContain("commands.txt");

565+

expect(decodeURIComponent(model.producerContext?.commands?.href ?? "")).not.toContain(repoRoot);

532566

expect(model.producerContext?.manifest?.preview).toContain('"runId": "run-1"');

533567

expect(model.producerContext?.releaseLedger?.preview).toContain('"proof-gap": 1');

534568

expect(model.producerContext?.preflight.memory?.path).toContain("preflight/memory.txt");

@@ -538,6 +572,14 @@ describe("evidence gallery", () => {

538572

);

539573

expect(model.producerContext?.preflight.adbDevices?.preview).toBe("List of devices\n");

540574

expect(model.evidencePath).toBe(".artifacts/qa-e2e/suite/qa-evidence.json");

575+

expect(JSON.stringify(model)).not.toContain(repoRoot);

576+

await expect(

577+

resolveQaEvidenceProducerFile({

578+

evidencePath: suiteDir,

579+

producerFile: "scorecard",

580+

repoRoot,

581+

}),

582+

).resolves.toBe(await fs.realpath(path.join(runDir, "scorecard.md")));

541583

const outsideDir = await fs.mkdtemp(path.join(os.tmpdir(), "qa-evidence-outside-"));

542584

const outsideCommands = path.join(outsideDir, "commands.txt");

543585

await fs.writeFile(outsideCommands, "outside secret\n", "utf8");

@@ -551,8 +593,7 @@ describe("evidence gallery", () => {

551593

expect(JSON.stringify(symlinkModel)).not.toContain("outside secret");

552594

await expect(

553595

resolveQaEvidenceArtifactFile({

554-

artifactPath:

555-

".artifacts/qa-e2e/suite/script/ux-matrix-evidence-dashboard/run-1/scorecard.md",

596+

artifactPath: path.relative(repoRoot, path.join(runDir, "scorecard.md")),

556597

evidencePath: suiteDir,

557598

repoRoot,

558599

}),