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

推荐订阅源

Recent Announcements
Recent Announcements
博客园 - Franky
博客园 - 三生石上(FineUI控件)
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
人人都是产品经理
人人都是产品经理
博客园 - 【当耐特】
L
LangChain Blog
Stack Overflow Blog
Stack Overflow Blog
H
Help Net Security
爱范儿
爱范儿
罗磊的独立博客
博客园_首页
美团技术团队
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
量子位
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
V
Visual Studio Blog
T
Tailwind CSS 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(qa): gate maturity docs on passing evidence (#96017)...
RomneyDa · 2026-06-23 · via Recent Commits to openclaw:main
1-

// Maturity docs renderer tests cover evidence-backed generated-doc checks.

21

import { spawnSync } from "node:child_process";

2+

// Maturity docs renderer tests cover evidence-backed generated-doc checks.

3+

import fs from "node:fs";

34

import path from "node:path";

45

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

56

import { createTempDirTracker } from "../helpers/temp-dir.js";

@@ -22,6 +23,56 @@ function runCli(...args: string[]) {

2223

);

2324

}

242526+

function writeQaEvidence(params: {

27+

dir: string;

28+

entries: Array<{ id: string; status: "pass" | "fail" | "blocked" | "skipped" }>;

29+

}) {

30+

fs.mkdirSync(params.dir, { recursive: true });

31+

fs.writeFileSync(

32+

path.join(params.dir, "qa-evidence.json"),

33+

`${JSON.stringify(

34+

{

35+

kind: "openclaw.qa.evidence-summary",

36+

schemaVersion: 2,

37+

generatedAt: "2026-06-23T00:00:00.000Z",

38+

evidenceMode: "full",

39+

profile: "all",

40+

entries: params.entries.map((entry) => ({

41+

test: {

42+

kind: "qa-scenario",

43+

id: entry.id,

44+

title: entry.id,

45+

source: { path: `qa/scenarios/${entry.id}.yaml` },

46+

},

47+

coverage: [{ id: "tools.evidence", role: "primary" }],

48+

result: { status: entry.status },

49+

})),

50+

scorecard: {

51+

filters: { surface: null, category: null },

52+

run: { evidenceEntryCount: params.entries.length },

53+

categories: {

54+

total: 0,

55+

fulfilled: 0,

56+

partial: 0,

57+

missing: 0,

58+

fulfillmentPercent: 0,

59+

},

60+

features: {

61+

total: 0,

62+

fulfilled: 0,

63+

missing: 0,

64+

fulfillmentPercent: 0,

65+

},

66+

categoryReports: [],

67+

},

68+

},

69+

null,

70+

2,

71+

)}\n`,

72+

"utf8",

73+

);

74+

}

75+2576

describe("maturity docs renderer CLI", () => {

2677

it("checks maturity inputs without requiring QA evidence artifacts", () => {

2778

const result = runCli("--check");

@@ -42,4 +93,45 @@ describe("maturity docs renderer CLI", () => {

4293

"maturity scorecard rendering requires all or release profile qa-evidence.json",

4394

);

4495

});

96+97+

it("rejects scorecard evidence with failed or blocked entries", () => {

98+

const outputDir = tempDirs.make("openclaw-maturity-docs-output-");

99+

const evidenceDir = tempDirs.make("openclaw-maturity-docs-evidence-");

100+

writeQaEvidence({

101+

dir: evidenceDir,

102+

entries: [

103+

{ id: "passing-scenario", status: "pass" },

104+

{ id: "failing-scenario", status: "fail" },

105+

{ id: "blocked-scenario", status: "blocked" },

106+

],

107+

});

108+109+

const result = runCli("--output-dir", outputDir, "--evidence-dir", evidenceDir);

110+111+

expect(result.status).toBe(1);

112+

expect(result.stdout).toBe("");

113+

expect(result.stderr).toContain("maturity docs require passing QA evidence");

114+

expect(result.stderr).toContain("failing-scenario (fail)");

115+

expect(result.stderr).toContain("blocked-scenario (blocked)");

116+

});

117+118+

it("renders passing evidence without impossible failed or blocked result counts", () => {

119+

const outputDir = tempDirs.make("openclaw-maturity-docs-output-");

120+

const evidenceDir = tempDirs.make("openclaw-maturity-docs-evidence-");

121+

writeQaEvidence({

122+

dir: evidenceDir,

123+

entries: [

124+

{ id: "passing-scenario", status: "pass" },

125+

{ id: "skipped-scenario", status: "skipped" },

126+

],

127+

});

128+129+

const result = runCli("--output-dir", outputDir, "--evidence-dir", evidenceDir);

130+131+

expect(result.status).toBe(0);

132+

const scorecard = fs.readFileSync(path.join(outputDir, "maturity", "scorecard.md"), "utf8");

133+

expect(scorecard).toContain("1 passed, 1 skipped");

134+

expect(scorecard).not.toContain("0 failed");

135+

expect(scorecard).not.toContain("0 blocked");

136+

});

45137

});