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

推荐订阅源

有赞技术团队
有赞技术团队
小众软件
小众软件
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
Jina AI
Jina AI
博客园 - 【当耐特】
V
Visual Studio Blog
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
量子位
IT之家
IT之家
G
Google Developers Blog
V
V2EX
The GitHub Blog
The GitHub Blog
月光博客
月光博客
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
qa-lab: generalize tool progress prompts · openclaw/openc...
gumadeiras · 2026-04-28 · via Recent Commits to openclaw:main

@@ -206,6 +206,21 @@ describe("qa mock openai server", () => {

206206

expect(quietBody).toContain('"phase":"final_answer"');

207207

expect(quietBody).toContain("QA_STREAMING_OK");

208208209+

const partialResponse = await fetch(`${server.baseUrl}/v1/responses`, {

210+

method: "POST",

211+

headers: {

212+

"content-type": "application/json",

213+

},

214+

body: JSON.stringify({

215+

stream: true,

216+

input: [makeUserInput("Partial streaming QA check: reply exactly `QA_PARTIAL_OK`.")],

217+

}),

218+

});

219+

expect(partialResponse.status).toBe(200);

220+

const partialBody = await partialResponse.text();

221+

expect(partialBody).toContain('"type":"response.output_text.delta"');

222+

expect(partialBody).toContain("QA_PARTIAL_OK");

223+209224

const blockResponse = await fetch(`${server.baseUrl}/v1/responses`, {

210225

method: "POST",

211226

headers: {

@@ -228,6 +243,113 @@ describe("qa mock openai server", () => {

228243

expect(blockBody).toContain("BLOCK_TWO_OK");

229244

});

230245246+

it("plans deterministic tool-progress reads from prompt paths", async () => {

247+

const server = await startMockServer();

248+249+

const response = await fetch(`${server.baseUrl}/v1/responses`, {

250+

method: "POST",

251+

headers: {

252+

"content-type": "application/json",

253+

},

254+

body: JSON.stringify({

255+

stream: true,

256+

input: [

257+

makeUserInput(

258+

"Tool progress QA check: read `qa-progress-target.txt` before answering. After the read completes, reply exactly `TOOL_PROGRESS_OK`.",

259+

),

260+

],

261+

}),

262+

});

263+264+

expect(response.status).toBe(200);

265+

const body = await response.text();

266+

expect(body).toContain('"name":"read"');

267+

expect(body).toContain("qa-progress-target.txt");

268+

});

269+270+

it("requires deterministic tool-progress error prompts to observe a failed tool", async () => {

271+

const server = await startMockServer();

272+

const prompt =

273+

"Tool progress error QA check: read `missing-tool-progress-target.txt` before answering. After the read fails, reply exactly `TOOL_PROGRESS_ERROR_OK`.";

274+275+

const toolPlan = await fetch(`${server.baseUrl}/v1/responses`, {

276+

method: "POST",

277+

headers: {

278+

"content-type": "application/json",

279+

},

280+

body: JSON.stringify({

281+

stream: true,

282+

input: [makeUserInput(prompt)],

283+

}),

284+

});

285+286+

expect(toolPlan.status).toBe(200);

287+

const toolPlanBody = await toolPlan.text();

288+

expect(toolPlanBody).toContain('"name":"read"');

289+

expect(toolPlanBody).toContain("missing-tool-progress-target.txt");

290+291+

const successOutput = await expectResponsesJson<{

292+

output: Array<{ content?: Array<{ text?: string }> }>;

293+

}>(server, {

294+

stream: false,

295+

input: [

296+

makeUserInput(prompt),

297+

{

298+

type: "function_call_output",

299+

call_id: "call_mock_read_1",

300+

output: JSON.stringify({ text: "unexpected success" }),

301+

},

302+

],

303+

});

304+

expect(successOutput.output[0]?.content?.[0]?.text).toBe("BUG-TOOL-DID-NOT-FAIL");

305+306+

const errorOutput = await expectResponsesJson<{

307+

output: Array<{ content?: Array<{ text?: string }> }>;

308+

}>(server, {

309+

stream: false,

310+

input: [

311+

makeUserInput(prompt),

312+

{

313+

type: "function_call_output",

314+

call_id: "call_mock_read_1",

315+

output: JSON.stringify({ error: "ENOENT: no such file or directory" }),

316+

},

317+

],

318+

});

319+

expect(errorOutput.output[0]?.content?.[0]?.text).toBe("TOOL_PROGRESS_ERROR_OK");

320+

});

321+322+

it("uses the latest user prompt path for tool-progress plans", async () => {

323+

const server = await startMockServer();

324+325+

const response = await fetch(`${server.baseUrl}/v1/responses`, {

326+

method: "POST",

327+

headers: {

328+

"content-type": "application/json",

329+

},

330+

body: JSON.stringify({

331+

stream: true,

332+

input: [

333+

makeUserInput(

334+

"Tool progress QA check: read `older-progress-target.txt` before answering. After the read completes, reply exactly `OLD_PROGRESS_OK`.",

335+

),

336+

makeUserInput(

337+

"Tool progress error QA check: read `latest-missing-progress-target.txt` before answering. After the read fails, reply exactly `LATEST_PROGRESS_OK`.",

338+

),

339+

makeUserInput(

340+

"Continue with the QA scenario plan and report worked, failed, and blocked items.",

341+

),

342+

],

343+

}),

344+

});

345+346+

expect(response.status).toBe(200);

347+

const body = await response.text();

348+

expect(body).toContain('"name":"read"');

349+

expect(body).toContain("latest-missing-progress-target.txt");

350+

expect(body).not.toContain("older-progress-target.txt");

351+

});

352+231353

it("prefers path-like refs over generic quoted keys in prompts", async () => {

232354

const server = await startQaMockOpenAiServer({

233355

host: "127.0.0.1",

@@ -1674,7 +1796,7 @@ describe("qa mock openai server", () => {

16741796

content: [

16751797

{

16761798

type: "input_text",

1677-

text: "@qa-sut:matrix-qa.test reply with only this exact marker: MATRIX_QA_CANARY_TEST",

1799+

text: "@qa-sut.example.test reply with only this exact marker: QA_CANARY_TEST",

16781800

},

16791801

],

16801802

},

@@ -1695,7 +1817,7 @@ describe("qa mock openai server", () => {

16951817

expect(await response.json()).toMatchObject({

16961818

output: [

16971819

{

1698-

content: [{ text: "MATRIX_QA_CANARY_TEST" }],

1820+

content: [{ text: "QA_CANARY_TEST" }],

16991821

},

17001822

],

17011823

});

@@ -1710,8 +1832,8 @@ describe("qa mock openai server", () => {

17101832

await server.stop();

17111833

});

171218341713-

const matrixPrompt =

1714-

"@qa-sut:matrix-qa.test Image generation check: generate a QA lighthouse image and summarize it in one short sentence.";

1835+

const channelPrompt =

1836+

"@qa-sut.example.test Image generation check: generate a QA lighthouse image and summarize it in one short sentence.";

17151837

const genericPrompt =

17161838

"Continue with the QA scenario plan and report worked, failed, and blocked items.";

17171839

@@ -1722,7 +1844,7 @@ describe("qa mock openai server", () => {

17221844

},

17231845

body: JSON.stringify({

17241846

stream: false,

1725-

input: [makeUserInput(matrixPrompt), makeUserInput(genericPrompt)],

1847+

input: [makeUserInput(channelPrompt), makeUserInput(genericPrompt)],

17261848

}),

17271849

});

17281850

@@ -1745,7 +1867,7 @@ describe("qa mock openai server", () => {

17451867

body: JSON.stringify({

17461868

stream: false,

17471869

input: [

1748-

makeUserInput(matrixPrompt),

1870+

makeUserInput(channelPrompt),

17491871

makeUserInput(genericPrompt),

17501872

{

17511873

type: "function_call",