Skip to content

Commit 468fd3a

Browse files
chore(lint): enforce effectSucceedWithVoid
1 parent 738fd08 commit 468fd3a

19 files changed

Lines changed: 32 additions & 9 deletions

File tree

‎apps/server/src/cli/thread.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ const launchWorkspaceStrategy = (input: {
465465
onNone: () =>
466466
Option.isSome(input.branch)
467467
? Effect.fail(new ThreadUsageError({ detail: "--branch needs --worktree <base-ref>." }))
468-
: Effect.succeed(undefined),
468+
: Effect.void,
469469
onSome: (baseRef) =>
470470
Effect.succeed({
471471
type: "worktree" as const,

‎apps/server/src/mcp/McpSessionRegistry.testkit.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export const layer = Layer.succeed(
1919
browserToolsAvailable: true,
2020
},
2121
}),
22+
// @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
2223
resolve: () => Effect.succeed(undefined),
2324
touch: () => Effect.void,
2425
revokeProviderSession: () => Effect.void,

‎apps/server/src/observability/EventLoopMonitor.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export class EventLoopMonitor extends Context.Reference<{
3535
*/
3636
readonly latestNoticeableStall: Effect.Effect<ServerEventLoopStall | undefined>;
3737
}>("t3/observability/EventLoopMonitor", {
38+
// @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
3839
defaultValue: () => ({ latestNoticeableStall: Effect.succeed(undefined) }),
3940
}) {}
4041

‎apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const flavor = makeAntigravityAcpAdapterFlavor({
4848
selfInvocation: undefined as never,
4949
makeRuntime: () => Effect.die("not spawned in this test"),
5050
withProcess: (_stop, task) => task,
51+
// @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
5152
defaultModel: Effect.succeed(undefined),
5253
});
5354

@@ -169,6 +170,7 @@ describe("AntigravityAdapterV2 client file system", () => {
169170
})),
170171
),
171172
withProcess: (_stop, task) => task,
173+
// @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
172174
defaultModel: Effect.succeed(undefined),
173175
});
174176
const workspace = yield* fileSystem.makeTempDirectoryScoped({
@@ -337,6 +339,7 @@ describe("AntigravityAdapterV2 workspace changes", () => {
337339
})),
338340
),
339341
withProcess: (_stop, task) => task,
342+
// @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
340343
defaultModel: Effect.succeed(undefined),
341344
});
342345
const workspaceA = yield* fileSystem.makeTempDirectoryScoped({ prefix: "t3-ag-a-" });
@@ -586,6 +589,7 @@ describe("AntigravityAdapterV2 html_render pages", () => {
586589
})),
587590
),
588591
withProcess: (_stop, task) => task,
592+
// @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
589593
defaultModel: Effect.succeed(undefined),
590594
});
591595
const runtimePolicy = ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({

‎apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1700,6 +1700,7 @@ export const makeCodexAdapterV2 = Effect.fn("makeCodexAdapterV2")(function* (
17001700
) {
17011701
const mcpSessions = yield* McpProviderSessions.McpProviderSessions;
17021702
const readMcpSession = (threadId: ThreadId | null) =>
1703+
// @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
17031704
threadId === null ? Effect.succeed(undefined) : mcpSessions.read(threadId);
17041705
const { clientFactory, crypto, fileSystem, idAllocator, serverConfig } = adapterOptions;
17051706
const continuationRequests = adapterOptions.continuationRequests;

‎apps/server/src/orchestration-v2/ProjectSettingsUpgrade.integration.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ const layerRuntime = (dbPath: string) => {
157157
Layer.provide(ServerSettings.layerTest()),
158158
Layer.provide(
159159
Layer.succeed(ProviderInstanceRegistry.ProviderInstanceRegistry, {
160+
// @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
160161
getInstance: () => Effect.succeed(undefined),
161162
listInstances: Effect.succeed([]),
162163
listUnavailable: Effect.succeed([]),

‎apps/server/src/orchestration-v2/ProviderTurnStartService.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ export const layer: Layer.Layer<
201201
const request = turnItems.find((item) => item.type === "run_interrupt_request");
202202
return request?.type === "run_interrupt_request" ? request.message : undefined;
203203
}),
204+
// @effect-diagnostics-next-line effectSucceedWithVoid:off - This optional result requires undefined, not the wider void type.
204205
Effect.catchCause(() => Effect.succeed(undefined)),
205206
),
206207
};

‎apps/server/src/preview/ServerBrowser.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1742,7 +1742,7 @@ const make = Effect.gen(function* () {
17421742
? await Effect.runPromise(
17431743
findTab(request.threadId, request.tabId).pipe(
17441744
Effect.catchTags({
1745-
ServerBrowserTabNotFoundError: () => Effect.succeed(undefined),
1745+
ServerBrowserTabNotFoundError: () => Effect.void,
17461746
}),
17471747
),
17481748
)

‎apps/server/src/provider/CodexProvider.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,8 @@ const probeCodexAppServerProvider = Effect.fn("probeCodexAppServerProvider")(fun
556556
// Usage is an enrichment: a failure or a slow answer degrades to "no
557557
// usage this probe" rather than costing the account and models.
558558
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)
560561
: withCodexDiscoveryDeadline(
561562
client.request("account/rateLimits/read", null),
562563
deadlineMs,

‎apps/server/src/scheduledTasks/ScheduledTaskService.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ export const layer = Layer.effect(
11091109
.pipe(
11101110
Effect.catch((error) =>
11111111
replay
1112-
? Effect.succeed(undefined)
1112+
? Effect.void
11131113
: Effect.fail(taskError(error.message, { taskId: id })),
11141114
),
11151115
);

0 commit comments

Comments
 (0)