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

推荐订阅源

WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
人人都是产品经理
人人都是产品经理
Y
Y Combinator Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
D
DataBreaches.Net
GbyAI
GbyAI
Microsoft Security Blog
Microsoft Security Blog
博客园_首页
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Engineering at Meta
Engineering at Meta
IT之家
IT之家
MongoDB | Blog
MongoDB | Blog
The GitHub Blog
The GitHub Blog
月光博客
月光博客
U
Unit 42
Hugging Face - Blog
Hugging Face - Blog
博客园 - 叶小钗
腾讯CDC
B
Blog RSS Feed
博客园 - Franky
爱范儿
爱范儿

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
feat(qa): add coverage scenario matching · openclaw/openc...
steipete · 2026-05-25 · via Recent Commits to openclaw:main

@@ -13,6 +13,16 @@ type QaCoverageScenarioSummary = {

1313

risk: string;

1414

};

151516+

type QaScenarioSearchMatch = QaCoverageScenarioSummary & {

17+

coverageIds: string[];

18+

docsRefs: string[];

19+

codeRefs: string[];

20+

runtimeParityTier?: string;

21+

requiredProviderMode?: string;

22+

requiredProvider?: string;

23+

requiredModel?: string;

24+

};

25+1626

type QaCoverageIntent = "primary" | "secondary";

17271828

type QaCoverageScenarioReference = QaCoverageScenarioSummary & {

@@ -70,6 +80,85 @@ function summarizeScenario(scenario: QaSeedScenarioWithSource): QaCoverageScenar

7080

};

7181

}

728283+

function normalizeSearchText(value: string) {

84+

return value.toLowerCase();

85+

}

86+87+

function tokenizeScenarioSearchQuery(query: string) {

88+

return query

89+

.toLowerCase()

90+

.split(/\s+/u)

91+

.map((token) => token.trim())

92+

.filter(Boolean);

93+

}

94+95+

function scenarioSearchText(scenario: QaSeedScenarioWithSource) {

96+

const config = scenario.execution.config ?? {};

97+

return normalizeSearchText(

98+

[

99+

scenario.id,

100+

scenario.title,

101+

scenario.sourcePath,

102+

scenario.surface,

103+

...(scenario.surfaces ?? []),

104+

scenario.category ?? "",

105+

scenario.runtimeParityTier ?? "",

106+

scenario.risk ?? "",

107+

scenario.riskLevel ?? "",

108+

scenario.objective,

109+

...scenario.successCriteria,

110+

...(scenario.capabilities ?? []),

111+

...(scenario.plugins ?? []),

112+

...(scenario.docsRefs ?? []),

113+

...(scenario.codeRefs ?? []),

114+

...(scenario.coverage?.primary ?? []),

115+

...(scenario.coverage?.secondary ?? []),

116+

...Object.entries(config).flatMap(([key, value]) => [

117+

key,

118+

typeof value === "string" ? value : "",

119+

]),

120+

].join("\n"),

121+

);

122+

}

123+124+

function stringifyConfigValue(value: unknown) {

125+

return typeof value === "string" && value.trim() ? value.trim() : undefined;

126+

}

127+128+

function summarizeScenarioSearchMatch(scenario: QaSeedScenarioWithSource): QaScenarioSearchMatch {

129+

const config = scenario.execution.config ?? {};

130+

return {

131+

...summarizeScenario(scenario),

132+

coverageIds: [

133+

...(scenario.coverage?.primary ?? []),

134+

...(scenario.coverage?.secondary ?? []),

135+

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

136+

docsRefs: [...(scenario.docsRefs ?? [])],

137+

codeRefs: [...(scenario.codeRefs ?? [])],

138+

runtimeParityTier: scenario.runtimeParityTier,

139+

requiredProviderMode: stringifyConfigValue(config.requiredProviderMode),

140+

requiredProvider: stringifyConfigValue(config.requiredProvider),

141+

requiredModel: stringifyConfigValue(config.requiredModel),

142+

};

143+

}

144+145+

export function findQaScenarioMatches(

146+

scenarios: readonly QaSeedScenarioWithSource[],

147+

query: string,

148+

) {

149+

const tokens = tokenizeScenarioSearchQuery(query);

150+

if (tokens.length === 0) {

151+

return [];

152+

}

153+

return scenarios

154+

.filter((scenario) => {

155+

const haystack = scenarioSearchText(scenario);

156+

return tokens.every((token) => haystack.includes(token));

157+

})

158+

.map(summarizeScenarioSearchMatch)

159+

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

160+

}

161+73162

function sortFeatures(features: readonly QaCoverageFeatureSummary[]) {

74163

return features.toSorted((left, right) => left.id.localeCompare(right.id));

75164

}

@@ -280,3 +369,52 @@ export function renderQaCoverageMarkdownReport(inventory: QaCoverageInventory):

280369281370

return `${lines.join("\n").trimEnd()}\n`;

282371

}

372+373+

function formatOptionalScenarioMetadata(match: QaScenarioSearchMatch) {

374+

const metadata = [

375+

match.runtimeParityTier ? `runtimeParityTier=${match.runtimeParityTier}` : "",

376+

match.requiredProviderMode ? `providerMode=${match.requiredProviderMode}` : "",

377+

match.requiredProvider ? `provider=${match.requiredProvider}` : "",

378+

match.requiredModel ? `model=${match.requiredModel}` : "",

379+

].filter(Boolean);

380+

return metadata.length > 0 ? metadata.join("; ") : "none";

381+

}

382+383+

export function renderQaScenarioMatchesMarkdownReport(params: {

384+

query: string;

385+

matches: readonly QaScenarioSearchMatch[];

386+

}) {

387+

const scenarioArgs = params.matches.map((match) => `--scenario ${match.id}`).join(" ");

388+

const lines = [

389+

"# QA Scenario Matches",

390+

"",

391+

`- Query: ${params.query}`,

392+

`- Matches: ${params.matches.length}`,

393+

];

394+395+

if (scenarioArgs) {

396+

lines.push(`- Suite command: \`pnpm openclaw qa suite ${scenarioArgs}\``);

397+

}

398+

lines.push("");

399+400+

if (params.matches.length === 0) {

401+

lines.push("No QA scenarios matched the query.", "");

402+

return lines.join("\n");

403+

}

404+405+

for (const match of params.matches) {

406+

lines.push(`- ${match.id}: ${match.title}`);

407+

lines.push(` - source: ${match.sourcePath}`);

408+

lines.push(` - surface: ${match.surfaces.join(", ")}`);

409+

lines.push(` - coverage: ${match.coverageIds.join(", ") || "none"}`);

410+

lines.push(` - live requirements: ${formatOptionalScenarioMetadata(match)}`);

411+

if (match.codeRefs.length > 0) {

412+

lines.push(` - code refs: ${match.codeRefs.join(", ")}`);

413+

}

414+

if (match.docsRefs.length > 0) {

415+

lines.push(` - docs refs: ${match.docsRefs.join(", ")}`);

416+

}

417+

}

418+419+

return `${lines.join("\n").trimEnd()}\n`;

420+

}