Clarify spec: Add definitions to Cause and Effect values and clarify Trip Update and Service Alerts usage for consumer routing decisions - #648
Conversation
# This is the 1st commit message: add tripupdate clarification # This is the commit message #2: fixed formatting # This is the commit message #3: Clarify detour description in service alerts Updated detour description for clarity. # This is the commit message #4: Clarify DETOUR effect description in reference.md Updated the description of the DETOUR effect to clarify that it refers to stops not being served. # This is the commit message #5: better detour definition
fixed formatting Clarify detour description in service alerts Updated detour description for clarity. Clarify DETOUR effect description in reference.md Updated the description of the DETOUR effect to clarify that it refers to stops not being served. better detour definition add comma add comma
Wouldn't it be nice to have a clear guidance on whether they should do this or not? At the moment it seems to be "do whatever you want"? I also only see |
|
My comment here still stands. From @tzujenchanmbd's response, the argument that there's flexibility in the guidelines doesn't remove the fact that I have the feeling that anyone considering NO_SERVICE in their routing will do the opposite of what the guidelines suggest. Might as well not have a guideline? |
| | **ACCESSIBILITY_ISSUE** | | ||
| | _**Value**_ | _**Comment**_ | | ||
| |-------------|----------------| | ||
| | **NO_SERVICE** | No transit service to the specified entity(-ies).<br>- For stations or stops, the rider will not be able to board or alight.<br>- For routes, the route will not run.<br>- For trips, those specific trips are cancelled. | |
There was a problem hiding this comment.
Was leaving out station entrances and pathway nodes done on purpose?
There was a problem hiding this comment.
@gcamp yes. The topic of allowing alerts for pathways, entrances, exits is something that has been talked about for a while and we are planning to start that conversation soon. Building one what was mentioned on issue#268, the intent was to clarify some things in the realtime spec (such as here and in #546 ), create documentation to help with implementation and how to deal with use-cases (such as the spec vs RT Guidance and the RT Alerts Guidance), then eventually get to "alerts on pathway data". That conversation can involve all location_types and pathway_modes.
What stops you from sending TU for multiple weeks in advance? Technically there's no blocker on the protocol level that would prevent this. It's a bit verbose, so that might be an indicator to improve TU rather than to (mis)use |
|
I concur with @felixguendling: This dispute has been going on for so long that I frankly don't really care anymore what the standard position is as long as it is clear and the argument is over. |
|
As @leonardehrenfried mentioned, this has been an ongoing discussion for a long time. At the same time, we can also observe that Service Alerts are already widely used in practice, while some aspects of the documentation still need clarification. The current situation can lead to information that is difficult for riders to understand or even incorrect. We (MobilityData) have been trying to find practical solutions that improve the current situation while remaining acceptable to different stakeholders within the community, including this PR, #546, and the Service Alerts Guide, even if these compromise-based solutions are probably not perfect for everyone. One observation from recent discussions is that the community seems to be increasingly recognizing the practical value of using NO_SERVICE as a routing signal. As @felixguendling suggested, perhaps we could explicitly indicate that NO_SERVICE has to be considered a valid input for routing decisions, which should align with what many trip planners already do today. We'd be interested in hearing what others think about making that expectation explicit. However, once we clarify that NO_SERVICE can be used as a routing input, as well as its definition for different entities, a follow-up question is what consumers would do when NO_SERVICE conflicts with TU. This was discussed during the April Working Group Meeting, where the following direction emerged from the discussion:
During the discussion, this direction received support from the producers participating in the meeting, and representatives from both Google and Apple also expressed support in principle. (Meeting notes) Even though there may be situations where consumers choose to prioritize SA instead (e.g. when there is clear evidence that TU is incorrect), I think defining a default behavior can still provide value by establishing a common expectation for handling conflicts. Does this seem like a reasonable balance that the community could align on? |
|
My preference is to put everything routing-related in TU but I can get behind this definition. |
|
MOTIS is currently not considering
Please don't clarify that |
|
@leonardehrenfried @felixguendling
A consensus was reached in which:
Your feedback is welcome! |
|
I can live with this outcome and prefer it over the current ambiguity. |
|
We are starting a vote to formally adopt these definitions and clarifications into the spec. The voting period will span 1 week and will end on 2026-08-20 at 23:59:59 UTC. |
|
+1 Transit |
|
+1 Swiftly |
|
The vote concludes in one day. Tagging remaining participants from the previous working group meeting for visibility. |
|
+1 Ito |
Why only Can we please state those "valid reasons in particular circumstances" explicitly? It's not obvious why the standard would not pin this down to "MUST".
I would like to have an exhaustive list, not just examples. Currently I only see Overall it leaves a lot of room for interpretation where it would help to be precise. |
|
|
||
| * A service alert informing of a stop closure while the trip updates for that stop are not set to `SKIPPED`. | ||
| * A service alert informing of a route closure while the trip updates for the cancelled trips are not set to `CANCELED`. | ||
| * A route closure spanning the whole day, for which the trip updates feed cancels trips over the next 90 minutes while no `NO_SERVICE` alert exists beyond those 90 minutes informing of the route closure. |
There was a problem hiding this comment.
I find this sentence very hard to parse. Could you perhaps re-write it for maximum clarity (perhaps at the cost of some verbosity)?
There was a problem hiding this comment.
The discussion was something like: some producers are unable to make new timetables. For months they are using their AVL system to skip a stop. But their AVL system has a horizon of just 90 minutes. Hence every trip planned after 90 minutes would still show the regular timetable.
For me it is also very hard to comprehend why people would accept this quality of their vendors.
There was a problem hiding this comment.
Does it make sense to design the GTFS standard for the worst practices? I would rather design for good practices to produce great results.
In case they really can't produce a static GTFS file for months, I would rather write a little script that takes the GTFS file and the GTFS-RT protobuf and update the GTFS file accordingly. In most systems data coming in via GTFS-static will also be displayed differently than GTFS-RT and in this case you would probably want the GTFS-static version.
| * A route closure spanning the whole day, for which the trip updates feed cancels trips over the next 90 minutes while no `NO_SERVICE` alert exists beyond those 90 minutes informing of the route closure. | ||
|
|
||
|
|
||
| Data consumers SHOULD use both Trip Updates and Service Alerts to make routing decisions, such as cancelling a trip or closing a stop. In case there is a conflict between Trip Updates and Service Alerts, consumers SHOULD inform the agency/producer of the issue, and SHOULD exercise caution when applying either feed to affect routing decisions. |
There was a problem hiding this comment.
So, cancelling a route or agency recursively cancels all trips of that entity? I think this would be a very valuable clarification.
There was a problem hiding this comment.
My suggestion was more in the direction: there should be to cancellation flags. One from tripUpdates and one from ServiceAlerts.
| * **No service**: No transit service to the specified entity(-ies). | ||
| * For stations or stops, the rider will not be able to board or alight. | ||
| * For routes, the route will not run. | ||
| * For trips, those specific trips are cancelled. |
There was a problem hiding this comment.
Can you set an agency to NO_SERVICE? If yes, what happens then?
|
I recognize that I'm coming in late but I have a few comments: I agree with @felixguendling that the current wording is only a small improvement and would like to see it spelled out in more detail. Questions:
|
|
I'm clearly "pro clarification", so I support this effort, but in it's current status, I vote: -1 MOTIS I think we don't have to rush this one. And it's not much that's missing to make it a proper clarification. I'm open to work on a clear table that maps "effect" to an equivalent TripUpdate (for everything that has a routing impact) with "for all" clauses. As long as TripUpdates are then clearly defined, this will give us a 100% clear guidance of how to apply ServiceAlerts for routing. |
|
I hate to make this more painful than it already is but I agree with Felix. -1 OTP |
There was a problem hiding this comment.
On the SHOULD vs MUST, my understanding is that since we have this language
Producers MUST also ensure that there is no conflict between their Trip Updates and Service Alerts feeds.
The idea is that consumer don't have to consume both alerts and trip updates, if they don't want to. It's basically a way to have current consumer not taking alerts into account not having the obligation to update their implementation. I agree wording can be improved.
My point at the meeting was that alerts are useful in the real world, since trip updates often lack the required cancellation, so the MUST ensure no conflict was a way that we all agreed.
That said I agree wording could be improved
| | **NO_SERVICE** | No transit service to the specified entity(-ies).<br>- For stations or stops, the rider will not be able to board or alight.<br>- For routes, the route will not run.<br>- For trips, those specific trips are cancelled. | | ||
| | **REDUCED_SERVICE** | The number or frequency of trips is reduced. | | ||
| | **SIGNIFICANT_DELAYS** | The route will consistently run late (insignificant delays should only be provided through [Trip updates](trip-updates.md)). | | ||
| | **DETOUR** | The route changes its shape, resulting in the route not serving one or multiple stops, or picking up/dropping off at other locations. | |
There was a problem hiding this comment.
| | **DETOUR** | The route changes its shape, resulting in the route not serving one or multiple stops, or picking up/dropping off at other locations. | | |
| | **DETOUR** | The route changes its shape, which may affect pickup/drop off at some stops. | |
Detour doesn't mean stops are cancelled
If the consumer happens to be a routing engine, then that routing engine will definitely produce wrong routing results if the producer happens to produce Maybe some consumers can ignore ServiceAlerts but if we say that I think we should aim for more consistent behavior of routing results across routers. This can only be achieved by making those very fundamental decisions (like SA impacts routing or not) strict requirements. The other option is that GTFS is just pure syntax and every producer/consumer chooses the semantics on a "do whatever you want" basis making 1:1 alignment between producers+consumers necessary. IMO this is something a good standard should avoid. 100% compatibility = the default: you can't claim GTFS-RT support and then not be compatible in practice. I would be interested to learn from someone who implemented a routing engine that already implements "SA impacts routing results" how they did this: is it only |
Why not enforcing the alert consideration for consumers too? Because there was strong voice against that it should not be necessary. By putting
Google and Transit only does it for NO_SERVICE yes. I think Google has some heuristics, and we also have feature flag depending on the agency. We support NO_SERVICE on an entire agency, but yes it's too high risk of false positive, so we again have a separate feature flag that we manually enable. We also support stop_id on a station entrance that is explicitly disallowed in this proposal. |
Totally agree 👍
I would be happy to see this as hard requirement in this PR. Since Google and Transit do it this way, it's proven to work and Google+Transit don't have to put any additional effort and the rest can align on this as well and know exactly what to do.
I think disallowing it is a bad idea because any future change might become a compatibility issue. We can either keep this undefined (to clearly define it in the future) or just clearly define that all pathways through this entrance are considered infeasible, requiring the router to find new shortest paths (which might make a whole journey infeasible). It would also be interesting to allow referencing pathways to disable elevators in the future. We currently only support this for OSM+SIRI in MOTIS. |
|
The vote has concluded and failed. The result is as follows: The criticisms made above make sense. Based on the discussion so far, we will get back soon with some suggestions to make the proposal clearer and more practical. |
|
I am sorry for voting -1. This has been the first time I ever did this. I don't reject this feature outright and will vote in favour if the wording is clarified. |
Summary
MobilityData is currently developing Service Alerts guidance to help the community use Service Alerts more consistently. As part of this work, we are gathering feedback through the Service Alerts Working Group meeting.
In the Apr 28th, 2026 meeting, we presented and discussed detailed definitions of values for the Cause and Effect fields, drafted here, to make sure that producers are attributing the correct values to real-world cases.
In addition, we discussed how consumers should interpret cases where both Trip Updates and Service Alerts apply but provide conflicting information. The group reached consensus that consumers should
by default give precedence to Trip Updates for routing decisions.use both to inform routing decisions, and that producers should have the highest quality possible in their trip updates feeds.Proposed Solution
This PR
Adds a clarification to
feed-entities.mddescribing that both trip updates and services alerts should be used to inform routing decisions. And that trip updates must always be accurate to what is happening in the transit network.While this clarification will also be included in the Service Alerts guidance, we believe it is appropriate to include it directly in the specification as well, in order to make this shared expectation clearer.
Details the definitions for values of Cause and Effect, to make sure that service alerts are correctly categorized.
These changes are intended to clarify definitions and to clarify a principle for expected consumer behaviour, and they do not introduce a new field or functional change. Therefore, I propose that it can proceed to a vote without requiring implementation testing.
Type of change
GTFS Schedule
GTFS Realtime
Additional information
Here is the working group meeting notes
We also plan to add an additional Service Alerts meeting in July to continue discussing guidance around Service Alert usage. Registration page