Skip to content

fix: Bootstrap Caching, Edge Proxy, & GeoJSON Fixes#1390

Closed
lspassos1 wants to merge 1 commit intokoala73:mainfrom
lspassos1:fix/bootstrap-geojson
Closed

fix: Bootstrap Caching, Edge Proxy, & GeoJSON Fixes#1390
lspassos1 wants to merge 1 commit intokoala73:mainfrom
lspassos1:fix/bootstrap-geojson

Conversation

@lspassos1
Copy link
Copy Markdown
Collaborator

Summary

Fixes mismatched cache keys in the Bootstrap validation suite, adds missing cache string literals to API handlers, and updates the GeoJSON tests to fetch from the CDN.

Type of change

  • Bug fix

Affected areas

  • API endpoints (/api/*)

Checklist

  • Tested on worldmonitor.app variant
  • No API keys or secrets committed
  • TypeScript compiles without errors (npm run typecheck)

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 10, 2026

@lspassos1 is attempting to deploy a commit to the Elie Team on Vercel.

A member of the Team first needs to authorize it.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown
Owner

@koala73 koala73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work on cache key alignment, @lspassos1! A few significant issues to address before this can move forward.

BLOCKING: Cache key renames will break production data
Changing Redis key prefixes from hyphens to underscores (positive-events to positive_events, theater-posture to theater_posture) across bootstrap.js, health.js, cache-keys.ts, ais-relay.cjs, and RPC handlers means existing Redis data is stored under the old keys. After deploy, these data sources will return empty until the next seed cycle writes to the new keys. This needs a migration plan (e.g., write to both old and new keys for a transition period, or coordinate seed runs immediately after deploy).

BLOCKING: Inconsistent key rename
positiveEventsLive keeps the old key 'positive-events:geo:v1' (hyphen) while positiveGeoEvents (bootstrap) changes to 'positive_events:geo-bootstrap:v1' (underscore). The seed-meta key also stays as 'seed-meta:positive-events:geo'. This mixed convention will cause confusion and potential mismatches.

HIGH: Tests now depend on external CDN
countries-geojson.test.mjs replaces readFileSync of the local file with fetch('https://maps.worldmonitor.app/countries.geojson'). Tests should not depend on external network availability. If CDN is down or CI has no internet, tests fail. Please keep local file reads for tests.

HIGH: New SSE broadcast functionality not mentioned in PR description
ais-relay.cjs adds sseClients set, broadcastSse() function, and SSE endpoint wiring for real-time Telegram/OREF updates. This is a new feature bundled into a "fix" PR without documentation.

MEDIUM: Scope drift
PR also includes: vite.config.ts reformatting (53 lines, all indentation), removal of @ts-expect-error in gateway.ts, and adding weatherAlerts/spending to SLOW_KEYS. These should be separate changes.

MEDIUM: vite.config.ts is pure reformatting
53 additions and 49 deletions are just indentation changes, which pollutes git blame.

Suggestions:

  1. Revert the cache key renames, or provide a migration plan
  2. Make the naming convention consistent (all hyphens or all underscores, but applied uniformly)
  3. Keep GeoJSON tests reading local files
  4. Split out the SSE feature and formatting changes into separate PRs

Thanks again for the contribution!

Repository owner deleted a comment from ashsolei Mar 14, 2026
@koala73
Copy link
Copy Markdown
Owner

koala73 commented Mar 19, 2026

These PRs are just too complicated with all drifts, and no followup. Closing.

@koala73 koala73 closed this Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants