Skip to content

refactor: retire plugin data proxy routes (earthquake, iss, osm-search) - #546

Open
silvertakana wants to merge 4 commits into
mainfrom
refactor/retire-plugin-data-routes
Open

silvertakana wants to merge 4 commits into
mainfrom
refactor/retire-plugin-data-routes

Conversation

@silvertakana

Copy link
Copy Markdown
Owner

Read this before merging

Merge order matters here. This deletes the app's proxy routes for three plugins. Merge it only after all of the following are true:

  1. The replacement plugin versions are merged and published to npm (the earthquake, ISS, and OSM search plugins now read the data engine or the browser directly instead of calling these routes).
  2. GET https://dataenginev2.worldwideview.dev/api/iss returns 200 with a live position (the ISS seeder must be deployed; until then the engine answers 404).
  3. The demo instance is running those plugin versions.

Merging early removes the only data path the currently-deployed plugins have, and the ISS layer in particular fails silently (the plugin returns an empty list on a 404). Merging after that point is safe: the routes are then unreachable by anything.

Why

The app hosted a data proxy for individual plugins. That is being retired — a plugin reads the data engine directly, or fetches a third-party API itself from the browser. The globe app should not carry a per-plugin data endpoint, and no longer does.

Deleted

Route Lines
api/earthquake 53
api/iss 64
api/iss/positions 88
api/iss/tle 60
api/plugins/osm-search 145

Plus the four test files that only exercised those routes (23 cases), the now-empty directories, and osmSearchLimiter — its only consumer was the deleted OSM route (verified by grep before removing it; 0 references remain).

Deliberately kept

  • api/camera/** — deferred to a later change.
  • api/weather/layers and api/weather/tile/... — core imagery, and they hold a billed key server-side.
  • api/places/search and api/places/details — sanctioned secret-holding search.

Their tests are kept too (23 cases).

Verified

  • Pre-check grep across the whole worktree for api/earthquake, api/iss, plugins/osm-search: every hit was inside a file being deleted, apart from one historical example in ADR-0009 and the limiter definition itself. tests/, .github/, and public/e2e-fixtures/ had zero hits — no component, hook, fixture, or e2e test depended on these routes.
  • tsc --noEmit clean.
  • Full suite: 167 files, 1722 tests pass, down from 171 files / 1745 tests — a drop of exactly the 23 cases in the deleted files. The MCP data-query suite is green (the tools read the data engine and are unaffected).
  • pnpm build succeeds, and the printed route table contains no /api/earthquake, /api/iss, or /api/plugins/osm-search, while still listing the weather, places, camera, and MCP routes.

Rollback

Revert the merge commit; the platform redeploys from main, and the routes come back with it.

The app hosted a data proxy for individual plugins. Plugins now read the
data engine directly, or fetch a third-party API themselves from the
browser, so these routes have no remaining caller.

- delete api/earthquake, api/iss{,/positions,/tle}, api/plugins/osm-search
- delete the four test files that only covered them (23 cases)
- drop osmSearchLimiter; the deleted route was its only consumer
- keep the camera, weather, and places routes (secret-holding or deferred)
- the MCP data-query tools read the engine and are unaffected
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Left for a person rather than auto-merged: not a Dependabot pull request. Patch and minor updates merge themselves once every check has completed green; this one is listed in the weekly dependency digest.

@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

ADR-0009's legacy example was the api/earthquake route forwarding to USGS,
and this change deletes it, so the illustration now reads as retired. The
same line's "used by" list marks the earthquake and ISS entries as moved
off the pattern; the camera family still uses it.

Whole-tree search for the other deleted paths (api/iss,
api/plugins/osm-search) found no surviving reference to report.

Bump 2.69.0 -> 2.69.1 (per-commit semver rule).
The OSM search plugin moved to a browser-direct fetch, not to an
engine-direct read, so the parenthetical now says "their data directly",
which is true of both. Bump 2.69.1 -> 2.69.2.
ADR-0009 line 12 still listed earthquakes and ISS as remaining on the legacy proxy pattern. This change retires both routes, so the clause was false; only the camera plugin stays.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant