mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
test: fix current main CI baselines (#120080)
* test: fix current main CI baselines * test(qa-lab): preserve provider mode literals
This commit is contained in:
@@ -46,7 +46,7 @@ describe("qa live timeout policy", () => {
|
||||
fallbackModel: "claude-cli/claude-opus-4-8",
|
||||
expectedTimeoutMs: 240_000,
|
||||
},
|
||||
])("$title", ({ mode, model, fallbackModel, expectedTimeoutMs }) => {
|
||||
] as const)("$title", ({ mode, model, fallbackModel, expectedTimeoutMs }) => {
|
||||
expect(
|
||||
resolveQaLiveTurnTimeoutMs(
|
||||
{
|
||||
|
||||
@@ -15,21 +15,20 @@ beforeEach(() => {
|
||||
});
|
||||
|
||||
describe("buildContextEngineCompactionSessionTarget", () => {
|
||||
it("uses the marker session id as the fallback compatibility key", () => {
|
||||
it("leaves the key absent when a marker has no stored mapping", () => {
|
||||
expect(
|
||||
buildContextEngineCompactionSessionTarget({
|
||||
sessionFile: "sqlite:main:marker-session:/tmp/sessions.json",
|
||||
sessionId: "stale-outer-session",
|
||||
}),
|
||||
).toMatchObject({
|
||||
).toEqual({
|
||||
agentId: "main",
|
||||
sessionId: "marker-session",
|
||||
sessionKey: "marker-session",
|
||||
storePath: "/tmp/sessions.json",
|
||||
});
|
||||
});
|
||||
|
||||
it("uses the configured default agent for an unscoped compatibility key", () => {
|
||||
it("uses the configured default agent without inventing a session key", () => {
|
||||
expect(
|
||||
buildContextEngineCompactionSessionTarget({
|
||||
config: {
|
||||
@@ -39,15 +38,14 @@ describe("buildContextEngineCompactionSessionTarget", () => {
|
||||
sessionFile: "compat-session",
|
||||
sessionId: "compat-session",
|
||||
}),
|
||||
).toMatchObject({
|
||||
).toEqual({
|
||||
agentId: "worker",
|
||||
sessionId: "compat-session",
|
||||
sessionKey: "compat-session",
|
||||
storePath: "/tmp/worker/sessions.json",
|
||||
});
|
||||
});
|
||||
|
||||
it("uses an adopted target session id when no session key is available", () => {
|
||||
it("preserves an adopted session id without inventing a session key", () => {
|
||||
expect(
|
||||
buildContextEngineCompactionSessionTarget({
|
||||
sessionFile: "",
|
||||
@@ -58,10 +56,9 @@ describe("buildContextEngineCompactionSessionTarget", () => {
|
||||
storePath: "/tmp/sessions.json",
|
||||
},
|
||||
}),
|
||||
).toMatchObject({
|
||||
).toEqual({
|
||||
agentId: "main",
|
||||
sessionId: "adopted-session",
|
||||
sessionKey: "adopted-session",
|
||||
storePath: "/tmp/sessions.json",
|
||||
});
|
||||
});
|
||||
|
||||
@@ -186,6 +186,7 @@ describe("runEmbeddedAgent usage reporting", () => {
|
||||
prompt: "hello",
|
||||
timeoutMs: 30000,
|
||||
runId: "run-gateway-bind",
|
||||
config: {},
|
||||
allowGatewaySubagentBinding: true,
|
||||
});
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
import { refreshChatAvatar } from "./chat-avatar.ts";
|
||||
import * as chatCommandExecutor from "./chat-command-executor.ts";
|
||||
import type { executeSlashCommand } from "./chat-command-executor.ts";
|
||||
import { makeChatHost, makeRequestMock } from "./chat-host.test-fixture.ts";
|
||||
import { makeChatHost, makeRequestMock } from "./chat-host.test-support.ts";
|
||||
import type { ChatHost } from "./chat-send-contract.ts";
|
||||
import {
|
||||
getPendingChatPickerPatch,
|
||||
|
||||
Reference in New Issue
Block a user