Open History to see the last commit
1import { OpenCodeSettings, ProviderInstanceId, TextGenerationError } from "@t3tools/contracts";
2import * as NodeServices from "@effect/platform-node/NodeServices";
3import { it } from "@effect/vitest";
4import * as Duration from "effect/Duration";
5import * as Effect from "effect/Effect";
6import * as Layer from "effect/Layer";
7import * as Schema from "effect/Schema";
8import * as TestClock from "effect/testing/TestClock";
9import * as NetService from "@t3tools/shared/Net";
10import { beforeEach, expect } from "vite-plus/test";
11
12import * as ServerConfig from "../config.ts";
13import * as OpenCodeRuntime from "../provider/opencodeRuntime.ts";
14import * as OpenCodeServerOwner from "../provider/OpenCodeServerOwner.ts";
15import * as OpenCodeTextGeneration from "./OpenCodeTextGeneration.ts";
16import * as TextGeneration from "./TextGeneration.ts";
17
18const runtimeMock = {
19 state: {
20 startCalls: [] as string[],
21 promptUrls: [] as string[],
22 promptParts: [] as ReadonlyArray<unknown>[],
23 authHeaders: [] as Array<string | null>,
24 closeCalls: [] as string[],
25 sessionCreateCalls: 0,
26 connectionError: undefined as Error | undefined,
27 sessionCreateError: undefined as unknown,
28 sessionResult: undefined as { data?: { id: string } } | undefined,
29 promptRequestError: undefined as unknown,
30 promptResult: undefined as
31 | { data?: { info?: { error?: unknown }; parts?: Array<unknown> } }
32 | undefined,
33 },
34 reset() {
35 this.state.startCalls.length = 0;
36 this.state.promptUrls.length = 0;
37 this.state.promptParts.length = 0;
38 this.state.authHeaders.length = 0;
39 this.state.closeCalls.length = 0;
40 this.state.sessionCreateCalls = 0;
41 this.state.connectionError = undefined;
42 this.state.sessionCreateError = undefined;
43 this.state.sessionResult = undefined;
44 this.state.promptRequestError = undefined;
45 this.state.promptResult = undefined;
46 },
47};
48
49const OpenCodeRuntimeTestDouble: OpenCodeRuntime.OpenCodeRuntimeShape = {
50 startOpenCodeServerProcess: ({ binaryPath, serverPassword, environment }) =>
51 Effect.gen(function* () {
52 const index = runtimeMock.state.startCalls.length + 1;
53 const url = `http://127.0.0.1:${4_300 + index}`;
54 runtimeMock.state.startCalls.push(binaryPath);
55 // The production runtime binds server lifetime to the caller's scope.
56 // Mirror that here so the closeCalls probe observes scope close.
57 yield* Effect.addFinalizer(() =>
58 Effect.sync(() => {
59 runtimeMock.state.closeCalls.push(url);
60 }),
61 );
62 const effectiveServerPassword = OpenCodeRuntime.resolveOpenCodeServerPassword({
63 external: false,
64 ...(serverPassword !== undefined ? { serverPassword } : {}),
65 ...(environment !== undefined ? { environment } : {}),
66 });
67 return {
68 url,
69 ...(effectiveServerPassword !== undefined
70 ? { serverPassword: effectiveServerPassword }
71 : {}),
72 version: "1.14.19",
73 isRunning: Effect.succeed(true),
74 exitCode: Effect.never,
75 };
76 }),
77 connectToOpenCodeServer: ({ serverUrl, serverPassword }) =>
78 runtimeMock.state.connectionError
79 ? Effect.fail(
80 new OpenCodeRuntime.OpenCodeRuntimeError({
81 operation: "global.health",
82 detail: runtimeMock.state.connectionError.message,
83 cause: runtimeMock.state.connectionError,
84 }),
85 )
86 : Effect.succeed({
87 url: serverUrl ?? "http://127.0.0.1:4301",
88 ...(serverPassword ? { serverPassword } : {}),
89 version: "1.14.19",
90 exitCode: null,
91 external: Boolean(serverUrl),
92 }),
93 runOpenCodeCommand: () => Effect.succeed({ stdout: "", stderr: "", code: 0 }),
94 createOpenCodeSdkClient: ({ baseUrl, serverPassword }) =>
95 ({
96 session: {
97 create: async () => {
98 runtimeMock.state.sessionCreateCalls += 1;
99 if (runtimeMock.state.sessionCreateError !== undefined) {
100 throw runtimeMock.state.sessionCreateError;
101 }
102 return runtimeMock.state.sessionResult ?? { data: { id: `${baseUrl}/session` } };
103 },
104 prompt: async (input: { readonly parts: ReadonlyArray<unknown> }) => {
105 runtimeMock.state.promptUrls.push(baseUrl);
106 runtimeMock.state.promptParts.push(input.parts);
107 runtimeMock.state.authHeaders.push(
108 serverPassword ? `Basic ${btoa(`opencode:${serverPassword}`)}` : null,
109 );
110 if (runtimeMock.state.promptRequestError !== undefined) {
111 throw runtimeMock.state.promptRequestError;
112 }
113 return (
114 runtimeMock.state.promptResult ?? {
115 data: {
116 parts: [
117 {
118 type: "text",
119 text: JSON.stringify({
120 subject: "Improve OpenCode reuse",
121 body: "Reuse one server for the full action.",
122 }),
123 },
124 ],
125 },
126 }
127 );
128 },
129 },
130 }) as unknown as ReturnType<OpenCodeRuntime.OpenCodeRuntimeShape["createOpenCodeSdkClient"]>,
131 loadOpenCodeInventory: () =>
132 Effect.fail(
133 new OpenCodeRuntime.OpenCodeRuntimeError({
134 operation: "loadOpenCodeInventory",
135 detail: "OpenCodeRuntimeTestDouble.loadOpenCodeInventory not used in this test",
136 cause: null,
137 }),
138 ),
139 loadOpenCodeSkills: () => Effect.succeed([]),
140 loadInventoryFromCli: () =>
141 Effect.fail(
142 new OpenCodeRuntime.OpenCodeRuntimeError({
143 operation: "loadInventoryFromCli",
144 detail: "OpenCodeRuntimeTestDouble.loadInventoryFromCli not used in this test",
145 cause: null,
146 }),
147 ),
148 loadSkillsFromCli: () => Effect.succeed([]),
149};
150
151const DEFAULT_TEST_MODEL_SELECTION = {
152 instanceId: ProviderInstanceId.make("opencode"),
153 model: "openai/gpt-5",
154};
155const DEFAULT_COMMIT_MESSAGE_INPUT = {
156 cwd: process.cwd(),
157 branch: "feature/opencode-reuse",
158 stagedSummary: "M README.md",
159 stagedPatch: "diff --git a/README.md b/README.md",
160 modelSelection: DEFAULT_TEST_MODEL_SELECTION,
161};
162
163const OPENCODE_TEXT_GENERATION_IDLE_TTL_MS = 30_000;
164
165const layerOpenCodeTextGenerationTest = Layer.succeed(
166 OpenCodeRuntime.OpenCodeRuntime,
167 OpenCodeRuntimeTestDouble,
168).pipe(
169 Layer.provideMerge(
170 ServerConfig.ServerConfig.layerTest(process.cwd(), {
171 prefix: "t3code-opencode-text-generation-test-",
172 }),
173 ),
174 Layer.provideMerge(NetService.layer),
175 Layer.provideMerge(NodeServices.layer),
176);
177
178const layerOpenCodeTextGenerationExistingServerTest = Layer.succeed(
179 OpenCodeRuntime.OpenCodeRuntime,
180 OpenCodeRuntimeTestDouble,
181).pipe(
182 Layer.provideMerge(
183 ServerConfig.ServerConfig.layerTest(process.cwd(), {
184 prefix: "t3code-opencode-text-generation-existing-server-test-",
185 }),
186 ),
187 Layer.provideMerge(NetService.layer),
188 Layer.provideMerge(NodeServices.layer),
189);
190
191const DEFAULT_OPENCODE_SETTINGS = Schema.decodeSync(OpenCodeSettings)({
192 binaryPath: "fake-opencode",
193});
194const LOCAL_AUTH_OPENCODE_SETTINGS = Schema.decodeSync(OpenCodeSettings)({
195 binaryPath: "fake-opencode",
196 serverPassword: "secret-password",
197});
198const EXISTING_SERVER_OPENCODE_SETTINGS = Schema.decodeSync(OpenCodeSettings)({
199 binaryPath: "fake-opencode",
200 serverUrl: "http://127.0.0.1:9999",
201 serverPassword: "secret-password",
202});
203const EXTERNAL_SERVER_WITHOUT_AUTH_OPENCODE_SETTINGS = Schema.decodeSync(OpenCodeSettings)({
204 binaryPath: "fake-opencode",
205 serverUrl: "http://127.0.0.1:9999",
206});
207
208function withOpenCodeTextGeneration<A, E, R>(
209 settings: OpenCodeSettings,
210 effectFn: (textGeneration: TextGeneration.TextGeneration["Service"]) => Effect.Effect<A, E, R>,
211 environment?: NodeJS.ProcessEnv,
212) {
213 return Effect.gen(function* () {
214 const serverOwner = yield* OpenCodeServerOwner.make({
215 binaryPath: settings.binaryPath,
216 directory: process.cwd(),
217 ...(settings.serverPassword ? { serverPassword: settings.serverPassword } : {}),
218 ...(environment ? { environment } : {}),
219 });
220 const textGeneration = yield* OpenCodeTextGeneration.makeOpenCodeTextGeneration(settings).pipe(
221 Effect.provideService(OpenCodeServerOwner.OpenCodeServerOwner, serverOwner),
222 );
223 return yield* effectFn(textGeneration);
224 }).pipe(Effect.scoped);
225}
226
227beforeEach(() => {
228 runtimeMock.reset();
229});
230
231const advanceIdleClock = Effect.gen(function* () {
232 yield* Effect.yieldNow;
233 yield* TestClock.adjust(Duration.millis(OPENCODE_TEXT_GENERATION_IDLE_TTL_MS + 1));
234 yield* Effect.yieldNow;
235});
236
237it.layer(layerOpenCodeTextGenerationTest)("OpenCodeTextGeneration", (it) => {
238 it.effect("excludes generic files from thread title generation", () =>
239 withOpenCodeTextGeneration(DEFAULT_OPENCODE_SETTINGS, (textGeneration) =>
240 Effect.gen(function* () {
241 runtimeMock.state.promptResult = {
242 data: {
243 parts: [{ type: "text", text: '{"title":"Review uploaded report"}' }],
244 },
245 };
246
247 yield* textGeneration.generateThreadTitle({
248 cwd: process.cwd(),
249 message: "Review these attachments.",
250 modelSelection: DEFAULT_TEST_MODEL_SELECTION,
251 attachments: [
252 {
253 type: "image",
254 id: "thread-image-attachment",
255 name: "screenshot.png",
256 mimeType: "image/png",
257 sizeBytes: 3,
258 },
259 {
260 type: "file",
261 id: "thread-report-attachment-pdf",
262 name: "report.pdf",
263 mimeType: "application/pdf",
264 sizeBytes: 42,
265 },
266 ],
267 });
268
269 expect(runtimeMock.state.promptParts[0]).toEqual([
270 expect.objectContaining({ type: "text" }),
271 expect.objectContaining({ type: "file", filename: "screenshot.png" }),
272 ]);
273 }),
274 ),
275 );
276
277 it.effect("passes configured authentication to a locally spawned server", () =>
278 withOpenCodeTextGeneration(LOCAL_AUTH_OPENCODE_SETTINGS, (textGeneration) =>
279 Effect.gen(function* () {
280 yield* textGeneration.generateCommitMessage(DEFAULT_COMMIT_MESSAGE_INPUT);
281
282 expect(runtimeMock.state.startCalls).toEqual(["fake-opencode"]);
283 expect(runtimeMock.state.authHeaders).toEqual([
284 `Basic ${btoa("opencode:secret-password")}`,
285 ]);
286 }),
287 ),
288 );
289
290 it.effect("uses an environment-only password for a locally spawned server", () =>
291 withOpenCodeTextGeneration(
292 DEFAULT_OPENCODE_SETTINGS,
293 (textGeneration) =>
294 Effect.gen(function* () {
295 yield* textGeneration.generateCommitMessage(DEFAULT_COMMIT_MESSAGE_INPUT);
296
297 expect(runtimeMock.state.authHeaders).toEqual([
298 `Basic ${btoa("opencode:environment-password")}`,
299 ]);
300 }),
301 { OPENCODE_SERVER_PASSWORD: "environment-password" },
302 ),
303 );
304
305 it.effect("uses settings auth when the local environment password differs", () =>
306 withOpenCodeTextGeneration(
307 LOCAL_AUTH_OPENCODE_SETTINGS,
308 (textGeneration) =>
309 Effect.gen(function* () {
310 yield* textGeneration.generateCommitMessage(DEFAULT_COMMIT_MESSAGE_INPUT);
311
312 expect(runtimeMock.state.authHeaders).toEqual([
313 `Basic ${btoa("opencode:secret-password")}`,
314 ]);
315 }),
316 { OPENCODE_SERVER_PASSWORD: "environment-password" },
317 ),
318 );
319
320 it.effect("reuses a warm server across back-to-back requests and closes it after idling", () =>
321 withOpenCodeTextGeneration(DEFAULT_OPENCODE_SETTINGS, (textGeneration) =>
322 Effect.gen(function* () {
323 yield* textGeneration.generateCommitMessage({
324 cwd: process.cwd(),
325 branch: "feature/opencode-reuse",
326 stagedSummary: "M README.md",
327 stagedPatch: "diff --git a/README.md b/README.md",
328 modelSelection: DEFAULT_TEST_MODEL_SELECTION,
329 });
330 yield* textGeneration.generateCommitMessage({
331 cwd: process.cwd(),
332 branch: "feature/opencode-reuse",
333 stagedSummary: "M README.md",
334 stagedPatch: "diff --git a/README.md b/README.md",
335 modelSelection: DEFAULT_TEST_MODEL_SELECTION,
336 });
337
338 expect(runtimeMock.state.startCalls).toEqual(["fake-opencode"]);
339 expect(runtimeMock.state.promptUrls).toEqual([
340 "http://127.0.0.1:4301",
341 "http://127.0.0.1:4301",
342 ]);
343 expect(runtimeMock.state.closeCalls).toEqual([]);
344
345 yield* advanceIdleClock;
346
347 expect(runtimeMock.state.closeCalls).toEqual(["http://127.0.0.1:4301"]);
348 }),
349 ).pipe(Effect.provide(TestClock.layer())),
350 );
351
352 it.effect("starts a new server after the warm server idles out", () =>
353 withOpenCodeTextGeneration(DEFAULT_OPENCODE_SETTINGS, (textGeneration) =>
354 Effect.gen(function* () {
355 yield* textGeneration.generateCommitMessage({
356 cwd: process.cwd(),
357 branch: "feature/opencode-reuse",
358 stagedSummary: "M README.md",
359 stagedPatch: "diff --git a/README.md b/README.md",
360 modelSelection: DEFAULT_TEST_MODEL_SELECTION,
361 });
362
363 yield* advanceIdleClock;
364
365 yield* textGeneration.generateCommitMessage({
366 cwd: process.cwd(),
367 branch: "feature/opencode-reuse",
368 stagedSummary: "M README.md",
369 stagedPatch: "diff --git a/README.md b/README.md",
370 modelSelection: DEFAULT_TEST_MODEL_SELECTION,
371 });
372
373 expect(runtimeMock.state.startCalls).toEqual(["fake-opencode", "fake-opencode"]);
374 expect(runtimeMock.state.promptUrls).toEqual([
375 "http://127.0.0.1:4301",
376 "http://127.0.0.1:4302",
377 ]);
378 expect(runtimeMock.state.closeCalls).toEqual(["http://127.0.0.1:4301"]);
379 }),
380 ).pipe(Effect.provide(TestClock.layer())),
381 );
382
383 it.effect("preserves the SDK cause when session creation fails", () =>
384 withOpenCodeTextGeneration(DEFAULT_OPENCODE_SETTINGS, (textGeneration) =>
385 Effect.gen(function* () {
386 const sdkCause = new Error("session endpoint unavailable");
387 runtimeMock.state.sessionCreateError = sdkCause;
388
389 const error = yield* textGeneration
390 .generateCommitMessage(DEFAULT_COMMIT_MESSAGE_INPUT)
391 .pipe(Effect.flip);
392
393 expect(error).toBeInstanceOf(TextGenerationError);
394 expect(error.message).toContain("OpenCode session.create request failed.");
395 expect(error.cause).toMatchObject({
396 _tag: "OpenCodeTextGenerationSessionRequestError",
397 operation: "generateCommitMessage",
398 cwd: process.cwd(),
399 cause: sdkCause,
400 });
401 expect((error.cause as { cause: unknown }).cause).toBe(sdkCause);
402 }),
403 ),
404 );
405
406 it.effect("reports a missing session payload without manufacturing a cause", () =>
407 withOpenCodeTextGeneration(DEFAULT_OPENCODE_SETTINGS, (textGeneration) =>
408 Effect.gen(function* () {
409 runtimeMock.state.sessionResult = {};
410
411 const error = yield* textGeneration
412 .generateCommitMessage(DEFAULT_COMMIT_MESSAGE_INPUT)
413 .pipe(Effect.flip);
414
415 expect(error.message).toContain("OpenCode session.create returned no session payload.");
416 expect(error.cause).toMatchObject({
417 _tag: "OpenCodeTextGenerationSessionPayloadError",
418 operation: "generateCommitMessage",
419 cwd: process.cwd(),
420 });
421 expect(error.cause).not.toHaveProperty("cause");
422 }),
423 ),
424 );
425
426 it.effect("preserves the SDK cause and request context when prompting fails", () =>
427 withOpenCodeTextGeneration(DEFAULT_OPENCODE_SETTINGS, (textGeneration) =>
428 Effect.gen(function* () {
429 const sdkCause = new Error("prompt endpoint unavailable");
430 runtimeMock.state.promptRequestError = sdkCause;
431
432 const error = yield* textGeneration
433 .generateCommitMessage(DEFAULT_COMMIT_MESSAGE_INPUT)
434 .pipe(Effect.flip);
435
436 expect(error.message).toContain("OpenCode session.prompt request failed.");
437 expect(error.cause).toMatchObject({
438 _tag: "OpenCodeTextGenerationPromptRequestError",
439 operation: "generateCommitMessage",
440 cwd: process.cwd(),
441 sessionId: "http://127.0.0.1:4301/session",
442 providerId: "openai",
443 modelId: "gpt-5",
444 cause: sdkCause,
445 });
446 expect((error.cause as { cause: unknown }).cause).toBe(sdkCause);
447 }),
448 ),
449 );
450
451 it.effect("returns a typed empty-output error for malformed and blank response parts", () =>
452 withOpenCodeTextGeneration(DEFAULT_OPENCODE_SETTINGS, (textGeneration) =>
453 Effect.gen(function* () {
454 runtimeMock.state.promptResult = {
455 data: {
456 parts: [null, { type: "tool" }, { type: "text", text: " " }],
457 },
458 };
459
460 const error = yield* textGeneration
461 .generateCommitMessage(DEFAULT_COMMIT_MESSAGE_INPUT)
462 .pipe(Effect.flip);
463
464 expect(error.message).toContain("OpenCode returned empty output.");
465 expect(error.cause).toMatchObject({
466 _tag: "OpenCodeTextGenerationEmptyOutputError",
467 operation: "generateCommitMessage",
468 cwd: process.cwd(),
469 sessionId: "http://127.0.0.1:4301/session",
470 providerId: "openai",
471 modelId: "gpt-5",
472 responsePartCount: 3,
473 textPartCount: 1,
474 });
475 expect(error.cause).not.toHaveProperty("cause");
476 }),
477 ),
478 );
479
480 it.effect("parses JSON returned as plain text output", () =>
481 withOpenCodeTextGeneration(DEFAULT_OPENCODE_SETTINGS, (textGeneration) =>
482 Effect.gen(function* () {
483 runtimeMock.state.promptResult = {
484 data: {
485 parts: [
486 {
487 type: "text",
488 text: 'Here is the result:\n{"subject":"Tighten OpenCode parsing","body":"Handle JSON text output locally."}',
489 },
490 ],
491 },
492 };
493
494 const result = yield* textGeneration.generateCommitMessage({
495 cwd: process.cwd(),
496 branch: "feature/opencode-reuse",
497 stagedSummary: "M README.md",
498 stagedPatch: "diff --git a/README.md b/README.md",
499 modelSelection: DEFAULT_TEST_MODEL_SELECTION,
500 });
501
502 expect(result).toEqual({
503 subject: "Tighten OpenCode parsing",
504 body: "Handle JSON text output locally.",
505 });
506 }),
507 ),
508 );
509
510 it.effect("surfaces the upstream OpenCode structured-output error message", () =>
511 withOpenCodeTextGeneration(DEFAULT_OPENCODE_SETTINGS, (textGeneration) =>
512 Effect.gen(function* () {
513 runtimeMock.state.promptResult = {
514 data: {
515 info: {
516 error: {
517 name: "StructuredOutputError",
518 data: {
519 message: "Model did not produce structured output",
520 retries: 2,
521 },
522 },
523 },
524 },
525 };
526
527 const error = yield* textGeneration
528 .generateCommitMessage(DEFAULT_COMMIT_MESSAGE_INPUT)
529 .pipe(Effect.flip);
530
531 expect(error.message).toContain("Model did not produce structured output");
532 expect(error.cause).toMatchObject({
533 _tag: "OpenCodeTextGenerationPromptResponseError",
534 operation: "generateCommitMessage",
535 cwd: process.cwd(),
536 sessionId: "http://127.0.0.1:4301/session",
537 providerId: "openai",
538 modelId: "gpt-5",
539 providerErrorName: "StructuredOutputError",
540 providerMessage: "Model did not produce structured output",
541 });
542 expect(error.cause).not.toHaveProperty("cause");
543 }),
544 ),
545 );
546});
547
548it.layer(layerOpenCodeTextGenerationExistingServerTest)(
549 "OpenCodeTextGeneration with configured server URL",
550 (it) => {
551 it.effect("does not send a local environment password to a configured server", () =>
552 withOpenCodeTextGeneration(
553 EXTERNAL_SERVER_WITHOUT_AUTH_OPENCODE_SETTINGS,
554 (textGeneration) =>
555 Effect.gen(function* () {
556 yield* textGeneration.generateCommitMessage(DEFAULT_COMMIT_MESSAGE_INPUT);
557 expect(runtimeMock.state.authHeaders).toEqual([null]);
558 }),
559 { OPENCODE_SERVER_PASSWORD: "local-secret" },
560 ),
561 );
562
563 it.effect("does not create a session when the server version is unsupported", () =>
564 withOpenCodeTextGeneration(EXISTING_SERVER_OPENCODE_SETTINGS, (textGeneration) =>
565 Effect.gen(function* () {
566 runtimeMock.state.connectionError = new Error(
567 "OpenCode v1.14.18 is too old. Upgrade to v1.14.19 or newer.",
568 );
569
570 const error = yield* textGeneration
571 .generateCommitMessage(DEFAULT_COMMIT_MESSAGE_INPUT)
572 .pipe(Effect.flip);
573
574 expect(error).toBeInstanceOf(TextGenerationError);
575 expect(error.message).toContain("v1.14.18 is too old");
576 expect(runtimeMock.state.sessionCreateCalls).toBe(0);
577 }),
578 ),
579 );
580
581 it.effect("reuses a configured OpenCode server URL without spawning or applying idle TTL", () =>
582 withOpenCodeTextGeneration(EXISTING_SERVER_OPENCODE_SETTINGS, (textGeneration) =>
583 Effect.gen(function* () {
584 yield* textGeneration.generateCommitMessage({
585 cwd: process.cwd(),
586 branch: "feature/opencode-reuse",
587 stagedSummary: "M README.md",
588 stagedPatch: "diff --git a/README.md b/README.md",
589 modelSelection: DEFAULT_TEST_MODEL_SELECTION,
590 });
591 yield* textGeneration.generateCommitMessage({
592 cwd: process.cwd(),
593 branch: "feature/opencode-reuse",
594 stagedSummary: "M README.md",
595 stagedPatch: "diff --git a/README.md b/README.md",
596 modelSelection: DEFAULT_TEST_MODEL_SELECTION,
597 });
598
599 expect(runtimeMock.state.startCalls).toEqual([]);
600 expect(runtimeMock.state.promptUrls).toEqual([
601 "http://127.0.0.1:9999",
602 "http://127.0.0.1:9999",
603 ]);
604 expect(runtimeMock.state.authHeaders).toEqual([
605 `Basic ${btoa("opencode:secret-password")}`,
606 `Basic ${btoa("opencode:secret-password")}`,
607 ]);
608
609 yield* advanceIdleClock;
610
611 expect(runtimeMock.state.closeCalls).toEqual([]);
612 }),
613 ).pipe(Effect.provide(TestClock.layer())),
614 );
615 },
616);