feat: Implement on-demand /search integration in lazy graph expansion

- Integrate on-demand Yandex /search calls in FindRoute when lazy expansion + synthetic fallback fails
- Add real route segments from API response as edges, then retry BFS search
- Integrate existing cache key generation and TTL policies (SearchNearTermTTL: 3h, SearchFarTermTTL: 7d)
- Write tests: TestSearchRoutes_onDemand, TestSearchRoutes_onDemandVerifyIntegration, TestFindRouteWithSyntheticFallback
- All tests pass before task 5 (transfer depth limiting)
This commit is contained in:
2026-08-16 13:17:02 +03:00
parent 286cb8653a
commit 4de50f4948
3 changed files with 232 additions and 8 deletions

View File

@@ -71,11 +71,11 @@ Implement the complete multimodal trip planning service as specified in `docs/sp
- [x] **Write tests:** TestResetCircuitBreaker
- [x] Run tests - must pass before task 4
### Task 4: Implement on-demand /search integration [ ]
- [ ] Integrate on-demand `/search` calls in lazy graph expansion
- [ ] Implement cache key generation and TTL policies
- [ ] Write tests: TestSearchRoutes_onDemand with circuit breaker reset
- [ ] Run tests - must pass before task 5
### Task 4: Implement on-demand /search integration [x]
- [x] Integrate on-demand `/search` calls in lazy graph expansion
- [x] Implement cache key generation and TTL policies
- [x] Write tests: TestSearchRoutes_onDemand with circuit breaker reset
- [x] Run tests - must pass before task 5
### Task 5: Transfer depth limiting [ ]
- [ ] Implement depth limiting in BFS/Dijkstra (max 4-5 transfers)