Conversation
…teDisast…" This reverts commit ae4010a.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Greptile SummaryThis PR restores the climate disasters feature by reverting the accidental revert in #2544. It re-adds the full stack for the Key points:
Confidence Score: 5/5Safe to merge after confirming RELIEFWEB_APPNAME is set in Railway; all remaining findings are P2 suggestions. The restore is thorough, well-tested, and follows all established patterns in the codebase. There are no P0/P1 issues. The only substantive finding is the _maxStaleMin mismatch in api/mcp.ts (P2), which does not affect data correctness or availability. Per confidence guidance, P2-only findings do not reduce the score below 5. api/mcp.ts — _maxStaleMin should be updated to reflect the slower 6h disaster seed schedule. Important Files Changed
Sequence DiagramsequenceDiagram
participant Railway as Railway Cron (6h)
participant Seeder as seed-climate-disasters.mjs
participant ReliefWeb as ReliefWeb API (v1/v2)
participant NatCache as natural:events:v1 (Redis)
participant Redis as Redis (climate:disasters:v1)
participant Handler as list-climate-disasters.ts
participant Client as ClimateServiceClient
Railway->>Seeder: trigger (every 6h)
par Fetch sources
Seeder->>ReliefWeb: POST /v1/disasters (RELIEFWEB_APPNAME)
ReliefWeb-->>Seeder: disaster rows (FL/TC/DR/HT/WF)
and
Seeder->>NatCache: getCachedJson(natural:events:v1)
NatCache-->>Seeder: GDACS + NASA FIRMS events
end
Seeder->>Seeder: dedupe + sort + cap at 300
Seeder->>Redis: SET climate:disasters:v1 (TTL 6h)
Seeder->>Redis: SET seed-meta:climate:disasters
Client->>Handler: GET /api/climate/v1/list-climate-disasters
Handler->>Redis: getCachedJson(climate:disasters:v1)
Redis-->>Handler: { disasters: [...] }
Handler-->>Client: ListClimateDisastersResponse (paginated)
|
|
@FayezBast — this restore looks complete and well-tested. Greptile gives it 5/5. Two things before merging:
Otherwise ready to merge. |
This PR restores the climate disasters feature by reverting the accidental revert in #2544.
Included in this restore:
ListClimateDisastersproto/RPC supportKey files restored:
scripts/seed-climate-disasters.mjsproto/worldmonitor/climate/v1/climate_disaster.protoproto/worldmonitor/climate/v1/list_climate_disasters.protoproto/worldmonitor/climate/v1/service.protoserver/worldmonitor/climate/v1/list-climate-disasters.tsserver/worldmonitor/climate/v1/handler.tsserver/gateway.tsCaveat:
RELIEFWEB_APPNAMEmust be configured before merge/deploy, otherwise the seeder will fail.