Commit Graph

5 Commits

Author SHA1 Message Date
0d603ad15f fix: address code review findings 2026-08-18 14:25:34 +03:00
6dcec6a7a5 fix: address code review findings
- Fix type mismatch in search_cache.go: SearchWithCache now returns *yandex.Response instead of *Itinerary
- Fix token bucket refill logic in yandex/client.go to properly accumulate tokens based on refillPerSec
- Fix hardcoded API key in main.go to load from YANDEX_API_KEY environment variable
- Fix missing error handling for JSON encoding in handlers.go RouteGeoJSON function
- Fix incorrect redis.Nil handling in cache/store.go CacheAside.Exists method
- Fix incorrect error return type in station_status.go updateStationStatus to return newStatus instead of empty string
2026-08-17 22:42:08 +03:00
82757665e9 fix: address code review findings 2026-08-17 20:34:17 +03:00
c58fbb50b1 feat: implement observability and metrics (Task 22)
- Add metrics package tracking cache hit-rate, API quota, circuit breaker trips, search time
- Integrate metrics with cache layer, yandex client, and API handlers
- Add /metrics HTTP endpoint for Prometheus-compatible metrics exposure
- Write tests for metrics functionality across cache, yandex, and API handlers
- Update test files to support new metrics infrastructure
2026-08-17 15:27:44 +03:00
7adb2ebbb3 feat: Implement Pareto-front ranking with multi-criteria sorting and TestRouteParetoRanking test
- Add Cost field to Edge and RouteLeg structs
- Propagate Cost in FindRoute itinerary creation
- Write TestRouteParetoRanking test verifying non-dominated route selection
2026-08-16 14:19:29 +03:00