Skip to content

make corpus-download fetches a 404 page for google-maps-platform.json #401

Description

@erraggy

Summary

The Google Maps URL in make corpus-download (Makefile:450) now 404s. curl -sL writes the error body to the target path, so the corpus ends up with a 14-byte file containing the literal text 404: Not Found:

14 testdata/corpus/google-maps-platform.json
cat testdata/corpus/google-maps-platform.json
# 404: Not Found

The URL is:

https://raw.githubusercontent.com/googlemaps/openapi-specification/main/dist/google-maps-platform-openapi3.json

Impact

SkipIfNotCached only checks whether the file exists, not whether it is a valid spec, so a 14-byte HTTP error body counts as "cached". Corpus tests for GoogleMaps then fail on unparseable content rather than skipping cleanly. Deleting the file produces the correct skip.

Suggested fix

Two parts, the second being the more valuable:

  1. Find the spec's current location (the googlemaps/openapi-specification repo may have moved or renamed dist/), or drop GoogleMaps from the corpus if it is gone for good.
  2. Make corpus-download fail loudly instead of silently writing error bodies — curl -sL --fail returns non-zero on 4xx/5xx and writes nothing, which would have surfaced this at download time rather than as a confusing test failure later. Worth applying to every URL in the target, not just this one.

Found on 2026-07-27 while preparing v1.57.0. Related: #400 (corpus specs are live and gitignored, so CI never exercises this path).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions