TypeScript
chore(lint): enforce redundantMapError (#25091)
Julius Marmingea0f360690d72
diff --git a/apps/server/src/mcp/OrchestratorMcpService.ts b/apps/server/src/mcp/OrchestratorMcpService.tsindex d69a8649d13..32bfa58c59c 100644--- a/apps/server/src/mcp/OrchestratorMcpService.ts+++ b/apps/server/src/mcp/OrchestratorMcpService.ts@@ -2451,24 +2451,22 @@ const make = Effect.gen(function* () {const cancelOrphan = Effect.gen(function* () {if (parentTask?.runId == null || !isOrchestrationV2WorkActive(parentTask.status))return false;- yield* threadManagement- .dispatch({- type: "subagent.stop",- commandId: stableCommandId({- scope,- requestKey: key,- operation: "cancel-task-orphan",- }),- threadId: scope.thread.threadId,- runId: parentTask.runId,- subagentId: parentTask.id,- })- .pipe(Effect.mapError(threadManagementFailure));- const { subagents } = yield* threadManagement- .getThreadRecords(scope.thread.threadId, ["subagents"])- .pipe(Effect.mapError(threadManagementFailure));+ yield* threadManagement.dispatch({+ type: "subagent.stop",+ commandId: stableCommandId({+ scope,+ requestKey: key,+ operation: "cancel-task-orphan",+ }),+ threadId: scope.thread.threadId,+ runId: parentTask.runId,+ subagentId: parentTask.id,+ });+ const { subagents } = yield* threadManagement.getThreadRecords(scope.thread.threadId, [+ "subagents",+ ]);return subagents.some((task) => task.id === input.taskId && task.status === "cancelled");- });+ }).pipe(Effect.mapError(threadManagementFailure));if (isTerminalTaskStatus(current.status)) {// The child can still run work for another turn, so it is stopped either way.yield* stopWithinLimit;diff --git a/tsconfig.base.json b/tsconfig.base.jsonindex c9243fd6138..00ff7550156 100644--- a/tsconfig.base.json+++ b/tsconfig.base.json@@ -24,6 +24,7 @@"namespaceImportPackages": ["@effect/platform-node", "effect"],"effectFn": ["span", "inferred-span", "suggested-span"],"diagnosticSeverity": {+ "redundantMapError": "error","optionMatchToFromOption": "error","catchToIgnore": "error","unnecessaryEffectGen": "error",