mirror of
https://github.com/openclaw/openclaw.git
synced 2026-09-28 05:54:09 +08:00
test: repair TaskFlow retirement validation fixtures
Use the canonical ESM loader for Doctor, copy the complete isolated diagnostics closure, and keep worker-rebuild integration proof independent of host timer speed while retaining deadline coverage. Match the published native client model-list schema. Original failures were reproduced, focused proofs pass, and each correction received independent review.
This commit is contained in:
@@ -119,7 +119,9 @@ if (process.versions.bun) {
|
||||
const entryPath = fileURLToPath(new URL("../../src/entry.ts", import.meta.url));
|
||||
return runCliProcessChild({
|
||||
nodeArgs: [
|
||||
...(process.versions.bun ? ["--preload"] : ["--import", "tsx", "--import"]),
|
||||
...(process.versions.bun
|
||||
? ["--preload"]
|
||||
: ["--import", new URL("../../scripts/tsx.mjs", import.meta.url).href, "--import"]),
|
||||
loaderPath,
|
||||
entryPath,
|
||||
"doctor",
|
||||
|
||||
@@ -280,7 +280,9 @@ function handle(socket, phase, message) {
|
||||
hidden: false,
|
||||
isDefault: true,
|
||||
defaultReasoningEffort: "low",
|
||||
supportedReasoningEfforts: [{ reasoningEffort: "low" }],
|
||||
supportedReasoningEfforts: [
|
||||
{ reasoningEffort: "low", description: "Low reasoning effort" },
|
||||
],
|
||||
multiAgentVersion: "v1",
|
||||
inputModalities: ["text"],
|
||||
},
|
||||
|
||||
@@ -415,20 +415,26 @@ it("waits for a missing projection and serves the original history request", asy
|
||||
)
|
||||
.run(target.sessionId);
|
||||
|
||||
const page = await readChatHistoryPage({
|
||||
entry,
|
||||
provider: undefined,
|
||||
sessionId: target.sessionId,
|
||||
storePath: target.storePath,
|
||||
sessionAgentId: target.agentId,
|
||||
canonicalKey: target.sessionKey,
|
||||
max: 10,
|
||||
maxHistoryBytes: 100_000,
|
||||
effectiveMaxChars: 8000,
|
||||
offset: undefined,
|
||||
messageId: undefined,
|
||||
});
|
||||
expect(page.messages.map(readChatHistoryMessageId)).toEqual(["recovered"]);
|
||||
// Runtime tests own the recovery deadline; real worker startup must not spend it here.
|
||||
vi.useFakeTimers({ toFake: ["setTimeout", "clearTimeout"] });
|
||||
try {
|
||||
const page = await readChatHistoryPage({
|
||||
entry,
|
||||
provider: undefined,
|
||||
sessionId: target.sessionId,
|
||||
storePath: target.storePath,
|
||||
sessionAgentId: target.agentId,
|
||||
canonicalKey: target.sessionKey,
|
||||
max: 10,
|
||||
maxHistoryBytes: 100_000,
|
||||
effectiveMaxChars: 8000,
|
||||
offset: undefined,
|
||||
messageId: undefined,
|
||||
});
|
||||
expect(page.messages.map(readChatHistoryMessageId)).toEqual(["recovered"]);
|
||||
} finally {
|
||||
vi.useRealTimers();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ export function copySurvivorCaptureClosure(workDir: string) {
|
||||
"scripts/e2e/lib/text-file-utils.mjs",
|
||||
UPGRADE_SURVIVOR_DIAGNOSTICS_PATH,
|
||||
"scripts/e2e/lib/upgrade-survivor/backup-rollback-summary.mjs",
|
||||
"scripts/e2e/lib/upgrade-survivor/native-assignment-summary.mjs",
|
||||
"scripts/e2e/lib/upgrade-survivor/plugin-policy-summary.mjs",
|
||||
"scripts/lib/release-version.mjs",
|
||||
]) {
|
||||
|
||||
Reference in New Issue
Block a user