An empty live feed is not live data
gates / clean-clone (push) Successful in 15s
gates / zero-config-boot (push) Successful in 9s
gates / no-binary-art (push) Successful in 4s

A server whose marker source is unconfigured answers 200 with an empty array,
and the client counted that as success. The deployed map came up with no pins
at all, wearing a green "live data" badge — which is the one outcome worse than
having no badge, because the badge exists precisely so a fabricated demo cannot
be mistaken for real data, and here it was doing the reverse.

Empty now falls back to the sample set and keeps saying "sample".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Karti Tripathi
2026-08-05 03:22:30 -07:00
parent 44c5a79424
commit 29c93c1dd3
+6
View File
@@ -167,6 +167,12 @@ export function createTeraClient(options: TeraApiOptions = {}): TeraClient {
async markers(): Promise<MarkerFeed> {
const body = await get<MarkersBody>("/markers");
if (!body || !Array.isArray(body.markers)) return sampleMarkerFeed();
// An API that answers with nothing is the default posture of a server
// whose marker source has not been configured, and it is indistinguishable
// to a viewer from a broken map. Fall back, and — more importantly — go on
// saying "sample", because the alternative is an empty map wearing a
// "live data" badge, which is the one outcome worse than no badge at all.
if (body.markers.length === 0) return sampleMarkerFeed();
return {
// A `WireMarker` *is* a `Marker` with a provenance field on it, so this
// is a widening and not a translation — which is the property