fix: Bootstrap Caching, Edge Proxy, & GeoJSON Fixes#1390
fix: Bootstrap Caching, Edge Proxy, & GeoJSON Fixes#1390lspassos1 wants to merge 1 commit intokoala73:mainfrom
Conversation
|
@lspassos1 is attempting to deploy a commit to the Elie Team on Vercel. A member of the Team first needs to authorize it. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
koala73
left a comment
There was a problem hiding this comment.
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:
- Revert the cache key renames, or provide a migration plan
- Make the naming convention consistent (all hyphens or all underscores, but applied uniformly)
- Keep GeoJSON tests reading local files
- Split out the SSE feature and formatting changes into separate PRs
Thanks again for the contribution!
|
These PRs are just too complicated with all drifts, and no followup. Closing. |
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
Affected areas
/api/*)Checklist
npm run typecheck)