test: repair broad qa surface regressions · openclaw/openclaw@8330582
vincentkoc
·
2026-05-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -179,6 +179,11 @@ describe("openrouter speech provider", () => {
|
179 | 179 | dispatcherPolicy: undefined, |
180 | 180 | }); |
181 | 181 | expect(result.audioBuffer).toEqual(Buffer.from([1, 2, 3])); |
| 182 | +expect(readProviderBinaryResponseMock).toHaveBeenCalledWith( |
| 183 | +expect.any(Response), |
| 184 | +"OpenRouter TTS API error", |
| 185 | +"audio", |
| 186 | +); |
182 | 187 | expect(result.outputFormat).toBe("mp3"); |
183 | 188 | expect(result.fileExtension).toBe(".mp3"); |
184 | 189 | expect(result.voiceCompatible).toBe(true); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -84,6 +84,42 @@ export function createQaRunnerRuntime(): PluginRuntime {
|
84 | 84 | }); |
85 | 85 | }, |
86 | 86 | }, |
| 87 | +turn: { |
| 88 | +async runAssembled( |
| 89 | +params: Parameters<PluginRuntime["channel"]["turn"]["runAssembled"]>[0], |
| 90 | +) { |
| 91 | +const sessionKey = |
| 92 | +typeof params.ctxPayload.SessionKey === "string" |
| 93 | + ? params.ctxPayload.SessionKey |
| 94 | + : params.routeSessionKey; |
| 95 | +await params.recordInboundSession({ |
| 96 | +storePath: params.storePath, |
| 97 | + sessionKey, |
| 98 | +ctx: params.ctxPayload, |
| 99 | +onRecordError: params.record?.onRecordError ?? (() => undefined), |
| 100 | +}); |
| 101 | +const dispatchResult = await params.dispatchReplyWithBufferedBlockDispatcher({ |
| 102 | +ctx: params.ctxPayload, |
| 103 | +cfg: params.cfg, |
| 104 | +dispatcherOptions: { |
| 105 | + ...params.dispatcherOptions, |
| 106 | +deliver: async (payload, info) => { |
| 107 | +await params.delivery.deliver(payload, info); |
| 108 | +}, |
| 109 | +onError: params.delivery.onError, |
| 110 | +}, |
| 111 | +replyOptions: params.replyOptions, |
| 112 | +replyResolver: params.replyResolver, |
| 113 | +}); |
| 114 | +return { |
| 115 | +admission: params.admission ?? { kind: "dispatch" }, |
| 116 | +dispatched: true, |
| 117 | +ctxPayload: params.ctxPayload, |
| 118 | +routeSessionKey: params.routeSessionKey, |
| 119 | + dispatchResult, |
| 120 | +}; |
| 121 | +}, |
| 122 | +}, |
87 | 123 | }, |
88 | 124 | } as unknown as PluginRuntime; |
89 | 125 | } |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1519,7 +1519,7 @@ describe("embedded attempt harness pinning", () => {
|
1519 | 1519 | }); |
1520 | 1520 | }); |
1521 | 1521 | |
1522 | | -it("routes explicit OpenAI PI runs with Codex OAuth through the legacy Codex auth transport", async () => { |
| 1522 | +it("routes explicit OpenAI PI runs with Codex OAuth through PI and the legacy Codex auth transport", async () => { |
1523 | 1523 | const sessionEntry: SessionEntry = { |
1524 | 1524 | sessionId: "explicit-pi-codex-oauth-session", |
1525 | 1525 | updatedAt: Date.now(), |
@@ -1571,7 +1571,8 @@ describe("embedded attempt harness pinning", () => {
|
1571 | 1571 | expectMockArgFields(runEmbeddedPiAgentMock, { |
1572 | 1572 | provider: "openai-codex", |
1573 | 1573 | model: "gpt-5.4", |
1574 | | -agentHarnessId: undefined, |
| 1574 | +agentHarnessId: "pi", |
| 1575 | +agentHarnessRuntimeOverride: "pi", |
1575 | 1576 | authProfileId: "openai-codex:work", |
1576 | 1577 | authProfileIdSource: "user", |
1577 | 1578 | }); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -8,6 +8,7 @@ import { ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json.js";
|
8 | 8 | vi.mock("./auth-profiles/external-auth.js", () => ({ |
9 | 9 | overlayExternalAuthProfiles: <T>(store: T) => store, |
10 | 10 | shouldPersistExternalAuthProfile: () => true, |
| 11 | +syncPersistedExternalCliAuthProfiles: <T>(store: T) => store, |
11 | 12 | })); |
12 | 13 | |
13 | 14 | type AuthProfileStore = Parameters<typeof saveAuthProfileStore>[0]; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -364,10 +364,10 @@ describe("resolveModel forward-compat errors and overrides", () => {
|
364 | 364 | it("does not override when no provider config exists", () => { |
365 | 365 | mockDiscoveredModel(discoverModels, { |
366 | 366 | provider: "anthropic", |
367 | | -modelId: "claude-sonnet-4-5", |
| 367 | +modelId: "claude-sonnet-4-6", |
368 | 368 | templateModel: { |
369 | | -id: "claude-sonnet-4-5", |
370 | | -name: "Claude Sonnet 4.5", |
| 369 | +id: "claude-sonnet-4-6", |
| 370 | +name: "Claude Sonnet 4.6", |
371 | 371 | provider: "anthropic", |
372 | 372 | api: "anthropic-messages", |
373 | 373 | baseUrl: "https://api.anthropic.com", |
@@ -379,7 +379,7 @@ describe("resolveModel forward-compat errors and overrides", () => {
|
379 | 379 | }, |
380 | 380 | }); |
381 | 381 | |
382 | | -const result = resolveModelForTest("anthropic", "claude-sonnet-4-5", "/tmp/agent"); |
| 382 | +const result = resolveModelForTest("anthropic", "claude-sonnet-4-6", "/tmp/agent"); |
383 | 383 | expect(result.error).toBeUndefined(); |
384 | 384 | expect(result.model?.baseUrl).toBe("https://api.anthropic.com"); |
385 | 385 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。