From 0426ce7f01292187b05c29714b49b8dae9ebb4bf Mon Sep 17 00:00:00 2001 From: Maurice Date: Thu, 29 Oct 2026 11:05:45 +0100 Subject: [PATCH] docs(server): name TREK_PHOTON_URL in the services config and the alternates limit of the TREK Valhalla --- server/src/nest/app-config/tokens.ts | 5 +++-- shared/src/routing-relay/routing-relay.schema.ts | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/server/src/nest/app-config/tokens.ts b/server/src/nest/app-config/tokens.ts index bc3ac7f8f..e8671a8f0 100644 --- a/server/src/nest/app-config/tokens.ts +++ b/server/src/nest/app-config/tokens.ts @@ -32,8 +32,9 @@ export const transitConfig = registerAs('transit', () => BOOT_DERIVERS.transit(p /** KitineraryExtractorService's binary probe (KITINERARY_EXTRACTOR_PATH, then PATH). */ export const kitineraryConfig = registerAs('kitinerary', () => BOOT_DERIVERS.kitinerary(process.env)); /** - * The installation identity towards the liketrek services and their Valhalla - * (TREK_SERVICES, TREK_SERVICES_KEY, TREK_SERVICES_HOSTS, TREK_VALHALLA_URL). + * The installation identity towards the liketrek services, their Photon and + * their Valhalla (TREK_SERVICES, TREK_SERVICES_KEY, TREK_SERVICES_HOSTS, + * TREK_PHOTON_URL, TREK_VALHALLA_URL). */ export const servicesConfig = registerAs('services', () => BOOT_DERIVERS.services(process.env)); diff --git a/shared/src/routing-relay/routing-relay.schema.ts b/shared/src/routing-relay/routing-relay.schema.ts index 7844db65c..544e59495 100644 --- a/shared/src/routing-relay/routing-relay.schema.ts +++ b/shared/src/routing-relay/routing-relay.schema.ts @@ -22,7 +22,12 @@ export const VALHALLA_RELAY_MAX_LOCATIONS = 20; export const VALHALLA_RELAY_MAX_TRACE_POINTS = 4000; /** Points one height question may carry: the planner asks 500 at a time. */ export const VALHALLA_RELAY_MAX_HEIGHT_POINTS = 1000; -/** Alternate ways one route may ask for besides its own. */ +/** + * Alternate ways one route may ask for besides its own. Valhalla answers a + * larger ask with as many as its `service_limits.max_alternates` allows rather + * than refusing it, so the hike ways and leg variants, which ask for three, + * need that limit at three or more on the TREK Valhalla to get all of them. + */ export const VALHALLA_RELAY_MAX_ALTERNATES = 5; const point = z.object({