From e3dc2020055f8fdd6f36b2e6a48b2e571fcba222 Mon Sep 17 00:00:00 2001 From: Ben Davis <45952064+bmdavis419@users.noreply.github.com> Date: Mon, 27 Jul 2026 14:11:15 -0700 Subject: [PATCH] style: catchTags over catchTag in the two Hermes handlers Macroscope's Effect Service Conventions check requires statically known tagged failures to route through Effect.catchTags({ ... }) even for a single tag; these were the only two catchTag occurrences this branch added. Co-Authored-By: Claude Fable 5 --- apps/server/src/provider/Drivers/HermesDriver.ts | 4 +++- apps/server/src/provider/Layers/HermesAdapter.ts | 15 ++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/apps/server/src/provider/Drivers/HermesDriver.ts b/apps/server/src/provider/Drivers/HermesDriver.ts index c38a0887a3..51aadafdc9 100644 --- a/apps/server/src/provider/Drivers/HermesDriver.ts +++ b/apps/server/src/provider/Drivers/HermesDriver.ts @@ -77,7 +77,9 @@ export const HermesDriver: ProviderDriver = { const connected = yield* broker.isConnected(instanceId); const status = yield* broker .getInstanceStatus(instanceId) - .pipe(Effect.catchTag("HermesGatewayManagementError", () => Effect.succeed(undefined))); + .pipe( + Effect.catchTags({ HermesGatewayManagementError: () => Effect.succeed(undefined) }), + ); // Read-only: a snapshot must never create the thread as a side effect // (this runs on every status tick). The handshake owns creation. // A settings read that fails degrades to "no designation" rather than diff --git a/apps/server/src/provider/Layers/HermesAdapter.ts b/apps/server/src/provider/Layers/HermesAdapter.ts index 7bccb963a6..58fecd2d37 100644 --- a/apps/server/src/provider/Layers/HermesAdapter.ts +++ b/apps/server/src/provider/Layers/HermesAdapter.ts @@ -973,13 +973,14 @@ export const makeHermesAdapter = Effect.fn("makeHermesAdapter")(function* (input // offline) must not abort the sweep or fail shutdown. The session is // deliberately left in place rather than orphaned. adapter.stopSession(threadId).pipe( - Effect.catchTag("ProviderAdapterRequestError", (error) => - Effect.logWarning("provider.hermes.stop-session-undeliverable", { - instanceId: input.instanceId, - threadId, - detail: error.detail, - }), - ), + Effect.catchTags({ + ProviderAdapterRequestError: (error) => + Effect.logWarning("provider.hermes.stop-session-undeliverable", { + instanceId: input.instanceId, + threadId, + detail: error.detail, + }), + }), ), { discard: true }, ),