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

推荐订阅源

博客园 - 【当耐特】
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
小众软件
小众软件
The Cloudflare Blog
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
美团技术团队
WordPress大学
WordPress大学
罗磊的独立博客
Microsoft Azure Blog
Microsoft Azure Blog
A
About on SuperTechFans
Last Week in AI
Last Week in AI
月光博客
月光博客
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
Google Developers Blog
GbyAI
GbyAI
B
Blog
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
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): fail runtime parity on cell failures · openclaw/...
vincentkoc · 2026-06-16 · via Recent Commits to openclaw:main

@@ -98,6 +98,69 @@ async function writeLiveRuntimeToolEvidence(env: QaSuiteRuntimeEnv, toolName = "

9898

]);

9999

}

100100101+

async function runMockRuntimeToolFixtureWithOutputs(params: {

102+

toolName: string;

103+

happyArgs: Record<string, unknown>;

104+

failureArgs: Record<string, unknown>;

105+

happyOutput: string;

106+

failureOutput: string;

107+

}) {

108+

const env = await makeEnv({

109+

mock: { baseUrl: "http://127.0.0.1:9999" },

110+

});

111+

const promptSnippet = `target=${params.toolName}`;

112+

const failurePromptSnippet = `failure target=${params.toolName}`;

113+

const happyCallId = `call-${params.toolName}-happy`;

114+

const failureCallId = `call-${params.toolName}-failure`;

115+

const fetchJson = vi

116+

.fn()

117+

.mockResolvedValueOnce([])

118+

.mockResolvedValueOnce([

119+

{

120+

allInputText: promptSnippet,

121+

plannedToolCallId: happyCallId,

122+

plannedToolName: params.toolName,

123+

plannedToolArgs: params.happyArgs,

124+

},

125+

{

126+

allInputText: promptSnippet,

127+

toolOutputCallId: happyCallId,

128+

toolOutput: params.happyOutput,

129+

},

130+

{

131+

allInputText: failurePromptSnippet,

132+

plannedToolCallId: failureCallId,

133+

plannedToolName: params.toolName,

134+

plannedToolArgs: params.failureArgs,

135+

},

136+

{

137+

allInputText: failurePromptSnippet,

138+

toolOutputCallId: failureCallId,

139+

toolOutput: params.failureOutput,

140+

},

141+

]);

142+143+

return runRuntimeToolFixture(

144+

env,

145+

{

146+

toolName: params.toolName,

147+

toolCoverage: {

148+

bucket: "openclaw-dynamic-integration",

149+

expectedLayer: "openclaw-dynamic",

150+

},

151+

promptSnippet,

152+

failurePromptSnippet,

153+

},

154+

{

155+

createSession: vi.fn(async (_env, _label, key) => key!),

156+

readEffectiveTools: vi.fn(async () => new Set([params.toolName])),

157+

runAgentPrompt: vi.fn(async () => ({})),

158+

fetchJson,

159+

ensureImageGenerationConfigured: vi.fn(),

160+

},

161+

);

162+

}

163+101164

afterEach(async () => {

102165

await Promise.all(

103166

tempRoots.splice(0).map((tempRoot) => fs.rm(tempRoot, { recursive: true, force: true })),

@@ -595,6 +658,59 @@ describe("runtime tool fixture", () => {

595658

).rejects.toThrow("expected mock failure-path tool failure output for read");

596659

});

597660661+

it.each([

662+

{

663+

name: "required-field",

664+

toolName: "sessions_spawn",

665+

happyArgs: { task: "reply ok" },

666+

happyOutput: "accepted",

667+

failureOutput: "task required",

668+

},

669+

{

670+

name: "unavailable-provider",

671+

toolName: "web_search",

672+

happyArgs: { query: "OpenClaw runtime parity fixed query" },

673+

happyOutput: "result",

674+

failureOutput: "web_search is disabled or no provider is available.",

675+

},

676+

])("accepts $name messages as mock failure fixture output", async (fixture) => {

677+

const details = await runMockRuntimeToolFixtureWithOutputs({

678+

...fixture,

679+

failureArgs: { __qaFailureMode: "denied-input" },

680+

});

681+682+

expect(details).toContain(`${fixture.toolName} mock provider failure planned args`);

683+

});

684+685+

it.each([

686+

{

687+

name: "neutral required-text",

688+

toolName: "sessions_spawn",

689+

happyArgs: { task: "reply ok" },

690+

happyOutput: "accepted",

691+

failureOutput: "no action required",

692+

expectedError: "expected mock failure-path tool failure output for sessions_spawn",

693+

},

694+

{

695+

name: "unavailable-provider happy output",

696+

toolName: "web_search",

697+

happyArgs: { query: "OpenClaw runtime parity fixed query" },

698+

happyOutput: "web_search is disabled or no provider is available.",

699+

failureOutput: "web_search is disabled or no provider is available.",

700+

expectedError: "expected mock happy-path successful tool output for web_search",

701+

},

702+

])("rejects $name as mock fixture output", async (fixture) => {

703+

await expect(

704+

runMockRuntimeToolFixtureWithOutputs({

705+

toolName: fixture.toolName,

706+

happyArgs: fixture.happyArgs,

707+

failureArgs: { __qaFailureMode: "denied-input" },

708+

happyOutput: fixture.happyOutput,

709+

failureOutput: fixture.failureOutput,

710+

}),

711+

).rejects.toThrow(fixture.expectedError);

712+

});

713+598714

it("allows successful happy-path tool output to mention errors", async () => {

599715

const env = await makeEnv({

600716

mock: { baseUrl: "http://127.0.0.1:9999" },