Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

CodexInstallation.test.ts

517 lines21.7 KB

1import * as NodeServices from "@effect/platform-node/NodeServices";
2import * as ModelManifest from "./ModelManifest.ts";
3import { expect, it } from "@effect/vitest";
4import * as HostProcess from "@t3tools/shared/HostProcess";
5import * as Clock from "effect/Clock";
6import * as Crypto from "effect/Crypto";
7import * as Deferred from "effect/Deferred";
8import * as Effect from "effect/Effect";
9import * as Hex from "effect/encoding/Hex";
10import * as FileSystem from "effect/FileSystem";
11import * as Option from "effect/Option";
12import * as Path from "effect/Path";
13import * as PlatformError from "effect/PlatformError";
14import * as Exit from "effect/Exit";
15import * as Queue from "effect/Queue";
16import * as Scope from "effect/Scope";
17import * as Sink from "effect/Sink";
18import * as Stream from "effect/Stream";
19import { HttpClient, HttpClientResponse } from "effect/http";
20import * as TestClock from "effect/testing/TestClock";
21import { ChildProcessSpawner } from "effect/process";
22import * as CodexInstallation from "./CodexInstallation.ts";
23​
24const archive = Buffer.from(
25 "H4sIAAAAAAAC/+3W0W6DIBQGYB/FcD0sKNSkD7J7aom6tmAQtzXL3n3QZM3qdWVt+n8XoCckJp78wLY3q8bu9Ge2HBbUUp7nYD4H8s9zrNdSsCxnWQLT6JULn8ye09K9h/u2/c0/jSM9xqGzo0+bf3Gdf15WQiD/Kdy61/CA+z8dlO9Wrv2387+c5Z9VZY38p7BY0+Gh8t/sVauLt9Ga9Pnnop7ln1e4/6fxRQ7qZCf/qt3YW0M2OX/JyfvljbCCy3XBSaiGH9VqH4tKuaZbC6qG4aDpTrmP3sQV2nh3Gmxvzqsud0vyjaABAAAAAAAAAAAAAAAk8gOq19rvACgAAA==",
26 "base64",
27);
28const asset = {
29 version: "0.156.1",
30 target: "aarch64-apple-darwin",
31 url: "https://github.com/openai/codex/releases/download/test/package.tar.gz",
32 archiveBytes: archive.length,
33};
34const makeHarness = Effect.fn("test.makeCodexInstallation")(function* (
35 input: {
36 options?: Partial<CodexInstallation.CodexInstallationOptions>;
37 manifestCurrent?: Effect.Effect<ModelManifest.ModelManifestData>;
38 body?: Stream.Stream<Uint8Array>;
39 baseDir?: string;
40 local?: { version: string; appServerFails?: boolean; versionFails?: boolean };
41 platform?: NodeJS.Platform;
42 spawner?: ChildProcessSpawner.ChildProcessSpawner["Service"];
43 // Fails this many renames of an extracted runtime before letting one through.
44 runtimeRenameFailures?: number;
45 } = {},
46) {
47 const fs = yield* FileSystem.FileSystem;
48 const baseDir =
49 input.baseDir ?? (yield* fs.makeTempDirectoryScoped({ prefix: "t3-codex-install-test-" }));
50 const localDirectory = `${baseDir}/local`;
51 const localBinaryPath = `${localDirectory}/codex`;
52 const probeLog = `${baseDir}/local-probes.txt`;
53 if (input.local) {
54 yield* fs.makeDirectory(localDirectory, { recursive: true });
55 yield* fs.writeFileString(
56 localBinaryPath,
57 `#!/bin/sh\nprintf '%s\\n' "$*" >> '${probeLog}'\ncase "$1" in\n--version) ${input.local.versionFails ? "exit 1" : `printf '%s\\n' 'codex-cli ${input.local.version}'`};;\napp-server) exit ${input.local.appServerFails ? "1" : "0"};;\nesac\n`,
58 { mode: 0o755 },
59 );
60 }
61 let downloads = 0;
62 const crypto = yield* Crypto.Crypto;
63 const sha256 = Hex.encode(yield* crypto.digest("SHA-256", archive).pipe(Effect.orDie));
64 let runtimeRenameFailures = input.runtimeRenameFailures ?? 0;
65 const failedRenames = yield* Queue.unbounded<void>();
66 const lockingFs: FileSystem.FileSystem = {
67 ...fs,
68 // Suspended so each retry of the same effect is a fresh attempt, like the real rename.
69 rename: (from, to) =>
70 Effect.suspend(() =>
71 /[/\\]runtime$/u.test(from) && runtimeRenameFailures-- > 0
72 ? Queue.offer(failedRenames, undefined).pipe(
73 Effect.andThen(
74 Effect.fail(
75 PlatformError.systemError({
76 _tag: "PermissionDenied",
77 module: "FileSystem",
78 method: "rename",
79 pathOrDescriptor: from,
80 }),
81 ),
82 ),
83 )
84 : fs.rename(from, to),
85 ),
86 };
87 const spawner = input.spawner ?? (yield* ChildProcessSpawner.ChildProcessSpawner);
88 const installation = yield* CodexInstallation.makeCodexInstallation({
89 baseDir,
90 releaseAsset: { ...asset, sha256 },
91 validate: () => Effect.void,
92 ...input.options,
93 }).pipe(
94 Effect.provideService(ModelManifest.ModelManifest, {
95 current: input.manifestCurrent ?? Effect.succeed(ModelManifest.BUNDLED_MODEL_MANIFEST),
96 refresh: Effect.succeed(ModelManifest.BUNDLED_MODEL_MANIFEST),
97 forceRefresh: Effect.succeed(ModelManifest.BUNDLED_MODEL_MANIFEST),
98 refreshInBackground: Effect.void,
99 }),
100 Effect.provideService(HostProcess.Platform, input.platform ?? "darwin"),
101 Effect.provideService(HostProcess.Architecture, "arm64"),
102 Effect.provideService(HostProcess.Environment, {
103 PATH: input.local ? localDirectory : "",
104 SystemRoot: "C:\\Windows",
105 }),
106 Effect.provideService(FileSystem.FileSystem, lockingFs),
107 Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),
108 Effect.provideService(
109 HttpClient.HttpClient,
110 HttpClient.make((request) =>
111 Effect.sync(() => {
112 downloads++;
113 return Object.defineProperty(
114 HttpClientResponse.fromWeb(request, new Response(null)),
115 "stream",
116 {
117 value: input.body ?? Stream.succeed(archive),
118 },
119 );
120 }),
121 ),
122 ),
123 );
124 return {
125 installation,
126 fs,
127 baseDir,
128 localBinaryPath,
129 probeLog,
130 failedRenames,
131 downloads: () => downloads,
132 };
133});
134const terminalState = (installation: CodexInstallation.CodexInstallation["Service"]) =>
135 installation.changes.pipe(
136 Stream.filter((state) => ["succeeded", "failed", "cancelled"].includes(state.phase)),
137 Stream.runHead,
138 Effect.map(Option.getOrThrow),
139 );
140​
141it.effect.each(["0.156.0", "0.156.1", "0.156.2", "0.157.0"])(
142 "reuses installed Codex %s without downloading or taking ownership of it",
143 (version) =>
144 Effect.gen(function* () {
145 const h = yield* makeHarness({ local: { version } });
146 expect(yield* h.installation.start).toMatchObject({
147 source: "local",
148 phase: "succeeded",
149 installedVersion: version,
150 executablePath: h.localBinaryPath,
151 canRemove: false,
152 });
153 expect(yield* h.installation.resolve()).toMatchObject({
154 source: "local",
155 executablePath: h.localBinaryPath,
156 managedVersionDirectory: null,
157 version,
158 });
159 yield* h.installation.acquire().pipe(Effect.scoped);
160 expect(h.downloads()).toBe(0);
161 expect(yield* h.fs.exists(h.installation.managedDirectory)).toBe(false);
162 expect((yield* h.fs.readFileString(h.probeLog)).trim().split("\n")).toEqual([
163 "--version",
164 "app-server --help",
165 ]);
166 yield* h.installation.remove();
167 expect(yield* h.fs.exists(h.localBinaryPath)).toBe(true);
168 expect((yield* h.installation.state).source).toBe("local");
169 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
170);
171it.effect.each([
172 { version: "0.128.9" },
173 { version: "0.145.0" },
174 { version: "0.155.1" },
175 { version: "0.155.9" },
176 { version: "0.156.1-alpha.1" },
177 { version: "unknown" },
178 { version: "0.156.1", appServerFails: true },
179 { version: "0.156.1", versionFails: true },
180])("downloads the pinned release when the local CLI is unsupported or broken: %j", (local) =>
181 Effect.gen(function* () {
182 const h = yield* makeHarness({ local });
183 expect((yield* h.installation.state).installedVersion).toBeNull();
184 yield* h.installation.start;
185 const installed = yield* terminalState(h.installation);
186 expect(installed.phase).toBe("succeeded");
187 const executable = yield* h.installation.resolve();
188 expect(executable.source).toBe("managed");
189 expect(installed.executablePath).toBe(executable.executablePath);
190 expect(h.downloads()).toBe(1);
191 expect(yield* h.fs.exists(h.localBinaryPath)).toBe(true);
192 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
193);
194it.effect("falls back to a managed download when the reused local executable disappears", () =>
195 Effect.gen(function* () {
196 const h = yield* makeHarness({ local: { version: "0.156.1" } });
197 expect((yield* h.installation.resolve()).source).toBe("local");
198 yield* h.fs.remove(h.localBinaryPath);
199 yield* h.installation.start;
200 expect((yield* terminalState(h.installation)).phase).toBe("succeeded");
201 expect((yield* h.installation.resolve()).source).toBe("managed");
202 expect(h.downloads()).toBe(1);
203 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
204);
205​
206it.effect("rechecks compatibility after the local executable is replaced", () =>
207 Effect.gen(function* () {
208 const h = yield* makeHarness({ local: { version: "0.156.1" } });
209 expect((yield* h.installation.resolve()).source).toBe("local");
210 yield* h.fs.remove(h.localBinaryPath);
211 yield* h.fs.writeFileString(h.localBinaryPath, "#!/bin/sh\nprintf 'codex-cli 0.128.9\\n'\n", {
212 mode: 0o755,
213 });
214 yield* h.installation.start;
215 expect((yield* terminalState(h.installation)).phase).toBe("succeeded");
216 expect((yield* h.installation.resolve()).source).toBe("managed");
217 expect(h.downloads()).toBe(1);
218 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
219);
220​
221it.effect("rechecks a cached local executable when the shared manifest policy changes", () =>
222 Effect.gen(function* () {
223 let manifest = ModelManifest.BUNDLED_MODEL_MANIFEST;
224 const h = yield* makeHarness({
225 local: { version: "0.156.0" },
226 manifestCurrent: Effect.sync(() => manifest),
227 });
228 expect((yield* h.installation.resolve()).source).toBe("local");
229 manifest = {
230 ...manifest,
231 compatibility: [
232 {
233 driver: "codex",
234 t3CodeRange: ">=0.0.42",
235 ranges: [
236 { range: ">=0.156.1", status: "supported" },
237 { range: "<0.156.1", status: "broken" },
238 ],
239 },
240 ],
241 };
242 yield* h.installation.start;
243 expect((yield* terminalState(h.installation)).phase).toBe("succeeded");
244 expect((yield* h.installation.resolve()).source).toBe("managed");
245 expect(h.downloads()).toBe(1);
246 expect((yield* h.fs.readFileString(h.probeLog)).trim().split("\n")).toEqual([
247 "--version",
248 "app-server --help",
249 ]);
250 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
251);
252​
253it.effect("uses bundled Codex compatibility when the remote manifest omits its policy", () =>
254 Effect.gen(function* () {
255 const h = yield* makeHarness({
256 local: { version: "0.156.0" },
257 manifestCurrent: Effect.succeed({
258 ...ModelManifest.BUNDLED_MODEL_MANIFEST,
259 compatibility: [],
260 }),
261 });
262 expect((yield* h.installation.start).source).toBe("local");
263 expect(h.downloads()).toBe(0);
264 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
265);
266​
267it.effect("preserves the invoked name of version-manager launcher symlinks", () =>
268 Effect.gen(function* () {
269 const h = yield* makeHarness({ local: { version: "0.156.1" } });
270 const launcher = `${h.baseDir}/launcher`;
271 yield* h.fs.writeFileString(
272 launcher,
273 '#!/bin/sh\ncase "$0" in */codex) ;; *) exit 1;; esac\ncase "$1" in --version) printf "codex-cli 0.156.1\\n";; app-server) exit 0;; esac\n',
274 { mode: 0o755 },
275 );
276 yield* h.fs.remove(h.localBinaryPath);
277 yield* h.fs.symlink(launcher, h.localBinaryPath);
278 expect(yield* h.installation.start).toMatchObject({ source: "local", phase: "succeeded" });
279 expect((yield* h.installation.resolve()).executablePath).toBe(h.localBinaryPath);
280 expect(h.downloads()).toBe(0);
281 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
282);
283​
284it.effect(
285 "installs the complete verified package in tools/codex/version and survives a restart",
286 () =>
287 Effect.gen(function* () {
288 const { installation, fs, baseDir } = yield* makeHarness();
289 yield* installation.start;
290 expect((yield* terminalState(installation)).phase).toBe("succeeded");
291 const executable = yield* installation.resolve();
292 expect(executable.executablePath).toBe(`${baseDir}/tools/codex/0.156.1/bin/codex`);
293 expect(
294 yield* fs.readFileString(`${executable.managedVersionDirectory}/bin/codex-code-mode-host`),
295 ).toBe("host");
296 expect(yield* fs.readFileString(`${executable.managedVersionDirectory}/codex-path/rg`)).toBe(
297 "rg",
298 );
299 const restarted = yield* makeHarness({ baseDir });
300 expect((yield* restarted.installation.resolve()).version).toBe("0.156.1");
301 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
302);
303​
304it.effect("requires an update before running an older activated managed installation", () =>
305 Effect.gen(function* () {
306 const first = yield* makeHarness();
307 yield* first.installation.start;
308 yield* terminalState(first.installation);
309 const executable = yield* first.installation.resolve();
310 const oldDirectory = `${first.installation.managedDirectory}/0.155.1`;
311 yield* first.fs.rename(executable.managedVersionDirectory!, oldDirectory);
312 for (const name of ["codex-package.json", ".install-complete.json"]) {
313 const file = `${oldDirectory}/${name}`;
314 yield* first.fs.writeFileString(
315 file,
316 (yield* first.fs.readFileString(file)).replaceAll("0.156.1", "0.155.1"),
317 );
318 }
319 yield* first.fs.writeFileString(
320 `${first.installation.managedDirectory}/active.json`,
321 '{"version":"0.155.1"}',
322 );
323 const restarted = yield* makeHarness({ baseDir: first.baseDir });
324 expect((yield* Effect.flip(restarted.installation.resolve())).detail).toContain(
325 "outside the supported range",
326 );
327 yield* restarted.installation.start;
328 expect((yield* terminalState(restarted.installation)).phase).toBe("succeeded");
329 expect((yield* restarted.installation.resolve()).version).toBe("0.156.1");
330 expect(restarted.downloads()).toBe(1);
331 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
332);
333​
334it.effect("rejects corrupted downloads without publishing a runtime", () =>
335 Effect.gen(function* () {
336 const { installation, fs } = yield* makeHarness({
337 options: { releaseAsset: { ...asset, sha256: "0".repeat(64) } },
338 });
339 yield* installation.start;
340 const state = yield* terminalState(installation);
341 expect(state.phase).toBe("failed");
342 expect(state.message).toContain("SHA-256");
343 expect(yield* fs.exists(`${installation.managedDirectory}/active.json`)).toBe(false);
344 expect(yield* fs.exists(`${installation.managedDirectory}/0.156.1`)).toBe(false);
345 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
346);
347​
348it.effect("cancels an in-flight download and cleans the staging directory", () =>
349 Effect.gen(function* () {
350 const downloading = yield* Deferred.make<void>();
351 const body = Stream.fromEffect(
352 Deferred.succeed(downloading, undefined).pipe(Effect.andThen(Effect.never)),
353 );
354 const { installation, fs } = yield* makeHarness({ body });
355 const started = yield* installation.start;
356 yield* Deferred.await(downloading);
357 expect((yield* installation.cancel(started.operationId!)).phase).toBe("cancelled");
358 expect(
359 (yield* fs.readDirectory(installation.managedDirectory)).filter((name) =>
360 name.startsWith(".install-"),
361 ),
362 ).toEqual([]);
363 expect(yield* fs.exists(`${installation.managedDirectory}/active.json`)).toBe(false);
364 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
365);
366​
367it.effect("protects active process leases and removes the runtime after release", () =>
368 Effect.gen(function* () {
369 const { installation, fs } = yield* makeHarness();
370 yield* installation.start;
371 yield* terminalState(installation);
372 const leaseScope = yield* Scope.make();
373 yield* installation.acquire().pipe(Effect.provideService(Scope.Scope, leaseScope));
374 expect((yield* Effect.flip(installation.remove())).detail).toContain("Stop Codex sessions");
375 yield* Scope.close(leaseScope, Exit.void);
376 yield* installation.remove();
377 expect(yield* fs.exists(installation.managedDirectory)).toBe(false);
378 expect((yield* installation.state).installedVersion).toBeNull();
379 expect((yield* installation.state).executablePath).toBeNull();
380 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
381);
382​
383it.effect("keeps an activated runtime when a later update fails verification", () =>
384 Effect.gen(function* () {
385 const first = yield* makeHarness();
386 yield* first.installation.start;
387 yield* terminalState(first.installation);
388 const update = yield* makeHarness({
389 baseDir: first.baseDir,
390 options: { releaseAsset: { ...asset, version: "0.156.2", sha256: "0".repeat(64) } },
391 });
392 expect((yield* update.installation.state).executablePath).toBe(
393 (yield* first.installation.resolve()).executablePath,
394 );
395 yield* update.installation.start;
396 expect((yield* terminalState(update.installation)).phase).toBe("failed");
397 expect((yield* update.installation.resolve()).version).toBe("0.156.1");
398 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
399);
400​
401it("publishes complete packages for all supported platforms", () => {
402 for (const platform of ["darwin", "linux", "win32"] as const)
403 for (const arch of ["x64", "arm64"])
404 expect(CodexInstallation.resolveCodexReleaseAsset(platform, arch)?.url).toContain(
405 "codex-package-",
406 );
407 expect(CodexInstallation.resolveCodexReleaseAsset("linux", "riscv64")).toBeNull();
408});
409// Live clock: staleness compares real filesystem mtimes.
410it.live("startup removes only stale staging directories", () =>
411 Effect.gen(function* () {
412 const fs = yield* FileSystem.FileSystem;
413 const baseDir = yield* fs.makeTempDirectoryScoped({ prefix: "t3-codex-install-test-" });
414 const managed = `${baseDir}/tools/codex`;
415 // utimes takes seconds when given numbers.
416 const stale = ((yield* Clock.currentTimeMillis) - 25 * 60 * 60_000) / 1000;
417 for (const name of [".install-stale", ".active-stale", ".install-live"]) {
418 yield* fs.makeDirectory(`${managed}/${name}`, { recursive: true });
419 }
420 yield* fs.utimes(`${managed}/.install-stale`, stale, stale);
421 yield* fs.utimes(`${managed}/.active-stale`, stale, stale);
422 const h = yield* makeHarness({ baseDir });
423 expect(yield* fs.readDirectory(managed)).toEqual([".install-live"]);
424 expect((yield* h.installation.state).canRemove).toBe(true);
425​
426 yield* fs.remove(`${managed}/.install-live`, { recursive: true });
427 yield* fs.makeDirectory(`${managed}/.install-stale`);
428 yield* fs.utimes(`${managed}/.install-stale`, stale, stale);
429 const fresh = yield* makeHarness({ baseDir });
430 expect(yield* fs.readDirectory(managed)).toEqual([]);
431 expect((yield* fresh.installation.state).canRemove).toBe(false);
432 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
433);
434​
435const processHandle = (stdout: string) =>
436 ChildProcessSpawner.makeHandle({
437 pid: ChildProcessSpawner.ProcessId(1),
438 exitCode: Effect.succeed(ChildProcessSpawner.ExitCode(0)),
439 isRunning: Effect.succeed(false),
440 kill: () => Effect.void,
441 unref: Effect.succeed(Effect.void),
442 stdin: Sink.drain,
443 stdout: Stream.make(new TextEncoder().encode(stdout)),
444 stderr: Stream.empty,
445 all: Stream.empty,
446 getInputFd: () => Sink.drain,
447 getOutputFd: () => Stream.empty,
448 });
449const windowsPackage: Record<string, string> = {
450 "bin/codex.exe": "codex",
451 "bin/codex-code-mode-host.exe": "host",
452 "codex-path/rg.exe": "rg",
453 "codex-package.json": JSON.stringify({
454 layoutVersion: 1,
455 version: asset.version,
456 target: asset.target,
457 entrypoint: "bin/codex.exe",
458 }),
459};
460// Stands in for Windows' bsdtar: CRLF listings, and extraction writes the Windows layout.
461const makeWindowsTar = (fs: FileSystem.FileSystem, commands: Array<string>) =>
462 ChildProcessSpawner.make((command) =>
463 Effect.gen(function* () {
464 const { command: executable, args } = command as unknown as {
465 readonly command: string;
466 readonly args: ReadonlyArray<string>;
467 };
468 commands.push(executable);
469 const names = Object.keys(windowsPackage);
470 if (args[0] === "-tzf") return processHandle(`${names.join("\r\n")}\r\n`);
471 if (args[0] === "-tvzf")
472 return processHandle(`${names.map((name) => `-rwxr-xr-x 0 0 ${name}`).join("\r\n")}\r\n`);
473 const runtime = args[3] ?? "";
474 for (const [name, contents] of Object.entries(windowsPackage)) {
475 yield* fs.makeDirectory(`${runtime}/${name.split("/").slice(0, -1).join("/")}`, {
476 recursive: true,
477 });
478 yield* fs.writeFileString(`${runtime}/${name}`, contents);
479 }
480 return processHandle("");
481 }).pipe(Effect.orDie),
482 );
483​
484it.effect("installs on Windows via System32 tar with CRLF output and a locked runtime", () =>
485 Effect.gen(function* () {
486 const fs = yield* FileSystem.FileSystem;
487 const commands: Array<string> = [];
488 const h = yield* makeHarness({
489 platform: "win32",
490 spawner: makeWindowsTar(fs, commands),
491 runtimeRenameFailures: 3,
492 });
493 yield* h.installation.start;
494 // Each failed attempt has scheduled its retry before the test fiber resumes.
495 for (let attempt = 0; attempt < 3; attempt++) {
496 yield* Queue.take(h.failedRenames);
497 yield* TestClock.adjust("100 millis");
498 }
499 expect(yield* terminalState(h.installation)).toMatchObject({ phase: "succeeded" });
500 expect(commands).toEqual([
501 "C:\\Windows\\System32\\tar.exe",
502 "C:\\Windows\\System32\\tar.exe",
503 "C:\\Windows\\System32\\tar.exe",
504 ]);
505 const path = yield* Path.Path;
506 expect((yield* h.installation.resolve()).executablePath).toBe(
507 path.join(h.baseDir, "tools", "codex", "0.156.1", "bin", "codex.exe"),
508 );
509 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
510);
511it.effect("does not retry a failed runtime rename outside Windows", () =>
512 Effect.gen(function* () {
513 const h = yield* makeHarness({ runtimeRenameFailures: 1 });
514 yield* h.installation.start;
515 expect((yield* terminalState(h.installation)).phase).toBe("failed");
516 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
517);