From ac2ec0336c6513aed5fd422e88bc0137b5291491 Mon Sep 17 00:00:00 2001 From: Makisuo Date: Wed, 19 Aug 2026 14:41:33 +0200 Subject: [PATCH] fix(api): give the v2 route harness the LiveActivitiesService its groups need MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mobile-devices group started requiring LiveActivitiesService when Live Activities landed, but the shared harness only provided MobileDevicesService. Every v2 route test builds the whole group set, so one missing service failed both API shards on main — ~150 tests across alerts, api_keys, config-resources, integrations and the alchemy provider integration, none of which touch push. It needs only the Database the harness already has, so it is provided for real alongside MobileDevicesService rather than stubbed. --- apps/api/src/routes/v2/v2-test-support.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/api/src/routes/v2/v2-test-support.ts b/apps/api/src/routes/v2/v2-test-support.ts index be51c47f6..1acaaa0d5 100644 --- a/apps/api/src/routes/v2/v2-test-support.ts +++ b/apps/api/src/routes/v2/v2-test-support.ts @@ -10,6 +10,7 @@ import { ErrorIssueReadModelsService } from "@/services/errors/ErrorIssueReadMod import { IngestAttributeMappingService } from "@/services/org/IngestAttributeMappingService" import { InvestigationService } from "@/services/errors/InvestigationService" import { OrganizationService } from "@/services/org/OrganizationService" +import { LiveActivitiesService } from "@/services/push/LiveActivitiesService" import { MobileDevicesService } from "@/services/push/MobileDevicesService" import { OrgIngestKeysService } from "@/services/org/OrgIngestKeysService" import { RecommendationIssueService } from "@/services/errors/RecommendationIssueService" @@ -78,9 +79,11 @@ export const AllV2GroupLayersLive = Layer.mergeAll( HttpV2InvestigationsLive, HttpV2AnomaliesLive, HttpV2OrganizationLive, - // Real service, no stub: it needs only the Database every harness already - // provides, and its own route test is the only place that calls it. - HttpV2MobileDevicesLive.pipe(Layer.provide(MobileDevicesService.layer)), + // Real services, no stubs: they need only the Database every harness already + // provides, and their own route tests are the only places that call them. + HttpV2MobileDevicesLive.pipe( + Layer.provide(Layer.mergeAll(MobileDevicesService.layer, LiveActivitiesService.layer)), + ), HttpV2SessionReplaysLive, HttpV2TracesLive, HttpV2LogsLive,