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

推荐订阅源

I
InfoQ
博客园_首页
美团技术团队
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
J
Java Code Geeks
T
Tailwind CSS Blog
Jina AI
Jina AI
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
G
Google Developers Blog
爱范儿
爱范儿
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
宝玉的分享
宝玉的分享
小众软件
小众软件
MongoDB | Blog
MongoDB | Blog
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
V
Visual Studio Blog
博客园 - 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
fix(qa): allow async runtime fixture starts · openclaw/op...
vincentkoc · 2026-06-24 · via Recent Commits to openclaw:main

@@ -268,6 +268,115 @@ describe("runtime tool fixture", () => {

268268

expect(details).toContain("read live provider failure planned args");

269269

});

270270271+

it("allows async live runtime tool fixtures to prove the happy path with the planned call", async () => {

272+

const env = await makeEnv();

273+

await writeQaSessionTranscript(env, "agent:qa:runtime-tool:image_generate:happy", [

274+

{

275+

role: "assistant",

276+

content: [

277+

{

278+

type: "tool_use",

279+

id: "call-image-happy",

280+

name: "image_generate",

281+

input: { prompt: "QA lighthouse runtime parity fixture" },

282+

},

283+

],

284+

},

285+

]);

286+

await writeQaSessionTranscript(env, "agent:qa:runtime-tool:image_generate:failure", [

287+

{

288+

role: "assistant",

289+

content: [

290+

{

291+

type: "tool_use",

292+

id: "call-image-failure",

293+

name: "image_generate",

294+

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

295+

},

296+

],

297+

},

298+

{

299+

role: "tool",

300+

toolName: "image_generate",

301+

tool_call_id: "call-image-failure",

302+

isError: true,

303+

content: "denied-input",

304+

},

305+

]);

306+307+

const details = await runRuntimeToolFixture(

308+

env,

309+

{

310+

toolName: "image_generate",

311+

toolCoverage: {

312+

bucket: "openclaw-dynamic-integration",

313+

expectedLayer: "openclaw-dynamic",

314+

},

315+

happyPathOutputRequired: false,

316+

},

317+

{

318+

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

319+

readEffectiveTools: vi.fn(async () => new Set(["image_generate"])),

320+

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

321+

fetchJson: vi.fn(),

322+

ensureImageGenerationConfigured: vi.fn(),

323+

},

324+

);

325+326+

expect(details).toContain(

327+

"image_generate live provider happy direct output not required for this async fixture",

328+

);

329+

expect(details).toContain("image_generate live provider failure planned args");

330+

});

331+332+

it("still requires async live runtime tool fixtures to call the happy-path tool", async () => {

333+

const env = await makeEnv();

334+

await writeQaSessionTranscript(env, "agent:qa:runtime-tool:image_generate:happy", [

335+

{ role: "assistant", content: "I can start image generation later." },

336+

]);

337+

await writeQaSessionTranscript(env, "agent:qa:runtime-tool:image_generate:failure", [

338+

{

339+

role: "assistant",

340+

content: [

341+

{

342+

type: "tool_use",

343+

id: "call-image-failure",

344+

name: "image_generate",

345+

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

346+

},

347+

],

348+

},

349+

{

350+

role: "tool",

351+

toolName: "image_generate",

352+

tool_call_id: "call-image-failure",

353+

isError: true,

354+

content: "denied-input",

355+

},

356+

]);

357+358+

await expect(

359+

runRuntimeToolFixture(

360+

env,

361+

{

362+

toolName: "image_generate",

363+

toolCoverage: {

364+

bucket: "openclaw-dynamic-integration",

365+

expectedLayer: "openclaw-dynamic",

366+

},

367+

happyPathOutputRequired: false,

368+

},

369+

{

370+

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

371+

readEffectiveTools: vi.fn(async () => new Set(["image_generate"])),

372+

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

373+

fetchJson: vi.fn(),

374+

ensureImageGenerationConfigured: vi.fn(),

375+

},

376+

),

377+

).rejects.toThrow("expected live happy-path tool call for image_generate");

378+

});

379+271380

