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

CodexDriver.test.ts

595 lines23.5 KB

1import * as CodexInstallation from "../CodexInstallation.ts";
2import * as ServerSecretStore from "../../auth/ServerSecretStore.ts";
3import * as ServerEnvironment from "../../environment/ServerEnvironment.ts";
4// @effect-diagnostics nodeBuiltinImport:off
5import * as NodeServices from "@effect/platform-node/NodeServices";
6import * as NodeOS from "node:os";
7import * as NodePath from "node:path";
8import { expect, it } from "@effect/vitest";
9import { EnvironmentId, ProviderInstanceId, ProviderSessionId, ThreadId } from "@t3tools/contracts";
10import { HostProcessPlatform } from "@t3tools/shared/hostProcess";
11import * as Effect from "effect/Effect";
12import * as Deferred from "effect/Deferred";
13import * as Fiber from "effect/Fiber";
14import * as FileSystem from "effect/FileSystem";
15import * as Layer from "effect/Layer";
16import * as Option from "effect/Option";
17import * as PlatformError from "effect/PlatformError";
18import * as Schema from "effect/Schema";
19import * as Sink from "effect/Sink";
20import * as Stream from "effect/Stream";
21import { HttpClient, HttpClientResponse } from "effect/http";
22import * as ChildProcess from "effect/process/ChildProcess";
23import * as ChildProcessSpawner from "effect/process/ChildProcessSpawner";
24​
25import * as BackgroundPolicy from "../../background/BackgroundPolicy.ts";
26import * as ServerConfig from "../../config.ts";
27import * as ServerSettings from "../../serverSettings.ts";
28import * as ResetCreditCoordinator from "../resetCreditCoordinator.ts";
29import * as ProviderEventLoggers from "../ProviderEventLoggers.ts";
30import * as ModelManifest from "../ModelManifest.ts";
31import {
32 createProviderVersionAdvisory,
33 ProviderVersionCache,
34 resolveLatestProviderVersion,
35} from "../providerMaintenance.ts";
36import { CodexDriver } from "./CodexDriver.ts";
37import * as CodexAdapterV2 from "../../orchestration-v2/Adapters/CodexAdapterV2.ts";
38import * as IdAllocator from "../../orchestration-v2/IdAllocator.ts";
39import { ProviderAdapterV2RuntimePolicy } from "../../orchestration-v2/ProviderAdapter.ts";
40import * as ProviderCredentialStore from "../ProviderCredentialStore.ts";
41​
42const layerTest = ServerConfig.layerTest(process.cwd(), {
43 prefix: "t3-codex-driver-maintenance-",
44}).pipe(
45 Layer.provideMerge(NodeServices.layer),
46 Layer.provideMerge(IdAllocator.layer),
47 Layer.provideMerge(
48 Layer.mock(CodexAdapterV2.CodexAppServerClientFactory)({
49 open: () => Effect.die("Maintenance resolution must not open a Codex session"),
50 }),
51 ),
52 Layer.provideMerge(
53 Layer.mock(CodexInstallation.CodexInstallation)({
54 managedDirectory: "unused-managed-installation",
55 }),
56 ),
57 Layer.provideMerge(Layer.mock(ServerSecretStore.ServerSecretStore)({})),
58 Layer.provideMerge(
59 Layer.succeed(ServerEnvironment.ServerEnvironmentIdentity, {
60 getEnvironmentId: Effect.succeed(EnvironmentId.make("00000000-0000-4000-8000-000000000001")),
61 }),
62 ),
63 Layer.provideMerge(ServerSettings.layerTest()),
64 Layer.provideMerge(ModelManifest.layerTest),
65 Layer.provideMerge(ResetCreditCoordinator.layerTest),
66 Layer.provideMerge(
67 Layer.mock(BackgroundPolicy.BackgroundPolicy)({
68 shouldRunScopeWork: () => Effect.succeed(false),
69 }),
70 ),
71 Layer.provideMerge(
72 Layer.succeed(
73 ProviderEventLoggers.ProviderEventLoggers,
74 ProviderEventLoggers.NoOpProviderEventLoggers,
75 ),
76 ),
77 Layer.provideMerge(
78 Layer.succeed(
79 HttpClient.HttpClient,
80 HttpClient.make(() => Effect.die("Disabled Codex must not make an HTTP request")),
81 ),
82 ),
83);
84​
85// The `#!/bin/sh` stub below cannot be resolved as an executable on Windows.
86const windowsHost = HostProcessPlatform.defaultValue() === "win32";
87​
88const noSpawn = ChildProcessSpawner.make(() =>
89 Effect.die("Disabled Codex must not spawn a process"),
90);
91const encodeCredentials = Schema.encodeEffect(Schema.fromJsonString(Schema.Unknown));
92​
93it.layer(layerTest)("CodexDriver", (it) => {
94 it.effect("disconnect refreshes a restored managed account while its auth flow is idle", () =>
95 Effect.gen(function* () {
96 const instanceId = ProviderInstanceId.make("restored-managed-account");
97 const credentials = new Map<string, Uint8Array>();
98 const secrets = ServerSecretStore.ServerSecretStore.of({
99 get: (key) => Effect.sync(() => Option.fromUndefinedOr(credentials.get(key))),
100 set: (key, value) =>
101 Effect.sync(() => {
102 credentials.set(key, value);
103 }),
104 remove: (key) =>
105 Effect.sync(() => {
106 credentials.delete(key);
107 }),
108 create: () => Effect.die("unused"),
109 getOrCreateRandom: () => Effect.die("unused"),
110 });
111 yield* Effect.gen(function* () {
112 const store = yield* ProviderCredentialStore.make("codex-chatgpt", instanceId);
113 const json = yield* encodeCredentials({
114 clientId: "oaiapp_test",
115 accessToken: "dummy-owned-access",
116 refreshToken: "dummy-refresh",
117 expiresAt: Number.MAX_SAFE_INTEGER,
118 earliestRefreshAt: null,
119 scopes: ["chatgpt.tokens.use.direct"],
120 subject: "test-user",
121 email: "account@example.test",
122 });
123 yield* store.set(new TextEncoder().encode(json));
124 const executable = {
125 executablePath: "/user/bin/codex",
126 managedVersionDirectory: null,
127 source: "local" as const,
128 version: "0.156.1",
129 };
130 const installation = yield* CodexInstallation.CodexInstallation;
131 const serverConfig = yield* ServerConfig.ServerConfig;
132 const sharedHome = NodePath.join(serverConfig.stateDir, "shared-codex-home");
133 const launches: Array<
134 Parameters<CodexAdapterV2.CodexAppServerClientFactoryShape["open"]>[0]
135 > = [];
136 // Sign-out interrupts an account check that is still resolving the runtime.
137 // Interrupt the two startup checks that way (one is the sign-in listener's);
138 // the disconnect below must still refresh.
139 let interruptedChecks = 0;
140 const startupChecksInterrupted = yield* Deferred.make<void>();
141 const acquire = () =>
142 Effect.suspend(() => {
143 if (interruptedChecks === 2) return Effect.succeed(executable);
144 interruptedChecks += 1;
145 return (
146 interruptedChecks === 2
147 ? Deferred.succeed(startupChecksInterrupted, undefined)
148 : Effect.void
149 ).pipe(Effect.andThen(Effect.interrupt));
150 });
151 const instance = yield* CodexDriver.create({
152 instanceId,
153 displayName: "Restored account",
154 enabled: true,
155 environment: [{ name: "OPENAI_API_KEY", value: "ambient-key", sensitive: true }],
156 config: { ...CodexDriver.defaultConfig(), setupMode: "managed", homePath: sharedHome },
157 }).pipe(
158 Effect.provideService(
159 CodexAdapterV2.CodexAppServerClientFactory,
160 CodexAdapterV2.CodexAppServerClientFactory.of({
161 open: (launch) =>
162 Effect.sync(() => launches.push(launch)).pipe(
163 Effect.andThen(Effect.die("The fixture stops after recording the launch")),
164 ),
165 }),
166 ),
167 Effect.provideService(
168 CodexInstallation.CodexInstallation,
169 CodexInstallation.CodexInstallation.of({
170 ...installation,
171 managedDirectory: "unused-managed-installation",
172 resolve: () => Effect.succeed(executable),
173 acquire,
174 }),
175 ),
176 Effect.provideService(
177 ChildProcessSpawner.ChildProcessSpawner,
178 ChildProcessSpawner.make(() =>
179 Effect.fail(
180 PlatformError.badArgument({
181 module: "ChildProcessSpawner",
182 method: "spawn",
183 description: "The fixture app-server is unavailable",
184 }),
185 ),
186 ),
187 ),
188 );
189 const observedAccount = yield* Deferred.make<void>();
190 const disconnected = yield* instance.snapshot.streamChanges.pipe(
191 Stream.tap((provider) =>
192 provider.auth.status === "authenticated"
193 ? Deferred.succeed(observedAccount, undefined).pipe(Effect.asVoid)
194 : Effect.void,
195 ),
196 Stream.filter((provider) => provider.auth.status === "unauthenticated"),
197 Stream.runHead,
198 Effect.forkScoped,
199 );
200 yield* Deferred.await(startupChecksInterrupted);
201 const restored = yield* instance.snapshot.refresh;
202 expect(restored.auth.email).toBe("account@example.test");
203 expect(restored.runtimePaths?.homePath).toBe(sharedHome);
204 expect(restored.runtimePaths?.shadowHomePath).toContain(
205 `providers/codex/${instanceId}/shadow`,
206 );
207 yield* Deferred.await(observedAccount);
208 // Sessions launch the T3-installed Codex with the account's token, not ambient credentials.
209 const threadId = ThreadId.make("managed-account-thread");
210 yield* instance.orchestrationAdapter
211 .openSession({
212 threadId,
213 providerSessionId: ProviderSessionId.make("managed-account-session"),
214 modelSelection: { instanceId, model: "gpt-5.4" },
215 runtimePolicy: ProviderAdapterV2RuntimePolicy.make({
216 runtimeMode: "full-access",
217 interactionMode: "default",
218 cwd: serverConfig.stateDir,
219 }),
220 })
221 .pipe(Effect.scoped, Effect.exit);
222 expect(launches).toHaveLength(1);
223 const launch = launches[0]!;
224 expect(launch.settings.binaryPath).toBe(executable.executablePath);
225 expect(launch.settings.launchArgs).toContain("openai_token_sharing");
226 expect(launch.environment.ACCESS_TOKEN).toBe("dummy-owned-access");
227 expect(launch.environment.OPENAI_API_KEY).toBeUndefined();
228 expect(launch.environment.CODEX_HOME).toBe(launch.settings.homePath);
229 const before = yield* instance.auth!.subscribe("test-owner").pipe(Stream.runHead);
230 expect(Option.getOrThrow(before).phase).toBe("idle");
231 yield* instance.auth!.logout(Effect.void);
232 const after = Option.getOrThrow(yield* Fiber.join(disconnected));
233 expect(after.auth.status).toBe("unauthenticated");
234 expect(after.auth.email).toBeUndefined();
235 expect(after.installed).toBe(true);
236 expect(after.models).toEqual([]);
237 expect(Option.isNone(yield* store.get)).toBe(true);
238 }).pipe(
239 Effect.provideService(ServerSecretStore.ServerSecretStore, secrets),
240 Effect.provideService(
241 HttpClient.HttpClient,
242 HttpClient.make((request) =>
243 Effect.sync(() => {
244 expect([
245 "https://auth.openai.com/.well-known/openid-configuration",
246 "https://auth.openai.com/revoke",
247 "https://api.openai.com/v1/models",
248 ]).toContain(request.url);
249 if (request.url.endsWith("/models"))
250 return HttpClientResponse.fromWeb(request, Response.json({ models: [] }));
251 return HttpClientResponse.fromWeb(
252 request,
253 request.url.endsWith("/revoke")
254 ? new Response(null, { status: 200 })
255 : Response.json({
256 issuer: "https://auth.openai.com",
257 authorization_endpoint: "https://auth.openai.com/api/accounts/authorize",
258 token_endpoint: "https://auth.openai.com/api/accounts/oauth/token",
259 jwks_uri: "https://auth.openai.com/jwks",
260 revocation_endpoint: "https://auth.openai.com/revoke",
261 }),
262 );
263 }),
264 ),
265 ),
266 );
267 }).pipe(Effect.scoped),
268 );
269​
270 it.effect.skipIf(windowsHost)(
271 "runs the standalone updater against the shared home, not the shadow home",
272 () =>
273 Effect.gen(function* () {
274 const fs = yield* FileSystem.FileSystem;
275 const tempDir = yield* fs
276 .makeTempDirectoryScoped({ prefix: "t3-codex-driver-" })
277 .pipe(Effect.flatMap((directory) => fs.realPath(directory)));
278 const sharedHome = NodePath.join(tempDir, "codex-home");
279 const shadowHome = NodePath.join(tempDir, "codex-shadow");
280 const binaryPath = NodePath.join(sharedHome, "packages", "standalone", "bin", "codex");
281 yield* fs.makeDirectory(NodePath.dirname(binaryPath), { recursive: true });
282 yield* fs.writeFileString(binaryPath, "#!/bin/sh\n");
283 yield* fs.chmod(binaryPath, 0o755);
284​
285 const instance = yield* CodexDriver.create({
286 instanceId: ProviderInstanceId.make("codex-shadow"),
287 displayName: "Codex test",
288 enabled: false,
289 environment: [],
290 config: {
291 ...CodexDriver.defaultConfig(),
292 binaryPath,
293 homePath: sharedHome,
294 shadowHomePath: shadowHome,
295 },
296 });
297​
298 const capabilities = yield* instance.snapshot.resolveMaintenance();
299 expect(capabilities.update).toMatchObject({
300 executable: binaryPath,
301 args: ["update"],
302 lockKey: "codex-native",
303 env: { CODEX_HOME: sharedHome },
304 });
305 }).pipe(
306 Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, noSpawn),
307 Effect.scoped,
308 ),
309 );
310​
311 it.effect("stays manual-only when the configured executable does not exist", () =>
312 Effect.gen(function* () {
313 const instance = yield* CodexDriver.create({
314 instanceId: ProviderInstanceId.make("codex-missing"),
315 displayName: "Codex test",
316 enabled: false,
317 environment: [],
318 config: {
319 ...CodexDriver.defaultConfig(),
320 binaryPath: NodePath.join(NodeOS.tmpdir(), "t3-codex-missing", "codex"),
321 },
322 });
323 expect((yield* instance.snapshot.resolveMaintenance()).update).toBeNull();
324 }).pipe(Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, noSpawn), Effect.scoped),
325 );
326​
327 for (const fixture of [
328 {
329 name: "leaves mise npm-backend installations manual-only",
330 installSegments: ["mise", "installs", "npm-openai-codex", "0.110.0"],
331 npmOwned: false,
332 },
333 {
334 name: "leaves mise tool aliases backed by npm manual-only",
335 installSegments: ["mise", "installs", "codex", "0.110.0"],
336 npmOwned: false,
337 },
338 {
339 name: "keeps npm updates for globals in a mise Node installation",
340 installSegments: ["mise", "installs", "node", "24.0.0"],
341 npmOwned: true,
342 },
343 {
344 name: "keeps npm updates for ordinary global installations",
345 installSegments: ["npm-global"],
346 npmOwned: true,
347 },
348 ] as const) {
349 it.effect.skipIf(windowsHost)(fixture.name, () =>
350 Effect.gen(function* () {
351 const fs = yield* FileSystem.FileSystem;
352 const tempDir = yield* fs
353 .makeTempDirectoryScoped({ prefix: "t3-codex-installer-" })
354 .pipe(Effect.flatMap((directory) => fs.realPath(directory)));
355 const installPath = NodePath.join(tempDir, ...fixture.installSegments);
356 const realBinaryPath = NodePath.join(
357 installPath,
358 "lib",
359 "node_modules",
360 "@openai",
361 "codex",
362 "bin",
363 "codex.js",
364 );
365 const binaryPath = NodePath.join(tempDir, "bin", "codex");
366 yield* fs.makeDirectory(NodePath.dirname(realBinaryPath), { recursive: true });
367 yield* fs.makeDirectory(NodePath.dirname(binaryPath), { recursive: true });
368 yield* fs.writeFileString(realBinaryPath, "#!/bin/sh\n");
369 yield* fs.chmod(realBinaryPath, 0o755);
370 yield* fs.symlink(realBinaryPath, binaryPath);
371​
372 const instance = yield* CodexDriver.create({
373 instanceId: ProviderInstanceId.make("codex-installer"),
374 displayName: "Codex installer test",
375 enabled: false,
376 environment: [],
377 config: {
378 ...CodexDriver.defaultConfig(),
379 binaryPath,
380 homePath: NodePath.join(tempDir, "codex-home"),
381 },
382 });
383​
384 const update = (yield* instance.snapshot.resolveMaintenance()).update;
385 if (fixture.npmOwned) {
386 expect(update).toMatchObject({
387 executable: "npm",
388 args: [
389 "install",
390 "-g",
391 "--prefix",
392 installPath,
393 "--allow-scripts=@openai/codex",
394 "@openai/codex@latest",
395 ],
396 });
397 } else {
398 expect(update).toBeNull();
399 }
400 }).pipe(
401 Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, noSpawn),
402 Effect.scoped,
403 ),
404 );
405 }
406​
407 for (const layout of ["direct", "wrapper"] as const) {
408 it.effect.skipIf(windowsHost)(`leaves a mise ${layout} installation manual-only`, () =>
409 Effect.gen(function* () {
410 const fs = yield* FileSystem.FileSystem;
411 const tempDir = yield* fs
412 .makeTempDirectoryScoped({ prefix: `t3-codex-mise-${layout}-` })
413 .pipe(Effect.flatMap((directory) => fs.realPath(directory)));
414 const binaryPath =
415 layout === "direct"
416 ? NodePath.join(tempDir, "mise", "installs", "codex", "0.110.0", "codex")
417 : NodePath.join(tempDir, "omarchy", "bin", "codex");
418 yield* fs.makeDirectory(NodePath.dirname(binaryPath), { recursive: true });
419 yield* fs.writeFileString(
420 binaryPath,
421 layout === "direct"
422 ? "#!/bin/sh\n"
423 : '#!/bin/sh\nmise use -g --quiet "codex" || exit 1\nexec mise x "codex" -- "codex" "$@"\n',
424 );
425 yield* fs.chmod(binaryPath, 0o755);
426​
427 const instance = yield* CodexDriver.create({
428 instanceId: ProviderInstanceId.make(`codex-mise-${layout}`),
429 displayName: "Codex mise test",
430 enabled: false,
431 environment: [],
432 config: {
433 ...CodexDriver.defaultConfig(),
434 binaryPath,
435 homePath: NodePath.join(tempDir, "codex-home"),
436 },
437 });
438​
439 expect((yield* instance.snapshot.resolveMaintenance()).update).toBeNull();
440 }).pipe(
441 Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, noSpawn),
442 Effect.scoped,
443 ),
444 );
445 }
446​
447 it.effect.each([
448 {
449 name: "conventional shim",
450 dataRoot: "mise",
451 commandName: "codex",
452 version: "0.153.4",
453 nodeFirst: false,
454 },
455 {
456 name: "custom data directory",
457 dataRoot: "custom-tool-data",
458 commandName: "codex",
459 version: "0.153.4",
460 nodeFirst: false,
461 },
462 {
463 name: "renamed configured command",
464 dataRoot: "mise",
465 commandName: "custom-codex",
466 version: "0.153.4",
467 nodeFirst: false,
468 },
469 {
470 name: "outdated provider",
471 dataRoot: "mise",
472 commandName: "codex",
473 version: "0.153.3",
474 nodeFirst: false,
475 },
476 {
477 name: "npm before shim",
478 dataRoot: "mise",
479 commandName: "codex",
480 version: "0.153.4",
481 nodeFirst: true,
482 },
483 ])(
484 "does not mistake Homebrew mise for Codex's installer: $name",
485 (fixture) =>
486 Effect.gen(function* () {
487 const fs = yield* FileSystem.FileSystem;
488 const tempDir = yield* fs
489 .makeTempDirectoryScoped({ prefix: "t3-codex-mise-shim-" })
490 .pipe(Effect.flatMap((directory) => fs.realPath(directory)));
491 const brewPrefix = NodePath.join(tempDir, "homebrew");
492 const brewPath = NodePath.join(brewPrefix, "bin", "brew");
493 const misePath = NodePath.join(brewPrefix, "Cellar", "mise", "2026.9.1", "bin", "mise");
494 const shimDir = NodePath.join(tempDir, fixture.dataRoot, "shims");
495 const npmPrefix = NodePath.join(tempDir, "mise", "installs", "node", "24.13.0");
496 const npmBin = NodePath.join(npmPrefix, "bin");
497 const npmEntry = NodePath.join(
498 npmPrefix,
499 "lib",
500 "node_modules",
501 "@openai",
502 "codex",
503 "bin",
504 "codex.js",
505 );
506 for (const file of [brewPath, misePath, npmEntry]) {
507 yield* fs.makeDirectory(NodePath.dirname(file), { recursive: true });
508 yield* fs.writeFileString(file, "#!/bin/sh\n");
509 yield* fs.chmod(file, 0o755);
510 }
511 yield* fs.makeDirectory(shimDir, { recursive: true });
512 yield* fs.makeDirectory(npmBin, { recursive: true });
513 yield* fs.symlink(misePath, NodePath.join(shimDir, fixture.commandName));
514 yield* fs.symlink(npmEntry, NodePath.join(npmBin, fixture.commandName));
515 const lookupPath = [
516 ...(fixture.nodeFirst ? [npmBin, shimDir] : [shimDir, npmBin]),
517 NodePath.dirname(brewPath),
518 ].join(NodePath.delimiter);
519 const probes: Array<ReadonlyArray<string>> = [];
520 const metadataSpawner = ChildProcessSpawner.make((command) => {
521 if (!ChildProcess.isStandardCommand(command) || command.command !== brewPath) {
522 return Effect.die("Provider resolution must not execute a provider or updater");
523 }
524 probes.push(command.args);
525 const stdout =
526 command.args[0] === "--prefix"
527 ? brewPrefix
528 : JSON.stringify({ formulae: [{ versions: { stable: "2026.9.1" } }] });
529 return Effect.succeed(
530 ChildProcessSpawner.makeHandle({
531 pid: ChildProcessSpawner.ProcessId(1),
532 exitCode: Effect.succeed(ChildProcessSpawner.ExitCode(0)),
533 isRunning: Effect.succeed(false),
534 kill: () => Effect.void,
535 unref: Effect.succeed(Effect.void),
536 stdin: Sink.drain,
537 stdout: Stream.encodeText(Stream.make(stdout)),
538 stderr: Stream.empty,
539 all: Stream.empty,
540 getInputFd: () => Sink.drain,
541 getOutputFd: () => Stream.empty,
542 }),
543 );
544 });
545 const instance = yield* CodexDriver.create({
546 instanceId: ProviderInstanceId.make("codex-mise-shim"),
547 displayName: "Codex shim test",
548 enabled: false,
549 environment: [{ name: "PATH", value: lookupPath, sensitive: false }],
550 config: {
551 ...CodexDriver.defaultConfig(),
552 binaryPath: fixture.commandName,
553 homePath: NodePath.join(tempDir, "codex-home"),
554 },
555 }).pipe(Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, metadataSpawner));
556 const capabilities = yield* instance.snapshot.resolveMaintenance();
557 const latestVersion = yield* resolveLatestProviderVersion(capabilities).pipe(
558 Effect.provideService(
559 ProviderVersionCache,
560 new Map([
561 ["@openai/codex", { expiresAt: Number.MAX_SAFE_INTEGER, version: "0.153.4" }],
562 ]),
563 ),
564 );
565 expect(probes).toEqual([]);
566 expect(latestVersion).toBe("0.153.4");
567 expect(
568 createProviderVersionAdvisory({
569 driver: CodexDriver.driverKind,
570 currentVersion: fixture.version,
571 latestVersion,
572 maintenanceCapabilities: capabilities,
573 }),
574 ).toMatchObject({
575 status: fixture.version === "0.153.4" ? "current" : "behind_latest",
576 currentVersion: fixture.version,
577 latestVersion: "0.153.4",
578 canUpdate: fixture.nodeFirst,
579 });
580 if (fixture.nodeFirst) {
581 expect(capabilities.update).toMatchObject({
582 executable: "npm",
583 args: expect.arrayContaining([
584 "--prefix",
585 yield* fs.realPath(npmPrefix),
586 "@openai/codex@latest",
587 ]),
588 });
589 } else {
590 expect(capabilities.update).toBeNull();
591 }
592 }).pipe(Effect.scoped),
593 { skip: windowsHost },
594 );
595});