Commit Graph

15 Commits

Author SHA1 Message Date
ca8b137e55 fmt: apply gofmt to test files
Some checks failed
CI / lint (push) Successful in 14s
CI / test (push) Failing after 1m13s
CI / build (push) Has been skipped
CI / docker (push) Has been skipped
2026-08-20 18:04:23 +03:00
6bebfa86fe fix(gitignore): make api ignore pattern root-specific
Some checks failed
CI / lint (push) Failing after 11s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / docker (push) Has been skipped
fix(test): add missing os import to test files
chore(deps): update dependencies from go mod tidy
2026-08-20 18:02:46 +03:00
900db58043 fix(test): use REDIS_ADDR environment variable in cron test mocks to match CI service hostname
Some checks failed
CI / lint (push) Failing after 11s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / docker (push) Has been skipped
2026-08-20 17:56:05 +03:00
69312022ea feat: implement multi-stage Dockerfile for deployment infrastructure
Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-18 22:41:07 +03:00
0d603ad15f fix: address code review findings 2026-08-18 14:25:34 +03:00
8aecaf1468 fix: address code review findings 2026-08-17 23:40:52 +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
78f662c985 fix: address code review findings 2026-08-17 22:14:48 +03:00
9c402c0086 fix: address code review findings 2026-08-17 21:19:36 +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
5842667fff feat: Implement user preferences (saved cities, search history) with Redis storage and API handlers 2026-08-17 14:30:54 +03:00
88d27421ce feat: implement MVP routing endpoints and cron station status detection
This commit implements the core routing functionality for the trip planner MVP:

1. API handlers for city autocomplete, station listing, route search, and route GeoJSON
2. Router integration with Yandex Schedules API for building routing graphs
3. Pareto-optimal route search with max 1 transfer and MCT filtering
4. Cron job for station status detection and closure monitoring
5. Circuit breaker and rate limiter integration in Yandex client
6. Redis cache-aside layer for city directories and station lists

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-14 13:06:29 +03:00
e063d26d4c fix: code correctness, security, and simplicity improvements 2026-08-13 21:23:15 +03:00
2101362d31 feat: complete Task 7 - end-to-end integration and full test suite 2026-08-13 21:01:53 +03:00
6f69da0761 feat: implement cron job for station status detection
- Create cmd/cron/station_status.go with daily station status checking
- Implement schedule querying via Yandex API with rate limiting and circuit breaker
- Closure detection: N consecutive days of zero trips (N=3) → closed status
- Reactivation: active status when trips resume after being closed
- Add tests for cron logic: status transition, zero-flight detection, reactivation
- All tests pass: go test ./cmd/cron/ and go test ./...
2026-08-13 20:42:34 +03:00