Keep fallback retries single-flight and recover imagery and terrain independently

An activation that re-showed a fallback while a retry was in flight armed a
second timer, so two retries could run at once and land out of order, leaving
the cache and the screen on different providers. Retries now run one at a
time; a request made meanwhile re-arms once the current one ends, and a
result that is obsolete or no longer wanted is disposed.

Imagery and terrain retries are now handled as each settles, so a stalled
terrain attempt no longer keeps recovered imagery off screen, or the reverse.
This commit is contained in:
Sameh Khamis committed 2026-10-16 16:40:34 -07:00
1 parent bc499f1401
commit f0d43a62e8
4 files changed
+159 -39

No files matched your search

+3 -2
View File
@@ -386,8 +386,9 @@ upstream exposes it. One console warning is logged per cooldown window. Other
failures keep Cesium's handling and the flat `EllipsoidTerrainProvider`
fallback; while that flat terrain is on a shown globe the map controller
retries Re:Earth in the background (30 s, doubling to a 10-minute cap) and
installs the real terrain without waiting for a map switch. Behind a 3D tileset
it neither retries nor installs; the next globe activation does.
installs the real terrain without waiting for a map switch or an imagery
retry. Behind a 3D tileset it neither retries nor installs; the next globe
activation does.
`scripts/qa-terrain-429.mjs` reproduces the burst against a keyless
dev server, counts real throttles with their headers as evidence, synthesises
throttles with `--inject N` when the upstream is not throttling, and fails if