Skip to content

Commit 2ce01f5

Browse files
committed
test(qa): respect plugin boundaries and atomic media delivery
1 parent 0fd7e85 commit 2ce01f5

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

‎extensions/qa-lab/src/scenario-catalog.test.ts‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import fs from "node:fs";
33
import os from "node:os";
44
import path from "node:path";
55
import { describe, expect, it } from "vitest";
6-
import { OpenClawSchema } from "../../../src/config/zod-schema.js";
76
import { resolveQaParityPackScenarioIds } from "./agentic-parity.js";
87
import { resolveQaRepoPath } from "./repo-path.js";
98
import {
@@ -274,14 +273,14 @@ describe("qa scenario catalog", () => {
274273
);
275274

276275
expect(gatewayConfigPatch).toMatchObject(expectedPatch);
276+
expect(gatewayConfig).toMatchObject(expectedPatch);
277277
for (const retiredPath of retiredPaths) {
278278
expect(gatewayConfigPatch).not.toHaveProperty(retiredPath);
279279
}
280-
expect(OpenClawSchema.safeParse(gatewayConfig).success).toBe(true);
281280
},
282281
);
283282

284-
it("keeps session memory ranking's runtime config patch schema-valid", () => {
283+
it("keeps session memory ranking's runtime config patch canonical", () => {
285284
const scenario = readQaScenarioById("session-memory-ranking");
286285
const patchConfigAction = scenario.execution.flow?.steps
287286
.flatMap((step) => step.actions)
@@ -307,7 +306,6 @@ describe("qa scenario catalog", () => {
307306
},
308307
});
309308
expect(patch).not.toHaveProperty("memory.search.query.hybrid");
310-
expect(OpenClawSchema.safeParse(patch).success).toBe(true);
311309
});
312310

313311
it("loads native test execution scenarios from YAML", () => {

‎src/agents/agent-command.live-model-switch.test.ts‎

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2437,14 +2437,19 @@ describe("agentCommand – LiveSessionModelSwitchError retry", () => {
24372437
mockCallArg(state.deliverAgentCommandResultMock),
24382438
"delivery params",
24392439
);
2440-
expect(requireRecord(deliveryParams.result, "delivery result").payloads).toEqual([
2441-
{ text: "ready" },
2442-
{ mediaUrls: ["/tmp/missing.png"], trustedLocalMedia: true },
2443-
]);
2444-
expect(deliveryParams.payloads).toEqual([
2445-
{ text: "ready" },
2446-
{ mediaUrls: ["/tmp/missing.png"], trustedLocalMedia: true },
2447-
]);
2440+
const expectedRecoveryPayloads = [
2441+
{
2442+
text: "ready",
2443+
mediaUrl: "/tmp/missing.png",
2444+
mediaUrls: ["/tmp/missing.png"],
2445+
audioAsVoice: undefined,
2446+
trustedLocalMedia: true,
2447+
},
2448+
];
2449+
expect(requireRecord(deliveryParams.result, "delivery result").payloads).toEqual(
2450+
expectedRecoveryPayloads,
2451+
);
2452+
expect(deliveryParams.payloads).toEqual(expectedRecoveryPayloads);
24482453
expect(
24492454
state.persistSessionEntryMock.mock.calls.some((call) => {
24502455
const params = call[0] as { entry?: SessionEntry };

0 commit comments

Comments
 (0)