MobilityData / gtfs-realtime-validator

Java-based tool that validates General Transit Feed Specification (GTFS)-realtime feeds
Other
38 stars 9 forks source link

Throw error when RT feed has vehicles/tripUpdates for trips that aren't active in static #99

Open isabelle-dr opened 2 years ago

isabelle-dr commented 2 years ago

Issue by barbeau Feb 1, 2022 Originally opened as https://github.com/CUTR-at-USF/gtfs-realtime-validator/issues/408


Summary:

When handling temporary service a common error is to accidentally have mismatches between the static and RT so that the RT feed has trip IDs that aren't shown as active in the static data. For example, on a Sunday the RT feed might have vehicle or TripUpdates for tripID = 4, but in the static data it shows trip_id = 4 as not running on a Sunday - in this case, it should be an error.

See https://groups.google.com/g/onebusaway-developers/c/WhgMbZ66rbY for further discussion.

Steps to reproduce:

Run a GTFS and GTFS Realtime feed through the validator when the RT feed is running on a Sunday, with links to static GTFS data that contains these trip IDs but the static GTFS data says that trip doesn't operate on a Sunday.

Expected behavior:

Validator should throw an error in this case

Observed behavior:

No errors are logged.

Note that this is effectively an inverse of proposed new rule https://github.com/MobilityData/gtfs-realtime-validator/issues/81 - that rule would detect when service is scheduled but no vehicle/trip update is serving it.