From 4a14e9436e4f2a050c74bd5e003065cd7228d801 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 3 Mar 2026 07:19:16 +0000 Subject: [PATCH] prevent async lock gen race condition in mixed case path tests (#8202) Co-authored-by: Claude Opus 4.6 --- cli/test/mixed_case_paths.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cli/test/mixed_case_paths.test.ts b/cli/test/mixed_case_paths.test.ts index ffbb3f21d4..d85f81cc83 100644 --- a/cli/test/mixed_case_paths.test.ts +++ b/cli/test/mixed_case_paths.test.ts @@ -64,6 +64,9 @@ async function createScript( language: "bun", is_template: false, kind: "script", + // Provide a non-empty lock to prevent async lock generation by the backend + // worker, which causes flaky tests due to race conditions on Windows CI. + lock: "\n", schema: { $schema: "https://json-schema.org/draft/2020-12/schema", type: "object", @@ -255,6 +258,12 @@ async function verifyNoDiffOnPull(backend: any, tempDir: string): Promise const output = parseJsonFromCLIOutput(pullResult.stdout); const changes = output.changes || []; + if (changes.length > 0) { + console.error( + `Unexpected changes on dry-run pull (expected 0, got ${changes.length}):`, + JSON.stringify(changes, null, 2) + ); + } expect(changes.length).toEqual(0); }