Skip to content

Service alerts: system-wide disruptions at call start (follow-up to #8) #24

Description

@aaronbrethorst

Follow-up to #8 / PR #23, which delivered service alerts tied to a queried stop or its routes (consumed from the REST arrivals-and-departures-for-stop references.situations).

Deferred from that iteration (spec §8): system-wide disruptions played at the very beginning of a call, before the caller selects a stop, with an affordance to hear the alert in another language.

Why it's separate

The OBA REST where API has no global "list all active alerts" endpoint — situations only appear embedded in stop/route/trip responses. Delivering reliable system-wide alerts at call start needs a global source.

Suggested approach

  • Add optional config GTFS_RT_ALERTS_URL; poll & cache the GTFS-RT ServiceAlerts protobuf feed (google.golang.org/protobuf is already an indirect dep).
  • Classify alerts whose informed_entity names only an agency (no route/stop/trip) as system-wide.
  • In HandleVoiceStart, play any active system-wide alert before stop selection, with a language menu.
  • Reuse the existing models.Situation type and formatters.FormatVoiceAlerts/FormatSMSAlerts layer built in Add GTFS-RT service alerts to SMS and voice (#8) #23 — only the source and the call-open placement are new.

Notes

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions