Skip to content

Commit 18f5fa5

Browse files
test(desktop): reproduce #28714, shell env cache miss reported as prepared
A cache miss in installIntoProcess yields true before anything reaches process.env, so the server skips its own PATH hydration. These tests reproduce #28714 and fail on main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 1d626d0 commit 18f5fa5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎apps/desktop/src/shell/DesktopShellEnvironment.test.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { assert, describe, it } from "@effect/vitest";
44
import * as HostProcess from "@t3tools/shared/HostProcess";
55
import * as Effect from "effect/Effect";
66
import * as Deferred from "effect/Deferred";
7+
import * as Fiber from "effect/Fiber";
78
import * as FileSystem from "effect/FileSystem";
89
import * as Layer from "effect/Layer";
910
import * as Logger from "effect/Logger";
@@ -164,6 +165,10 @@ describe("DesktopShellEnvironment", () => {
164165
const startup = yield* service.installIntoProcess.pipe(Effect.forkChild);
165166
yield* Deferred.await(started);
166167
assert.isDefined(startup.pollUnsafe());
168+
assert.isFalse(
169+
yield* Fiber.join(startup),
170+
"nothing was installed yet, so the server must hydrate PATH itself",
171+
);
167172
yield* Deferred.succeed(release, undefined);
168173
return yield* service.awaitDiscovery;
169174
}),
@@ -231,7 +236,7 @@ describe("DesktopShellEnvironment", () => {
231236
}),
232237
use: (service) =>
233238
Effect.gen(function* () {
234-
yield* service.installIntoProcess;
239+
assert.isTrue(yield* service.installIntoProcess);
235240
yield* service.installIntoProcess;
236241
assert.equal(env.PATH, "/old/bin:/usr/bin:/launcher/bin");
237242
assert.equal(env.SSH_AUTH_SOCK, "/current-session.sock");

0 commit comments

Comments
 (0)