Skip to content

Clarify spec: Add definitions to Cause and Effect values and clarify Trip Update precedence for consumer routing decisions#648

Open
skalexch wants to merge 4 commits into
google:masterfrom
MobilityData:update_cause_effect_definitions
Open

Clarify spec: Add definitions to Cause and Effect values and clarify Trip Update precedence for consumer routing decisions#648
skalexch wants to merge 4 commits into
google:masterfrom
MobilityData:update_cause_effect_definitions

Conversation

@skalexch

Copy link
Copy Markdown
Collaborator

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.

Proposed Solution

This PR

  1. Adds a clarification to feed-entities.md describing the expected consumer behaviour when Trip Updates and Service Alerts both apply.
    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.

  2. 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

  • Functional Change
  • Non-Functional Change
  • Documentation Maintenance

GTFS Realtime

  • Specification Change
  • Specification Change (Experimental Field)

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

skalexch added 4 commits July 8, 2026 12:06
# 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
@felixguendling

Copy link
Copy Markdown

If data consumers use Service Alerts to affect routing decisions

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 NO_SERVICE where this would be an option. Or are there others that should be considered for routing?

@gcamp

gcamp commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was leaving out station entrances and pathway nodes done on purpose?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@felixguendling

felixguendling commented Jul 14, 2026

Copy link
Copy Markdown

TU is generally a couple hours in the future and alerts are multiple weeks in advance.

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 NO_SERVICE? The other option would be to clearly define that NO_SERVICE has to be considered during routing. The status-quo that everyone does what they want is something a standard should avoid. Most feeds are tailored to show the right thing for their "main" consumer (often that's Google Maps). But that's exactly what a good standard should prevent (tailoring the producer to a specific consumer).

@leonardehrenfried

Copy link
Copy Markdown
Contributor

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.

@tzujenchanmbd

tzujenchanmbd commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

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:

  • When SA is the only available data, consumers use NO_SERVICE as a routing signal.
  • When both SA and TU are present and conflict, TU takes precedence by default.

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?

@leonardehrenfried

Copy link
Copy Markdown
Contributor

My preference is to put everything routing-related in TU but I can get behind this definition.

@felixguendling

felixguendling commented Jul 16, 2026

Copy link
Copy Markdown

MOTIS is currently not considering NO_SERVICE relevant for routing and expects another TU. Currently TU=routing, SA=annotation. But as @leonardehrenfried, I'm open to change this to TU=routing, SA=routing+annotation if the GTFS standard clearly states that it has to be done this way.

we clarify that NO_SERVICE can be used as a routing input

Please don't clarify that NO_SERVICE can be used as a routing input. Either clarify that it has to be used as a routing input or clarify that it must not be used as a routing input. If you say "can" be used as a routing input we are not making any progress. That's obviously already the status quo. I'm open for both options - as long as it's a clear "has to be used" (+ conflict resolution) or "must not be used".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants