mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-26 01:24:59 +02:00
Add cable health scoring via sebuf InfrastructureService (#220)
* feat: add cable health scoring via sebuf InfrastructureService Port submarine cable health monitoring from PR #134 to the sebuf architecture. Adds GetCableHealth RPC to InfrastructureService that analyzes NGA maritime warnings to detect cable faults and repair activity, computing health scores with time-decay. - Proto: GetCableHealthRequest/Response, CableHealthRecord, evidence - Handler: NGA warning fetch, cable matching (name + proximity), signal processing, health computation with redis caching - Client: circuit breaker, proto enum → frontend string adapter, 1-min cache - Frontend: health-based cable coloring (fault=red, degraded=orange), evidence display in cable popup, SVG + DeckGL support Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address PR review feedback for cable health scoring - Fix geographic proximity: use cosine-latitude correction instead of raw Euclidean distance on lat/lon degrees, return distanceKm directly - Fix signal kind: use 'cable_advisory' (not 'operator_fault') for non-fault NGA warnings so advisories don't trigger fault status - Parallelize loadCableActivity + loadCableHealth with Promise.all - Remove console.log from client-side cable-health service - Add in-memory fallback cache on server so transient Redis+NGA failures serve stale data instead of empty response Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user