Description
Agency mode currently filters only the OBA REST API metrics by the configured agency_id. GTFS static and GTFS-realtime data are not filtered.
When a merged feed contains multiple agencies, Watchdog currently:
- Labels every GTFS-RT vehicle with the configured agency.
- Includes vehicles from other agencies in per-vehicle telemetry.
- Stores the merged static bundle under the configured agency key.
- Reports stop and route counts for all agencies under the configured agency.
- Uses all merged services and stops for expiration and bounding-box calculations.
This causes cross-agency data contamination in agency mode.
The intended behavior is for agency mode to include only data belonging to the configured agency. GTFS-RT vehicles should be attributed using the route-to-agency mapping and vehicles belonging to another or unknown agency should not be labeled as the configured agency. Static routes, stops, services, unmatched-stop checks, and bounding-box calculations should likewise be scoped to the configured agency.
Server mode should continue attributing vehicles across agencies using the route-to-agency index.
Implementing this correctly may require preserving the relationships between agencies, routes, trips, stop times, and stops when building the static representation.
Description
Agency mode currently filters only the OBA REST API metrics by the configured agency_id. GTFS static and GTFS-realtime data are not filtered.
When a merged feed contains multiple agencies, Watchdog currently:
This causes cross-agency data contamination in agency mode.
The intended behavior is for agency mode to include only data belonging to the configured agency. GTFS-RT vehicles should be attributed using the route-to-agency mapping and vehicles belonging to another or unknown agency should not be labeled as the configured agency. Static routes, stops, services, unmatched-stop checks, and bounding-box calculations should likewise be scoped to the configured agency.
Server mode should continue attributing vehicles across agencies using the route-to-agency index.
Implementing this correctly may require preserving the relationships between agencies, routes, trips, stop times, and stops when building the static representation.