@devries-cameron20 / t3code Mirror · read-only / commits / 11bd26e4b5
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 17:00 UTC

chore(lint): enforce effectSucceedWithVoid (#25074)

Julius Marminge committed Oct 25, 2026 at 18:18 UTC 11bd26e4b59063ec28383c3ce0d3c91a9b6f67b1
19 files changed +32 -9
apps/server/src/cli/thread.ts
+1 -1
@@ -465,7 +465,7 @@ const launchWorkspaceStrategy = (input: {
465 onNone: () =>
466 Option.isSome(input.branch)
467 ? Effect.fail(new ThreadUsageError({ detail: "--branch needs --worktree <base-ref>." }))
468 - : Effect.succeed(undefined),
468 + : Effect.void,
469 onSome: (baseRef) =>
470 Effect.succeed({
471 type: "worktree" as const,
apps/server/src/mcp/McpSessionRegistry.testkit.ts
+1
@@ -19,6 +19,7 @@ export const layer = Layer.succeed(
19 browserToolsAvailable: true,
20 },
21 }),
22 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
23 resolve: () => Effect.succeed(undefined),
24 touch: () => Effect.void,
25 revokeProviderSession: () => Effect.void,
apps/server/src/observability/EventLoopMonitor.ts
+1
@@ -35,6 +35,7 @@ export class EventLoopMonitor extends Context.Reference<{
35 */
36 readonly latestNoticeableStall: Effect.Effect<ServerEventLoopStall | undefined>;
37 }>("t3/observability/EventLoopMonitor", {
38 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
39 defaultValue: () => ({ latestNoticeableStall: Effect.succeed(undefined) }),
40 }) {}
41
apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts
+4
@@ -48,6 +48,7 @@ const flavor = makeAntigravityAcpAdapterFlavor({
48 selfInvocation: undefined as never,
49 makeRuntime: () => Effect.die("not spawned in this test"),
50 withProcess: (_stop, task) => task,
51 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
52 defaultModel: Effect.succeed(undefined),
53 });
54
@@ -169,6 +170,7 @@ describe("AntigravityAdapterV2 client file system", () => {
170 })),
171 ),
172 withProcess: (_stop, task) => task,
173 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
174 defaultModel: Effect.succeed(undefined),
175 });
176 const workspace = yield* fileSystem.makeTempDirectoryScoped({
@@ -337,6 +339,7 @@ describe("AntigravityAdapterV2 workspace changes", () => {
339 })),
340 ),
341 withProcess: (_stop, task) => task,
342 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
343 defaultModel: Effect.succeed(undefined),
344 });
345 const workspaceA = yield* fileSystem.makeTempDirectoryScoped({ prefix: "t3-ag-a-" });
@@ -586,6 +589,7 @@ describe("AntigravityAdapterV2 html_render pages", () => {
589 })),
590 ),
591 withProcess: (_stop, task) => task,
592 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
593 defaultModel: Effect.succeed(undefined),
594 });
595 const runtimePolicy = ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({
apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts
+1
@@ -1700,6 +1700,7 @@ export const makeCodexAdapterV2 = Effect.fn("makeCodexAdapterV2")(function* (
1700 ) {
1701 const mcpSessions = yield* McpProviderSessions.McpProviderSessions;
1702 const readMcpSession = (threadId: ThreadId | null) =>
1703 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
1704 threadId === null ? Effect.succeed(undefined) : mcpSessions.read(threadId);
1705 const { clientFactory, crypto, fileSystem, idAllocator, serverConfig } = adapterOptions;
1706 const continuationRequests = adapterOptions.continuationRequests;
apps/server/src/orchestration-v2/ProjectSettingsUpgrade.integration.test.ts
+1
@@ -157,6 +157,7 @@ const layerRuntime = (dbPath: string) => {
157 Layer.provide(ServerSettings.layerTest()),
158 Layer.provide(
159 Layer.succeed(ProviderInstanceRegistry.ProviderInstanceRegistry, {
160 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
161 getInstance: () => Effect.succeed(undefined),
162 listInstances: Effect.succeed([]),
163 listUnavailable: Effect.succeed([]),
apps/server/src/orchestration-v2/ProviderTurnStartService.ts
+1
@@ -201,6 +201,7 @@ export const layer: Layer.Layer<
201 const request = turnItems.find((item) => item.type === "run_interrupt_request");
202 return request?.type === "run_interrupt_request" ? request.message : undefined;
203 }),
204 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
205 Effect.catchCause(() => Effect.succeed(undefined)),
206 ),
207 };
apps/server/src/preview/ServerBrowser.ts
+1 -1
@@ -1742,7 +1742,7 @@ const make = Effect.gen(function* () {
1742 ? await Effect.runPromise(
1743 findTab(request.threadId, request.tabId).pipe(
1744 Effect.catchTags({
1745 - ServerBrowserTabNotFoundError: () => Effect.succeed(undefined),
1745 + ServerBrowserTabNotFoundError: () => Effect.void,
1746 }),
1747 ),
1748 )
apps/server/src/provider/CodexProvider.ts
+2 -1
@@ -556,7 +556,8 @@ const probeCodexAppServerProvider = Effect.fn("probeCodexAppServerProvider")(fun
556 // Usage is an enrichment: a failure or a slow answer degrades to "no
557 // usage this probe" rather than costing the account and models.
558 input.skipNativeUsage
559 - ? Effect.succeed(undefined)
559 + ? // @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
560 + Effect.succeed(undefined)
561 : withCodexDiscoveryDeadline(
562 client.request("account/rateLimits/read", null),
563 deadlineMs,
apps/server/src/scheduledTasks/ScheduledTaskService.ts
+1 -1
@@ -1109,7 +1109,7 @@ export const layer = Layer.effect(
1109 .pipe(
1110 Effect.catch((error) =>
1111 replay
1112 - ? Effect.succeed(undefined)
1112 + ? Effect.void
1113 : Effect.fail(taskError(error.message, { taskId: id })),
1114 ),
1115 );
apps/server/src/serverRuntimeStartup.test.ts
+1
@@ -206,6 +206,7 @@ it.effect.each([
206 }),
207 Layer.mock(ServiceLauncherClient.ServiceLauncherClient)({
208 managed: false,
209 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
210 prepareTrial: Effect.succeed(undefined),
211 }),
212 Layer.mock(GitVcsDriver.GitVcsDriver)({}),
apps/server/src/workspace/WorkspaceFileSystem.ts
+1
@@ -167,6 +167,7 @@ export const make = Effect.gen(function* () {
167 }
168 },
169 catch: () => undefined,
170 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
171 }).pipe(Effect.catch(() => Effect.succeed(undefined)));
172 }
173 return {
apps/server/src/ws.test.ts
+2
@@ -499,6 +499,7 @@ it.effect(
499 Effect.andThen(Deferred.await(finishDiscovery)),
500 Effect.as([]),
501 ),
502 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
503 resolveFileManagerRevealKind: () => Effect.succeed(undefined),
504 }),
505 Layer.mock(ProviderRegistry.ProviderRegistry)({
@@ -670,6 +671,7 @@ it.effect("on-demand clients get provider config without workspace snapshots", (
671 layerUnusedConfigRpcServices,
672 Layer.mock(ExternalLauncher.ExternalLauncher)({
673 resolveAvailableEditors: () => Effect.succeed([]),
674 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
675 resolveFileManagerRevealKind: () => Effect.succeed(undefined),
676 }),
677 Layer.mock(ProviderRegistry.ProviderRegistry)({
packages/client-runtime/src/connection/registry.test.ts
+6 -3
@@ -1389,7 +1389,8 @@ describe("EnvironmentRegistry", () => {
1389 const harness = yield* makeHarness([], [], [], {
1390 beforePrepareRoute: (target) =>
1391 target._tag !== "BearerConnectionTarget" || storedCredentials === undefined
1392 - ? Effect.succeed(undefined)
1392 + ? // @effect-diagnostics-next-line effectSucceedWithVoid:off - Admission checks return an optional blocker, so absence must be undefined.
1393 + Effect.succeed(undefined)
1394 : Ref.get(storedCredentials).pipe(
1395 Effect.map((current) =>
1396 current.get(target.connectionId)?.token === "old-bearer"
@@ -1473,7 +1474,8 @@ describe("EnvironmentRegistry", () => {
1474 const harness = yield* makeHarness([], [], [], {
1475 beforePrepareRoute: (target) =>
1476 target._tag !== "BearerConnectionTarget"
1476 - ? Effect.succeed(undefined)
1477 + ? // @effect-diagnostics-next-line effectSucceedWithVoid:off - Admission checks return an optional blocker, so absence must be undefined.
1478 + Effect.succeed(undefined)
1479 : Ref.updateAndGet(attempts, (count) => count + 1).pipe(
1480 Effect.flatMap((count) =>
1481 count === 1
@@ -1486,7 +1488,8 @@ describe("EnvironmentRegistry", () => {
1488 }),
1489 ),
1490 )
1489 - : Effect.succeed(undefined),
1491 + : // @effect-diagnostics-next-line effectSucceedWithVoid:off - Admission checks return an optional blocker, so absence must be undefined.
1492 + Effect.succeed(undefined),
1493 ),
1494 ),
1495 });
packages/provider-cursor/src/server/credentialStore.ts
+1
@@ -56,6 +56,7 @@ export const makeCursorCredentialStore = Effect.fn("makeCursorCredentialStore")(
56 credentials.get.pipe(
57 Effect.flatMap(
58 Option.match({
59 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - The SDK credential API requires undefined, not void.
60 onNone: () => Effect.succeed(undefined),
61 onSome: (bytes) =>
62 decodeCredentials(new TextDecoder().decode(bytes)).pipe(
packages/provider-opencode/src/server/OpenCodeServerLedger.ts
+1
@@ -144,6 +144,7 @@ export const make = Effect.fn("OpenCodeServerLedger.make")(function* (input: {
144 Effect.orElseSucceed(() => undefined),
145 );
146 }
147 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - Missing process observations are undefined, not void.
148 return Effect.succeed(undefined);
149 };
150
packages/provider-opencode/src/server/adapter.ts
+1 -1
@@ -1557,7 +1557,7 @@ export const makeOpenCodeAdapterV2 = Effect.fn("makeOpenCodeAdapterV2")(function
1557 ).pipe(
1558 Effect.timeout("1 second"),
1559 Effect.map((response) => Object.keys(response.data ?? {})),
1560 - Effect.catch(() => Effect.succeed(undefined)),
1560 + Effect.catch(() => Effect.void),
1561 );
1562 if (serverNames !== undefined) turn.mcpServerNames = serverNames;
1563 }
packages/shared/src/nodeSqliteClient.ts
+4 -1
@@ -445,6 +445,7 @@ const makeReader = Effect.fnUntraced(function* (options: SqliteClientConfig) {
445 if (current === reader) current = undefined;
446 void reader.worker.terminate();
447 }
448 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - The connection result distinguishes undefined from void.
449 if (unavailable) return Effect.succeed(undefined);
450 unavailable = true;
451 return Effect.logWarning("SQLite reader worker unavailable; reads use the main connection", {
@@ -453,6 +454,7 @@ const makeReader = Effect.fnUntraced(function* (options: SqliteClientConfig) {
454 });
455
456 return Effect.suspend((): Effect.Effect<Connection | undefined> => {
457 + // @effect-diagnostics-next-line effectSucceedWithVoid:off - The connection result distinguishes undefined from void.
458 if (unavailable) return Effect.succeed(undefined);
459 let reader: NonNullable<typeof current>;
460 try {
@@ -473,7 +475,8 @@ const makeReader = Effect.fnUntraced(function* (options: SqliteClientConfig) {
475 (startup): Effect.Effect<Connection | undefined> =>
476 // A late ready event must not hand out a worker retired by another acquire timeout.
477 unavailable || current !== reader
476 - ? Effect.succeed(undefined)
478 + ? // @effect-diagnostics-next-line effectSucceedWithVoid:off - The connection result distinguishes undefined from void.
479 + Effect.succeed(undefined)
480 : Option.isSome(startup) && startup.value.type === "ready"
481 ? Effect.succeed(reader.connection)
482 : turnOff(
tsconfig.base.json
+1
@@ -24,6 +24,7 @@
24 "namespaceImportPackages": ["@effect/platform-node", "effect"],
25 "effectFn": ["span", "inferred-span", "suggested-span"],
26 "diagnosticSeverity": {
27 + "effectSucceedWithVoid": "error",
28 "provideLayerSucceedToProvideService": "error",
29 "flatMapIgnoredParamToAndThen": "error",
30 "mapSomeToAsSome": "error",