The best way to control Claude Code, Codex and more from any computer or phone
fix(release): Windows CLI smoke test no longer fails on temp dir cleanup (#14553)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Theo Browne committed
Oct 1, 2026 at 00:01 UTC
41a8239849d7e6523c08edb363efdeccfb150be5
1 file changed
+13
-1
scripts/smoke-cli-archive.ts
+13
-1
@@ -15,6 +15,7 @@ import * as FileSystem from "effect/FileSystem";
15
import * as Layer from "effect/Layer";
16
import * as Logger from "effect/Logger";
17
import * as Path from "effect/Path";
18
+import * as Schedule from "effect/Schedule";
19
import * as Schema from "effect/Schema";
20
import * as Stream from "effect/Stream";
21
import { Command, Flag } from "effect/unstable/cli";
@@ -73,7 +74,18 @@ const smokeCliArchive = Effect.fn("smokeCliArchive")(function* (input: {
74
const path = yield* Path.Path;
75
const platform = yield* HostProcessPlatform;
76
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
76
- const scratch = yield* fs.makeTempDirectoryScoped({ prefix: "t3-cli-smoke-" });
77
+ const scratch = yield* fs.makeTempDirectory({ prefix: "t3-cli-smoke-" });
78
+ // Windows can keep t3.exe locked (EBUSY) for a moment after the server
79
+ // exits. A leftover scratch directory on a CI runner is harmless, so
80
+ // cleanup retries briefly and never fails a smoke test that passed.
81
+ yield* Effect.addFinalizer(() =>
82
+ fs.remove(scratch, { recursive: true }).pipe(
83
+ Effect.retry({ times: 10, schedule: Schedule.spaced("500 millis") }),
84
+ Effect.catch((error) =>
85
+ Effect.logWarning(`[cli-smoke] could not remove ${scratch}: ${error.message}`),
86
+ ),
87
+ ),
88
+ );
89
90
// On Windows the archive is a zip and the Git Bash `tar` on PATH is GNU
91
// tar; use the bsdtar Windows ships, which reads both formats.