diff --git a/scripts/lib/vitest-cli-mode.mts b/scripts/lib/vitest-cli-mode.mts index b3b65a98ffb2..30046ce883b6 100644 --- a/scripts/lib/vitest-cli-mode.mts +++ b/scripts/lib/vitest-cli-mode.mts @@ -27,6 +27,7 @@ const VITEST_OPTIONS_WITH_VALUE = new Set([ "--project", "--reporter", "--reporters", + "--repeats", "--retry", "--root", "-r", diff --git a/src/agents/embedded-agent-runner/run/attempt-execution-phase.test.ts b/src/agents/embedded-agent-runner/run/attempt-execution-phase.test.ts index 937300c901cb..8b0d495c2580 100644 --- a/src/agents/embedded-agent-runner/run/attempt-execution-phase.test.ts +++ b/src/agents/embedded-agent-runner/run/attempt-execution-phase.test.ts @@ -1,3 +1,4 @@ +import { randomUUID } from "node:crypto"; import { createAssistantMessageEventStream, type Message } from "openclaw/plugin-sdk/llm"; import { Type } from "typebox"; import { afterEach, beforeEach, describe, expect, it, onTestFinished, vi } from "vitest"; @@ -319,7 +320,7 @@ describe("runEmbeddedAttemptExecutionPhase", () => { model: testModel, modelId: testModel.id, provider: testModel.provider, - sessionId: `async-fragment-${stopReason}-${cacheRead}-${completion}`, + sessionId: randomUUID(), }); Object.assign(runtime, { anthropicPayloadLogger: undefined, diff --git a/test/scripts/run-vitest.test.ts b/test/scripts/run-vitest.test.ts index 607ca985dc44..225d1530b8b0 100644 --- a/test/scripts/run-vitest.test.ts +++ b/test/scripts/run-vitest.test.ts @@ -753,6 +753,10 @@ registerHooks({resolve(specifier, context, nextResolve) { ["run", "test/scripts/run-vitest.test.ts", "-t", "src"], ["test/scripts/run-vitest.test.ts", "--", "-t", "src"], ], + [ + ["run", "test/scripts/run-vitest.test.ts", "--repeats", "19"], + ["test/scripts/run-vitest.test.ts", "--", "--repeats", "19"], + ], ])("keeps option value %j out of project target classification", (argv, expected) => { expect(resolveTestProjectsDelegationArgs(argv)).toEqual(expected); });