From 324ee691517699c9919f047ce936b66b16446e6f Mon Sep 17 00:00:00 2001 From: Maurice Date: Fri, 30 Oct 2026 23:36:35 +0100 Subject: [PATCH] fix(transit): mark the plan fallback's quota counts as independent writes The empty-result fallback can call Google after Transitous, so lint:tx now sees two googleQuota.record() calls in TransitService.plan. Only one of them runs per request, and each is a call counter written after its own upstream request, so it cannot share a transaction with it. --- server/src/nest/transit/transit.service.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/src/nest/transit/transit.service.ts b/server/src/nest/transit/transit.service.ts index 03b1c1c35..acfbc31e4 100644 --- a/server/src/nest/transit/transit.service.ts +++ b/server/src/nest/transit/transit.service.ts @@ -223,7 +223,13 @@ export class TransitService { return { ...data, provider }; } - /** Route search between two coordinates. Returns compact itineraries for the picker. */ + /** + * Route search between two coordinates. Returns compact itineraries for the picker. + * + * @txIndependent the only writes are Google's daily call counter, one after each + * upstream request; each count stands on its own and cannot share a transaction + * with the HTTP call it records. + */ async plan( q: PlanQuery, language?: string,