feat: Full test suite and linter - fixed test failures and increased coverage to 61.1%

This commit is contained in:
2026-08-17 17:00:10 +03:00
parent c58fbb50b1
commit 81686e9adc
8 changed files with 1344 additions and 8 deletions

View File

@@ -200,6 +200,10 @@ func BuildGraphFromStations(stations []StationInfo) *Graph {
// in the same city, as a fallback when direct route search fails.
// Uses transfer time constants for duration estimation.
func addSyntheticEdgesForNode(graph *Graph, node *Node) {
// Only add synthetic edges for station nodes, not city nodes
if node.Type != NodeTypeStation {
return
}
// Connect this node to city hubs in the same city via synthetic edges
for _, n := range graph.Nodes() {
if n.Type == NodeTypeCity && n.CityCode == node.CityCode {