From 8b3269dc3fc5b3b1942eb53124721e65e2b61520 Mon Sep 17 00:00:00 2001 From: Dotta Date: Sun, 16 Aug 2026 19:52:38 +0000 Subject: [PATCH] test(server): tolerate partial service-index route mocks Co-Authored-By: Paperclip --- server/src/routes/issues.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/server/src/routes/issues.ts b/server/src/routes/issues.ts index f839ad19ba9..2ac2be7040e 100644 --- a/server/src/routes/issues.ts +++ b/server/src/routes/issues.ts @@ -126,7 +126,6 @@ import { companyService, companySearchService, executionWorkspaceService, - feedbackDeliveryCommentStateService, goalService, heartbeatService, issueApprovalService, @@ -2767,7 +2766,15 @@ export function issueRoutes( const goalsSvc = goalService(db); const issueApprovalsSvc = issueApprovalService(db); const recoveryActionsSvc = issueRecoveryActionService(db); - const feedbackDeliveryStatesSvc = feedbackDeliveryCommentStateService(db); + const feedbackDeliveryStateFactory = Object.prototype.hasOwnProperty.call( + serviceIndex, + "feedbackDeliveryCommentStateService", + ) + ? serviceIndex.feedbackDeliveryCommentStateService + : undefined; + const feedbackDeliveryStatesSvc = feedbackDeliveryStateFactory?.(db) ?? { + listForIssue: async () => new Map(), + }; const executionWorkspacesSvc = executionWorkspaceServiceDirect(db); const workProductsSvc = workProductService(db); const documentsSvc = documentService(db);