Skip to content

Commit 862bbee

Browse files
chore(lint): enforce redundantMapError
1 parent 5f4ae91 commit 862bbee

2 files changed

Lines changed: 16 additions & 17 deletions

File tree

‎apps/server/src/mcp/OrchestratorMcpService.ts‎

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2451,24 +2451,22 @@ const make = Effect.gen(function* () {
24512451
const cancelOrphan = Effect.gen(function* () {
24522452
if (parentTask?.runId == null || !isOrchestrationV2WorkActive(parentTask.status))
24532453
return false;
2454-
yield* threadManagement
2455-
.dispatch({
2456-
type: "subagent.stop",
2457-
commandId: stableCommandId({
2458-
scope,
2459-
requestKey: key,
2460-
operation: "cancel-task-orphan",
2461-
}),
2462-
threadId: scope.thread.threadId,
2463-
runId: parentTask.runId,
2464-
subagentId: parentTask.id,
2465-
})
2466-
.pipe(Effect.mapError(threadManagementFailure));
2467-
const { subagents } = yield* threadManagement
2468-
.getThreadRecords(scope.thread.threadId, ["subagents"])
2469-
.pipe(Effect.mapError(threadManagementFailure));
2454+
yield* threadManagement.dispatch({
2455+
type: "subagent.stop",
2456+
commandId: stableCommandId({
2457+
scope,
2458+
requestKey: key,
2459+
operation: "cancel-task-orphan",
2460+
}),
2461+
threadId: scope.thread.threadId,
2462+
runId: parentTask.runId,
2463+
subagentId: parentTask.id,
2464+
});
2465+
const { subagents } = yield* threadManagement.getThreadRecords(scope.thread.threadId, [
2466+
"subagents",
2467+
]);
24702468
return subagents.some((task) => task.id === input.taskId && task.status === "cancelled");
2471-
});
2469+
}).pipe(Effect.mapError(threadManagementFailure));
24722470
if (isTerminalTaskStatus(current.status)) {
24732471
// The child can still run work for another turn, so it is stopped either way.
24742472
yield* stopWithinLimit;

‎tsconfig.base.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"namespaceImportPackages": ["@effect/platform-node", "effect"],
2525
"effectFn": ["span", "inferred-span", "suggested-span"],
2626
"diagnosticSeverity": {
27+
"redundantMapError": "error",
2728
"optionMatchToFromOption": "error",
2829
"catchToIgnore": "error",
2930
"unnecessaryEffectGen": "error",

0 commit comments

Comments
 (0)