@devries-cameron20 / t3code-1 / commits / 9c02109b19
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

chore(lint): enforce preferSucceedSomeOrNone (#25080)

Julius Marminge committed Oct 25, 2026 at 18:18 UTC 9c02109b19ce3815293f3d9205783cbda4455913
32 files changed +133 -147
apps/desktop/src/app/DesktopClerk.test.ts
+1 -1
@@ -297,7 +297,7 @@ it.effect(
297 }),
298 } as unknown as ElectronApp.ElectronApp["Service"];
299 const electronWindow = {
300 - currentMainOrFirst: Effect.succeed(Option.some(window)),
300 + currentMainOrFirst: Effect.succeedSome(window),
301 reveal: () => Effect.sync(() => revealed.resolve()),
302 } as unknown as ElectronWindow.ElectronWindow["Service"];
303 return Effect.gen(function* () {
apps/desktop/src/app/DesktopWebLinks.test.ts
+1 -1
@@ -26,7 +26,7 @@ const makeWindow = () => {
26 Layer.succeed(
27 ElectronWindow.ElectronWindow,
28 ElectronWindow.ElectronWindow.of({
29 - currentMainOrFirst: Effect.succeed(Option.some(window)),
29 + currentMainOrFirst: Effect.succeedSome(window),
30 reveal: (target: Electron.BrowserWindow) => Effect.sync(() => void revealed.push(target)),
31 } as unknown as ElectronWindow.ElectronWindow["Service"]),
32 ),
apps/server/src/cloud/CloudLink.lifecycle.test.ts
+1 -1
@@ -163,7 +163,7 @@ describe("releaseManagedTunnelOnShutdown", () => {
163 ConnectReachability.ConnectReachability,
164 ConnectReachability.ConnectReachability.of({
165 check: Effect.die("unused"),
166 - latest: Effect.succeed(Option.none()),
166 + latest: Effect.succeedNone,
167 }),
168 ),
169 Effect.provideService(HttpServer.HttpServer, {
apps/server/src/cloud/CloudLink.test.ts
+1 -1
@@ -96,7 +96,7 @@ const withService = <A, E>(
96 Layer.mock(AgentAwarenessRelay.AgentAwarenessRelay)({ requestCatchUp: () => Effect.void }),
97 Layer.mock(ManagedEndpointRuntime.CloudManagedEndpointRuntime)({}),
98 Layer.mock(ConnectReachability.ConnectReachability)({
99 - latest: Effect.succeed(Option.none()),
99 + latest: Effect.succeedNone,
100 }),
101 Layer.mock(EnvironmentAuth.EnvironmentAuth)({}),
102 Layer.mock(CliTokenManager.CloudCliTokenManager)({}),
apps/server/src/cloud/http.test.ts
+1 -1
@@ -78,7 +78,7 @@ const layerLinkProofRoutes = HttpApiBuilder.layer(LinkProofTestApi).pipe(
78 Layer.provide(AuthHttp.layerAuthenticatedAuth),
79 Layer.provide(CloudLink.layer),
80 Layer.provide(
81 - Layer.mock(ConnectReachability.ConnectReachability)({ latest: Effect.succeed(Option.none()) }),
81 + Layer.mock(ConnectReachability.ConnectReachability)({ latest: Effect.succeedNone }),
82 ),
83 Layer.provide(EnvironmentAuth.layer),
84 Layer.provide([
apps/server/src/mcp/McpDeviceToolkit.test.ts
+1 -1
@@ -102,7 +102,7 @@ const readiness = {
102 agentDevice: null,
103 };
104 const layerProjectsMock = Layer.mock(ProjectService.ProjectService)({
105 - getById: () => Effect.succeed(Option.none()),
105 + getById: () => Effect.succeedNone,
106 });
107
108 const layerDeviceServiceMock = Layer.mock(DeviceService.DeviceService)({
apps/server/src/orchestration-v2/CheckpointRestoreSafety.test.ts
+1 -1
@@ -101,7 +101,7 @@ it.effect.each([
101 IdAllocator.layer,
102 Layer.mock(GitWorkflowService.GitWorkflowService)({}),
103 Layer.mock(ProjectStore.ProjectStoreV2)({
104 - get: () => Effect.succeed(Option.some({ workspaceRoot: parent } as never)),
104 + get: () => Effect.succeedSome({ workspaceRoot: parent } as never),
105 }),
106 Layer.mock(ProjectionStoreV2)({
107 getThread: () => Effect.succeed(projection.thread),
apps/server/src/orchestration-v2/CheckpointRollbackService.test.ts
+1 -1
@@ -229,7 +229,7 @@ it.effect.each([
229 Layer.mock(ProjectStore.ProjectStoreV2)({
230 get: (id) => {
231 assert.equal(id, projectId);
232 - return Effect.succeed(Option.some({ workspaceRoot } as never));
232 + return Effect.succeedSome({ workspaceRoot } as never);
233 },
234 }),
235 Layer.mock(GitWorkflow.GitWorkflowService)({
apps/server/src/orchestration-v2/CommandReceiptStore.ts
+3 -3
@@ -161,10 +161,10 @@ const layerBase: Layer.Layer<
161 receipts.getByCommandId({ commandId }).pipe(
162 Effect.flatMap(
163 Option.match({
164 - onNone: () => Effect.succeed(Option.none()),
164 + onNone: () => Effect.succeedNone,
165 onSome: (receipt) =>
166 receipt.aggregateKind !== "thread"
167 - ? Effect.succeed(Option.none())
167 + ? Effect.succeedNone
168 : fromApplicationReceipt(receipt).pipe(Effect.asSome),
169 }),
170 ),
@@ -180,7 +180,7 @@ const layerBase: Layer.Layer<
180 receipts.getByCommandId({ commandId }).pipe(
181 Effect.flatMap((receipt) =>
182 Option.isNone(receipt) || receipt.value.aggregateKind !== "project"
183 - ? Effect.succeed(Option.none())
183 + ? Effect.succeedNone
184 : decodeProjectReceipt({
185 commandId: receipt.value.commandId,
186 projectId: receipt.value.aggregateId,
apps/server/src/orchestration-v2/EffectOutbox.ts
+1 -3
@@ -419,9 +419,7 @@ export const layer: Layer.Layer<EffectOutboxV2, never, SqlClient.SqlClient> = La
419 NodeSqliteClient.readOnly,
420 Effect.flatMap((rows) => {
421 const row = rows[0];
422 - return row === undefined
423 - ? Effect.succeed(Option.none())
424 - : rowToEffect(row).pipe(Effect.asSome);
422 + return row === undefined ? Effect.succeedNone : rowToEffect(row).pipe(Effect.asSome);
423 }),
424 Effect.mapError((cause) => new EffectOutboxError({ operation: "get", effectId, cause })),
425 ),
apps/server/src/orchestration-v2/EffectWorker.test.ts
+5 -5
@@ -106,7 +106,7 @@ function layerExecutorFor(input: {
106 ProviderSessionManager.ProviderSessionManagerV2.of({
107 shutdown: Effect.void,
108 open: () => Effect.die("unused open"),
109 - get: () => Effect.succeed(Option.none()),
109 + get: () => Effect.succeedNone,
110 isLive: () => Effect.succeed(false),
111 close: () => Effect.void,
112 closeInstance: () => Effect.void,
@@ -339,7 +339,7 @@ it.effect("requeues a claim when a pre-execution worker check fails", () =>
339 >([]);
340 const executionCount = yield* Ref.make(0);
341 const layerOutbox = Layer.mock(EffectOutbox.EffectOutboxV2)({
342 - claimNext: () => Effect.succeed(Option.some(claimedEffect)),
342 + claimNext: () => Effect.succeedSome(claimedEffect),
343 get: () =>
344 Effect.fail(
345 new EffectOutbox.EffectOutboxError({
@@ -406,7 +406,7 @@ it.effect("arms cancellation before the durable pre-execution check", () =>
406 const executionCount = yield* Ref.make(0);
407 const settlementCount = yield* Ref.make(0);
408 const layerOutbox = Layer.mock(EffectOutbox.EffectOutboxV2)({
409 - claimNext: () => Effect.succeed(Option.some(claimedEffect)),
409 + claimNext: () => Effect.succeedSome(claimedEffect),
410 awaitCancellation: () => {
411 cancellationArmed = true;
412 return Deferred.await(signal);
@@ -473,8 +473,8 @@ it.effect("terminalizes a process-bound claim when success settlement fails", ()
473 const terminalErrors = yield* Ref.make<ReadonlyArray<string>>([]);
474 const executionCount = yield* Ref.make(0);
475 const layerOutbox = Layer.mock(EffectOutbox.EffectOutboxV2)({
476 - claimNext: () => Effect.succeed(Option.some(claimedEffect)),
477 - get: () => Effect.succeed(Option.some(claimedEffect)),
476 + claimNext: () => Effect.succeedSome(claimedEffect),
477 + get: () => Effect.succeedSome(claimedEffect),
478 awaitCancellation: () => Effect.never,
479 clearCancellation: () => Effect.void,
480 succeed: () =>
apps/server/src/orchestration-v2/FoundationPersistence.test.ts
+10 -12
@@ -1960,17 +1960,15 @@ it.layer(layerTest)("orchestration V2 foundation persistence", (it) => {
1960 };
1961 const executionCount = yield* Ref.make(0);
1962 const layerOutbox = Layer.mock(EffectOutbox.EffectOutboxV2)({
1963 - claimNext: () => Effect.succeed(Option.some(claimedEffect)),
1963 + claimNext: () => Effect.succeedSome(claimedEffect),
1964 get: () =>
1965 - Effect.succeed(
1966 - Option.some({
1967 - ...claimedEffect,
1968 - status: "cancelled" as const,
1969 - leaseOwner: null,
1970 - leaseExpiresAt: null,
1971 - completedAt: now,
1972 - }),
1973 - ),
1965 + Effect.succeedSome({
1966 + ...claimedEffect,
1967 + status: "cancelled" as const,
1968 + leaseOwner: null,
1969 + leaseExpiresAt: null,
1970 + completedAt: now,
1971 + }),
1972 clearCancellation: () => Effect.void,
1973 awaitCancellation: () => Effect.never,
1974 });
@@ -2832,7 +2830,7 @@ it.layer(layerTest)("orchestration V2 foundation persistence", (it) => {
2830 awaitWork: Effect.void,
2831 runRecoveryOnce: Effect.succeed(false),
2832 runOnce: Effect.succeed(false),
2835 - nextClaimableAt: Effect.succeed(Option.none()),
2833 + nextClaimableAt: Effect.succeedNone,
2834 drain: () => Effect.succeed(0),
2835 }),
2836 ),
@@ -3049,7 +3047,7 @@ it.layer(layerTest)("orchestration V2 foundation persistence", (it) => {
3047 awaitWork: Effect.void,
3048 runRecoveryOnce: Effect.succeed(false),
3049 runOnce: Effect.succeed(false),
3052 - nextClaimableAt: Effect.succeed(Option.none()),
3050 + nextClaimableAt: Effect.succeedNone,
3051 drain: () => Effect.succeed(0),
3052 }),
3053 ),
apps/server/src/orchestration-v2/ProjectionControlReads.test.ts
+20 -17
@@ -276,23 +276,26 @@ it.effect.each(storageCases)(
276 const calls: string[] = [];
277 const layerSessions = Layer.mock(ProviderSessionManager.ProviderSessionManagerV2)({
278 get: () =>
279 - Effect.succeed(
280 - Option.some({
281 - interruptTurn: () =>
282 - Effect.sync(() => {
283 - calls.push("interrupt");
284 - }),
285 - steerTurn: (input: { message: { text: string }; runId: RunId }) =>
286 - Effect.sync(() => {
287 - assert.equal(input.runId, runId);
288 - calls.push(input.message.text);
289 - }),
290 - respondToRuntimeRequest: () =>
291 - Effect.sync(() => {
292 - calls.push("reply");
293 - }),
294 - } as never),
295 - ),
279 + Effect.succeedSome({
280 + interruptTurn: () =>
281 + Effect.sync(() => {
282 + calls.push("interrupt");
283 + }),
284 + steerTurn: (input: {
285 + message: {
286 + text: string;
287 + };
288 + runId: RunId;
289 + }) =>
290 + Effect.sync(() => {
291 + assert.equal(input.runId, runId);
292 + calls.push(input.message.text);
293 + }),
294 + respondToRuntimeRequest: () =>
295 + Effect.sync(() => {
296 + calls.push("reply");
297 + }),
298 + } as never),
299 });
300 yield* Effect.gen(function* () {
301 const control = yield* ProviderTurnControlService.ProviderTurnControlServiceV2;
apps/server/src/orchestration-v2/ProviderSessionManager.test.ts
+1 -1
@@ -1150,7 +1150,7 @@ it.effect(
1150 Effect.flatMap((hold) =>
1151 hold
1152 ? Deferred.succeed(projectReadHeld, undefined).pipe(Effect.andThen(Effect.never))
1153 - : Effect.succeed(Option.some(makeBrowserAccessProject(requestedProjectId))),
1153 + : Effect.succeedSome(makeBrowserAccessProject(requestedProjectId)),
1154 ),
1155 ),
1156 });
apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts
+2 -4
@@ -145,9 +145,7 @@ function startWithMissingWorktree(
145 Layer.mock(GitWorkflow.GitWorkflowService)({ pruneWorktrees, createWorktree }),
146 Layer.mock(ProjectService.ProjectService)({
147 getById: () =>
148 - Effect.succeed(
149 - Option.some({ workspaceRoot: "/tmp/provider-turn-start-project" } as never),
150 - ),
148 + Effect.succeedSome({ workspaceRoot: "/tmp/provider-turn-start-project" } as never),
149 }),
150 Layer.mock(ProjectionStore.ProjectionStoreV2)({
151 getThreadRecords: () => {
@@ -698,7 +696,7 @@ function makeLocalCommandHarness(input: {
696 }),
697 Layer.mock(ProjectService.ProjectService)({
698 getById: () =>
701 - Effect.succeed(Option.some({ workspaceRoot: "/tmp/native-account-project" } as never)),
699 + Effect.succeedSome({ workspaceRoot: "/tmp/native-account-project" } as never),
700 }),
701 Layer.mock(ProjectionStore.ProjectionStoreV2)({
702 getThreadRecords,
apps/server/src/orchestration-v2/ProviderTurnStartService.testkit.ts
+1 -1
@@ -11,6 +11,6 @@ export const layer = Layer.merge(
11 createWorktree: () => Effect.succeed({} as never),
12 }),
13 Layer.mock(ProjectService.ProjectService)({
14 - getById: () => Effect.succeed(Option.none()),
14 + getById: () => Effect.succeedNone,
15 }),
16 );
apps/server/src/orchestration-v2/RuntimePolicy.test.ts
+14 -16
@@ -87,22 +87,20 @@ const layerTest = RuntimePolicy.layerFromProjectStore.pipe(
87 Layer.provide(
88 Layer.mock(ProjectStore.ProjectStoreV2)({
89 get: () =>
90 - Effect.succeed(
91 - Option.some({
92 - projectId,
93 - title: "Project",
94 - workspaceRoot: "/project-root",
95 - defaultModelSelection: null,
96 - defaultThreadEnvMode: null,
97 - autoPull: false,
98 - faviconPath: null,
99 - projectIcon: null,
100 - scripts: [],
101 - createdAt: "2026-06-21T00:00:00.000Z",
102 - updatedAt: "2026-06-21T00:00:00.000Z",
103 - deletedAt: null,
104 - }),
105 - ),
90 + Effect.succeedSome({
91 + projectId,
92 + title: "Project",
93 + workspaceRoot: "/project-root",
94 + defaultModelSelection: null,
95 + defaultThreadEnvMode: null,
96 + autoPull: false,
97 + faviconPath: null,
98 + projectIcon: null,
99 + scripts: [],
100 + createdAt: "2026-06-21T00:00:00.000Z",
101 + updatedAt: "2026-06-21T00:00:00.000Z",
102 + deletedAt: null,
103 + }),
104 }),
105 ),
106 );
apps/server/src/orchestration-v2/RuntimeRequestService.test.ts
+3 -5
@@ -26,11 +26,9 @@ it.effect.each(["expired", "resolved"] as const)(
26 (_input: ProviderAdapter.ProviderAdapterV2RuntimeRequestResponseInput) => Effect.void,
27 );
28 const getSession = vi.fn(() =>
29 - Effect.succeed(
30 - Option.some({
31 - respondToRuntimeRequest,
32 - } as never),
33 - ),
29 + Effect.succeedSome({
30 + respondToRuntimeRequest,
31 + } as never),
32 );
33 const projection = {
34 runtimeRequests: [
apps/server/src/orchestration-v2/ThreadLaunchService.test.ts
+2 -2
@@ -186,7 +186,7 @@ function makeHarness(options: HarnessOptions = {}) {
186 ? Option.some(otherProject)
187 : Option.none(),
188 ),
189 - getByWorkspaceRoot: () => Effect.succeed(Option.some(project)),
189 + getByWorkspaceRoot: () => Effect.succeedSome(project),
190 snapshot: Effect.die("unused"),
191 getShell: () => Effect.die("unused"),
192 listShells: () => Effect.die("unused"),
@@ -217,7 +217,7 @@ function makeHarness(options: HarnessOptions = {}) {
217 Layer.mock(ManagedProjectFolders.ManagedProjectFolders)({
218 namedProjectsRoot: "/projects",
219 isScratchProject: () => Effect.succeed(false),
220 - folderForThread: () => Effect.succeed(Option.none()),
220 + folderForThread: () => Effect.succeedNone,
221 }),
222 );
223 const layerLaunch = ThreadLaunch.layer.pipe(
apps/server/src/orchestration-v2/ThreadPullRequestService.test.ts
+2 -2
@@ -115,7 +115,7 @@ describe("ThreadPullRequestServiceV2 reads", () => {
115 }),
116 Layer.mock(ProjectStore.ProjectStoreV2)({
117 listShells: () => Effect.succeed([project]),
118 - getShell: () => Effect.succeed(Option.some(project)),
118 + getShell: () => Effect.succeedSome(project),
119 }),
120 Layer.mock(GitManager.GitManager)({
121 branchPullRequest: (_input, options) =>
@@ -234,7 +234,7 @@ describe("ThreadPullRequestServiceV2 reads", () => {
234 }),
235 Layer.mock(ProjectStore.ProjectStoreV2)({
236 listShells: () => Effect.succeed([project]),
237 - getShell: () => Effect.succeed(Option.some(project)),
237 + getShell: () => Effect.succeedSome(project),
238 }),
239 Layer.mock(GitManager.GitManager)({
240 branchPullRequest: () => Effect.succeed(null),
apps/server/src/orchestration-v2/runtimeLayer.test.ts
+6 -8
@@ -117,7 +117,7 @@ const layerGitWorkflowTest = Layer.mock(GitWorkflow.GitWorkflowService)({
117 createWorktree: () => Effect.succeed({} as never),
118 });
119 const layerProjectServiceTest = Layer.mock(ProjectService.ProjectService)({
120 - getById: () => Effect.succeed(Option.none()),
120 + getById: () => Effect.succeedNone,
121 });
122
123 const driver = ProviderDriverKind.make("codex");
@@ -991,13 +991,11 @@ it.layer(layerTest)("OrchestrationV2LayerLive", (it) => {
991 },
992 ],
993 });
994 - const sessionSpy = vi
995 - .spyOn(sessions, "get")
996 - .mockReturnValue(
997 - Effect.succeed(
998 - Option.some({ providerSession } as ProviderAdapter.ProviderAdapterV2SessionRuntime),
999 - ),
1000 - );
994 + const sessionSpy = vi.spyOn(sessions, "get").mockReturnValue(
995 + Effect.succeedSome({
996 + providerSession,
997 + } as ProviderAdapter.ProviderAdapterV2SessionRuntime),
998 + );
999 yield* Effect.addFinalizer(() => Effect.sync(() => sessionSpy.mockRestore()));
1000
1001 const steerCommandId = CommandId.make("runtime-delivery-intent-auto");
apps/server/src/project/AgentSessionImporter.test.ts
+10 -12
@@ -209,18 +209,16 @@ const makeImporter = Effect.fn(function* (
209 }),
210 Layer.mock(ProjectService.ProjectService)({
211 getById: () =>
212 - Effect.succeed(
213 - Option.some({
214 - id: projectId,
215 - title: "Project",
216 - workspaceRoot: "/workspace/project",
217 - defaultModelSelection: null,
218 - scripts: [],
219 - createdAt: timestamp,
220 - updatedAt: timestamp,
221 - deletedAt: null,
222 - }),
223 - ),
212 + Effect.succeedSome({
213 + id: projectId,
214 + title: "Project",
215 + workspaceRoot: "/workspace/project",
216 + defaultModelSelection: null,
217 + scripts: [],
218 + createdAt: timestamp,
219 + updatedAt: timestamp,
220 + deletedAt: null,
221 + }),
222 }),
223 Layer.mock(Orchestrator.OrchestratorV2)({
224 getThreadRecords: (threadId, fields) =>
apps/server/src/project/ManagedProjectFolders.ts
+2 -2
@@ -330,9 +330,9 @@ const make = Effect.gen(function* () {
330 return yield* claimFreeFolder(
331 (attempt) =>
332 attempt === 1
333 - ? Effect.succeed(Option.some(folderFor(id.slice(-8))))
333 + ? Effect.succeedSome(folderFor(id.slice(-8)))
334 : attempt === 2
335 - ? Effect.succeed(Option.some(fullFolder))
335 + ? Effect.succeedSome(fullFolder)
336 : crypto.randomUUIDv4().pipe(
337 Effect.map((uuid) => Option.some(`${fullFolder}-${uuid.slice(0, 8)}`)),
338 Effect.mapError((cause) => new ScratchFolderError({ folder: fullFolder, cause })),
apps/server/src/relay/AgentAwarenessRelay.test.ts
+10 -12
@@ -270,18 +270,16 @@ const makeTestRelay = Effect.fnUntraced(function* (
270 getShell: unused,
271 listShells: unused,
272 getById: () =>
273 - Effect.succeed(
274 - Option.some({
275 - id: PROJECT_ID,
276 - title: "Project",
277 - workspaceRoot: "/workspace",
278 - defaultModelSelection: null,
279 - scripts: [],
280 - createdAt: NOW,
281 - updatedAt: NOW,
282 - deletedAt: null,
283 - }),
284 - ),
273 + Effect.succeedSome({
274 + id: PROJECT_ID,
275 + title: "Project",
276 + workspaceRoot: "/workspace",
277 + defaultModelSelection: null,
278 + scripts: [],
279 + createdAt: NOW,
280 + updatedAt: NOW,
281 + deletedAt: null,
282 + }),
283 }),
284 Effect.provideService(FetchHttpClient.Fetch, fetch),
285 Effect.provide(NodeCrypto.layer),
packages/client-runtime/src/authorization/remote.test.ts
+2 -2
@@ -331,12 +331,12 @@ describe("remote environment authorization", () => {
331 Effect.provideService(
332 ClientCapabilities.CloudSession,
333 ClientCapabilities.CloudSession.of({
334 - identity: Effect.succeed(Option.some({ accountId: "user_connect" })),
334 + identity: Effect.succeedSome({ accountId: "user_connect" }),
335 clerkToken: Effect.succeed("clerk-token"),
336 }),
337 ),
338 Effect.provideService(ClientCapabilities.AnalyticsDevice, {
339 - id: Effect.succeed(Option.some("device-1")),
339 + id: Effect.succeedSome("device-1"),
340 }),
341 ),
342 );
packages/client-runtime/src/state/shell-sync.test.ts
+24 -24
@@ -237,25 +237,25 @@ describe("environment shell synchronization", () => {
237 retryNow: Effect.void,
238 } satisfies EnvironmentSupervisor.EnvironmentSupervisor["Service"]);
239 const cache = Persistence.EnvironmentCacheStore.of({
240 - loadShell: () => Effect.succeed(Option.none()),
240 + loadShell: () => Effect.succeedNone,
241 saveShell: (_environmentId, snapshot) =>
242 Deferred.succeed(saveStarted, undefined).pipe(
243 Effect.andThen(Deferred.await(releaseSave)),
244 Effect.andThen(Ref.update(saved, (values) => [...values, snapshot])),
245 ),
246 - loadThread: () => Effect.succeed(Option.none()),
246 + loadThread: () => Effect.succeedNone,
247 saveThread: () => Effect.void,
248 removeThread: () => Effect.void,
249 - loadServerConfig: () => Effect.succeed(Option.none()),
249 + loadServerConfig: () => Effect.succeedNone,
250 saveServerConfig: () => Effect.void,
251 - loadVcsRefs: () => Effect.succeed(Option.none()),
251 + loadVcsRefs: () => Effect.succeedNone,
252 saveVcsRefs: () => Effect.void,
253 removeVcsRefs: () => Effect.void,
254 clearVcsRefs: () => Effect.void,
255 clear: () => Effect.void,
256 });
257 const snapshotLoader = ShellSnapshotLoader.ShellSnapshotLoader.of({
258 - load: () => Effect.succeed(Option.none()),
258 + load: () => Effect.succeedNone,
259 });
260
261 const shellState = yield* makeEnvironmentShellState().pipe(
@@ -376,7 +376,7 @@ describe("environment shell synchronization", () => {
376 retryNow: Effect.void,
377 } satisfies EnvironmentSupervisor.EnvironmentSupervisor["Service"]);
378 const cache = Persistence.EnvironmentCacheStore.of({
379 - loadShell: () => Effect.succeed(Option.none()),
379 + loadShell: () => Effect.succeedNone,
380 saveShell: (_environmentId, snapshot) =>
381 Effect.gen(function* () {
382 if (snapshot.projects[0]?.repositoryIdentity == null) {
@@ -385,19 +385,19 @@ describe("environment shell synchronization", () => {
385 }
386 yield* Ref.update(saved, (values) => [...values, snapshot]);
387 }),
388 - loadThread: () => Effect.succeed(Option.none()),
388 + loadThread: () => Effect.succeedNone,
389 saveThread: () => Effect.void,
390 removeThread: () => Effect.void,
391 - loadServerConfig: () => Effect.succeed(Option.none()),
391 + loadServerConfig: () => Effect.succeedNone,
392 saveServerConfig: () => Effect.void,
393 - loadVcsRefs: () => Effect.succeed(Option.none()),
393 + loadVcsRefs: () => Effect.succeedNone,
394 saveVcsRefs: () => Effect.void,
395 removeVcsRefs: () => Effect.void,
396 clearVcsRefs: () => Effect.void,
397 clear: () => Effect.void,
398 });
399 const snapshotLoader = ShellSnapshotLoader.ShellSnapshotLoader.of({
400 - load: () => Effect.succeed(Option.none()),
400 + load: () => Effect.succeedNone,
401 });
402
403 const shellState = yield* makeEnvironmentShellState().pipe(
@@ -496,25 +496,25 @@ describe("environment shell synchronization", () => {
496 retryNow: Effect.void,
497 } satisfies EnvironmentSupervisor.EnvironmentSupervisor["Service"]);
498 const cache = Persistence.EnvironmentCacheStore.of({
499 - loadShell: () => Effect.succeed(Option.none()),
499 + loadShell: () => Effect.succeedNone,
500 saveShell: (_environmentId, snapshot) =>
501 Deferred.succeed(saveStarted, undefined).pipe(
502 Effect.andThen(Deferred.await(releaseSave)),
503 Effect.andThen(Ref.update(saved, (values) => [...values, snapshot])),
504 ),
505 - loadThread: () => Effect.succeed(Option.none()),
505 + loadThread: () => Effect.succeedNone,
506 saveThread: () => Effect.void,
507 removeThread: () => Effect.void,
508 - loadServerConfig: () => Effect.succeed(Option.none()),
508 + loadServerConfig: () => Effect.succeedNone,
509 saveServerConfig: () => Effect.void,
510 - loadVcsRefs: () => Effect.succeed(Option.none()),
510 + loadVcsRefs: () => Effect.succeedNone,
511 saveVcsRefs: () => Effect.void,
512 removeVcsRefs: () => Effect.void,
513 clearVcsRefs: () => Effect.void,
514 clear: () => Effect.void,
515 });
516 const snapshotLoader = ShellSnapshotLoader.ShellSnapshotLoader.of({
517 - load: () => Effect.succeed(Option.none()),
517 + load: () => Effect.succeedNone,
518 });
519
520 const scope = yield* Scope.make();
@@ -593,21 +593,21 @@ describe("environment shell synchronization", () => {
593 retryNow: Effect.void,
594 } satisfies EnvironmentSupervisor.EnvironmentSupervisor["Service"]);
595 const cache = Persistence.EnvironmentCacheStore.of({
596 - loadShell: () => Effect.succeed(Option.some(cachedSnapshot)),
596 + loadShell: () => Effect.succeedSome(cachedSnapshot),
597 saveShell: () => Effect.void,
598 - loadThread: () => Effect.succeed(Option.none()),
598 + loadThread: () => Effect.succeedNone,
599 saveThread: () => Effect.void,
600 removeThread: () => Effect.void,
601 - loadServerConfig: () => Effect.succeed(Option.none()),
601 + loadServerConfig: () => Effect.succeedNone,
602 saveServerConfig: () => Effect.void,
603 - loadVcsRefs: () => Effect.succeed(Option.none()),
603 + loadVcsRefs: () => Effect.succeedNone,
604 saveVcsRefs: () => Effect.void,
605 removeVcsRefs: () => Effect.void,
606 clearVcsRefs: () => Effect.void,
607 clear: () => Effect.void,
608 });
609 const snapshotLoader = ShellSnapshotLoader.ShellSnapshotLoader.of({
610 - load: () => Effect.succeed(Option.some(httpSnapshot)),
610 + load: () => Effect.succeedSome(httpSnapshot),
611 });
612 const shellState = yield* makeEnvironmentShellState().pipe(
613 Effect.provideService(EnvironmentSupervisor.EnvironmentSupervisor, supervisor),
@@ -657,14 +657,14 @@ describe("environment shell synchronization", () => {
657 retryNow: Effect.void,
658 } satisfies EnvironmentSupervisor.EnvironmentSupervisor["Service"]);
659 const cache = Persistence.EnvironmentCacheStore.of({
660 - loadShell: () => Effect.succeed(Option.none()),
660 + loadShell: () => Effect.succeedNone,
661 saveShell: () => Effect.void,
662 - loadThread: () => Effect.succeed(Option.none()),
662 + loadThread: () => Effect.succeedNone,
663 saveThread: () => Effect.void,
664 removeThread: () => Effect.void,
665 - loadServerConfig: () => Effect.succeed(Option.none()),
665 + loadServerConfig: () => Effect.succeedNone,
666 saveServerConfig: () => Effect.void,
667 - loadVcsRefs: () => Effect.succeed(Option.none()),
667 + loadVcsRefs: () => Effect.succeedNone,
668 saveVcsRefs: () => Effect.void,
669 removeVcsRefs: () => Effect.void,
670 clearVcsRefs: () => Effect.void,
packages/client-runtime/src/state/threads-sync.test.ts
+1 -3
@@ -1520,9 +1520,7 @@ describe("EnvironmentThreads", () => {
1520 });
1521
1522 const warm = yield* makeHarness(
1523 - cacheKind === "retained"
1524 - ? { resumeCache }
1525 - : { loadCached: Effect.succeed(Option.some(saved!)) },
1523 + cacheKind === "retained" ? { resumeCache } : { loadCached: Effect.succeedSome(saved!) },
1524 );
1525 yield* Queue.offer(warm.inputs, titleUpdated("Grown while closed", 200));
1526 yield* awaitThreadState(
packages/provider-muse/src/server/adapter.ts
+1 -1
@@ -1356,7 +1356,7 @@ export const makeMuseAdapterV2 = Effect.fn("makeMuseAdapterV2")(function* (
1356 detail: null,
1357 ...(notification ? { notification } : {}),
1358 dispatchIfCurrent: (dispatch) =>
1359 - wake === held ? Effect.asSome(dispatch) : Effect.succeed(Option.none()),
1359 + wake === held ? Effect.asSome(dispatch) : Effect.succeedNone,
1360 clearIfCurrent: () =>
1361 Effect.sync(() => {
1362 if (wake === held) wake = undefined;
packages/provider-opencode/src/server/v2/adapter.ts
+1 -1
@@ -1504,7 +1504,7 @@ export const make = Effect.fn("OpenCode2Adapter.make")(function* (instanceId: Pr
1504 messageId: wake.messageId,
1505 ...(notification === null ? {} : { notification }),
1506 dispatchIfCurrent: (dispatch) =>
1507 - wake.dropped ? Effect.succeed(Option.none()) : Effect.asSome(dispatch),
1507 + wake.dropped ? Effect.succeedNone : Effect.asSome(dispatch),
1508 });
1509 });
1510
packages/provider-pi/src/server/adapter.ts
+1 -1
@@ -1663,7 +1663,7 @@ export const makePiAdapterV2 = Effect.fn("makePiAdapterV2")(function* (
1663 Effect.asSome,
1664 Effect.tapError(() => stopPendingWake(wake)),
1665 )
1666 - : Effect.succeed(Option.none()),
1666 + : Effect.succeedNone,
1667 ),
1668 ),
1669 clearIfCurrent: () => sessionEventPermit.withPermits(1)(stopPendingWake(wake)),
packages/source-control-gitcafe/src/server/GitCafePullRequestProvider.ts
+2 -2
@@ -418,7 +418,7 @@ export const make = Effect.gen(function* () {
418 PullRequestProviderError: (error) =>
419 error.reason === "unauthenticated" || error.reason === "rate-limited"
420 ? Effect.fail(error)
421 - : Effect.succeed(Option.none()),
421 + : Effect.succeedNone,
422 }),
423 );
424 const actorId = Option.isSome(user)
@@ -773,7 +773,7 @@ export const make = Effect.gen(function* () {
773 PullRequestProviderError: (error) =>
774 error.reason === "unauthenticated" || error.reason === "rate-limited"
775 ? Effect.fail(error)
776 - : Effect.succeed(Option.none()),
776 + : Effect.succeedNone,
777 }),
778 );
779 if (Option.isSome(principal)) {
tsconfig.base.json
+1
@@ -24,6 +24,7 @@
24 "namespaceImportPackages": ["@effect/platform-node", "effect"],
25 "effectFn": ["span", "inferred-span", "suggested-span"],
26 "diagnosticSeverity": {
27 + "preferSucceedSomeOrNone": "error",
28 "effectSucceedWithVoid": "error",
29 "provideLayerSucceedToProvideService": "error",
30 "flatMapIgnoredParamToAndThen": "error",