it("requires live failure fixtures to produce failure-shaped tool output", async () => {

272381

const env = await makeEnv();

273382

await writeQaSessionTranscript(env, "agent:qa:runtime-tool:read:happy", [

@@ -445,6 +554,70 @@ describe("runtime tool fixture", () => {

445554

expect(details).toContain("mock provider happy planned args (diagnostic only)");

446555

});

447556557+

it("reports Codex-native async planned-only happy fixtures without dereferencing missing output", async () => {

558+

const env = await makeEnv({

559+

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

560+

gateway: {

561+

baseUrl: "http://127.0.0.1:1",

562+

tempRoot: "",

563+

workspaceDir: "",

564+

runtimeEnv: { OPENCLAW_QA_FORCE_RUNTIME: "codex" },

565+

call: vi.fn(),

566+

},

567+

});

568+

env.gateway.tempRoot = env.repoRoot;

569+

env.gateway.workspaceDir = env.repoRoot;

570+571+

const fetchJson = vi

572+

.fn()

573+

.mockResolvedValueOnce([])

574+

.mockResolvedValueOnce([

575+

{

576+

allInputText: "target=image_generate",

577+

plannedToolCallId: "call-image-happy",

578+

plannedToolName: "image_generate",

579+

plannedToolArgs: { prompt: "QA lighthouse runtime parity fixture" },

580+

},

581+

{

582+

allInputText: "failure target=image_generate",

583+

plannedToolCallId: "call-image-failure",

584+

plannedToolName: "image_generate",

585+

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

586+

},

587+

{

588+

allInputText: "failure target=image_generate",

589+

toolOutputCallId: "call-image-failure",

590+

toolOutput: "Error: denied-input",

591+

},

592+

]);

593+594+

const details = await runRuntimeToolFixture(

595+

env,

596+

{

597+

toolName: "image_generate",

598+

toolCoverage: {

599+

bucket: "codex-native-workspace",

600+

expectedLayer: "codex-native-workspace",

601+

reason: "Codex owns image generation natively in this fixture.",

602+

},

603+

promptSnippet: "target=image_generate",

604+

failurePromptSnippet: "failure target=image_generate",

605+

happyPathOutputRequired: false,

606+

},

607+

{

608+

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

609+

readEffectiveTools: vi.fn(async () => new Set<string>()),

610+

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

611+

fetchJson,

612+

ensureImageGenerationConfigured: vi.fn(),

613+

},

614+

);

615+616+

expect(details).toContain("codex-native-workspace image_generate");

617+

expect(details).toContain('"prompt":"QA lighthouse runtime parity fixture"');

618+

expect(details).toContain('"__qaFailureMode":"denied-input"');

619+

});

620+448621

it("requires mock runtime tool fixtures to produce tool output", async () => {

449622

const env = await makeEnv({

450623

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

@@ -492,6 +665,61 @@ describe("runtime tool fixture", () => {

492665

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

493666

});

494667668+

it("allows async mock runtime tool fixtures to prove the happy path with the planned call", async () => {

669+

const env = await makeEnv({

670+

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

671+

});

672+

const fetchJson = vi

673+

.fn()

674+

.mockResolvedValueOnce([])

675+

.mockResolvedValueOnce([

676+

{

677+

allInputText: "target=image_generate",

678+

plannedToolCallId: "call-image-happy",

679+

plannedToolName: "image_generate",

680+

plannedToolArgs: { prompt: "QA lighthouse runtime parity fixture" },

681+

},

682+

{

683+

allInputText: "failure target=image_generate",

684+

plannedToolCallId: "call-image-failure",

685+

plannedToolName: "image_generate",

686+

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

687+

},

688+

{

689+

allInputText: "failure target=image_generate",

690+

toolOutputCallId: "call-image-failure",

691+

toolOutput: "Error: denied-input",

692+

},

693+

]);

694+695+

const details = await runRuntimeToolFixture(

696+

env,

697+

{

698+

toolName: "image_generate",

699+

toolCoverage: {

700+

bucket: "openclaw-dynamic-integration",

701+

expectedLayer: "openclaw-dynamic",

702+

},

703+

promptSnippet: "target=image_generate",

704+

failurePromptSnippet: "failure target=image_generate",

705+

happyPathOutputRequired: false,

706+

},

707+

{

708+

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

709+

readEffectiveTools: vi.fn(async () => new Set(["image_generate"])),

710+

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

711+

fetchJson,

712+

ensureImageGenerationConfigured: vi.fn(),

713+

},

714+

);

715+716+

expect(details).toContain(

717+

"image_generate mock provider happy direct output not required for this async fixture",

718+

);

719+

expect(details).toContain('"prompt":"QA lighthouse runtime parity fixture"');

720+

expect(details).toContain('"__qaFailureMode":"denied-input"');

721+

});

722+495723

it("accepts mock runtime tool fixtures only after planned calls return output", async () => {

496724

const env = await makeEnv({

497725

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