fix(osm): end the server's place search before the voice answer gives up

The voice answer waited 25 s for /api/osm/features, while the server let
Overpass run for 25 s and itself waited up to 40 s per endpoint and 45 s
in all. When the browser gave up first it closed the request, the route
cancelled the upstream query, and nothing was cached, so the OSM_TIMEOUT
retry started the same query from scratch and timed out again.

The server now tells Overpass 20 s, waits 22 s per endpoint and 22 s in
all, which ends inside the client's 25 s. A test pins that ordering.
This commit is contained in:
Sameh Khamis committed 2026-11-03 09:08:16 -08:00
1 parent 51637a5e96
commit 4efba8ccca
5 files changed
+37 -10

No files matched your search

+5 -1
View File
@@ -34,7 +34,11 @@ export const OSM_QUERY_LIMITS = Object.freeze({
maxCountDeg2: 36,
defaultLimit: 500,
maxLimit: 1000,
/** The answer waits this long before cancelling its provider request. */
/**
* The answer waits this long before cancelling its provider request. It
* must outlast the server's whole search (`OSM_FEATURE_LIMITS.upstreamBudgetMs`,
* 22 s), or the cancelled search caches nothing for the retry.
*/
budgetMs: 25_000,
});