From 2ab883a7b8a2dd062bd50f305966dacb686cdd6e Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Wed, 17 Jun 2026 15:15:51 +0200 Subject: [PATCH] fix(testing): use UUIDs for Parallels background scripts --- scripts/e2e/parallels/guest-transports.ts | 2 +- test/scripts/parallels-smoke-model.test.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/e2e/parallels/guest-transports.ts b/scripts/e2e/parallels/guest-transports.ts index 52c8f9f5597..734366346f1 100644 --- a/scripts/e2e/parallels/guest-transports.ts +++ b/scripts/e2e/parallels/guest-transports.ts @@ -70,7 +70,7 @@ export async function runWindowsBackgroundPowerShell( const pollIntervalMs = Math.max(1, Math.floor(options.pollIntervalMs ?? 5_000)); const runCommand = options.runCommand ?? run; const safeLabel = options.label.replaceAll(/[^A-Za-z0-9_-]/g, "-"); - const nonce = `${safeLabel}-${Date.now()}-${Math.floor(Math.random() * 100000)}`; + const nonce = `${safeLabel}-${randomUUID()}`; const fileBase = `openclaw-parallels-${nonce}`; const pathsScript = `$base = Join-Path $env:TEMP ${psSingleQuote(fileBase)} $scriptPath = "$base.ps1" diff --git a/test/scripts/parallels-smoke-model.test.ts b/test/scripts/parallels-smoke-model.test.ts index bcb453c6690..776b5848084 100644 --- a/test/scripts/parallels-smoke-model.test.ts +++ b/test/scripts/parallels-smoke-model.test.ts @@ -1045,6 +1045,7 @@ if (isPrlctl) { expect(guestTransports).toContain("guestScriptName"); expect(guestTransports).not.toContain("Date.now()}.sh"); expect(guestTransports).not.toContain("Date.now()}.ps1"); + expect(guestTransports).not.toContain("Math.random()"); }); it("hardens restored macOS install lanes", () => {