Repository navigation
fix(integrations): alert on TfL line statuses above Good Service - #1018
Merged
Medformatik merged 2 commits intoNov 16, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Transport for London reports each line's status with a severity code. The provider treated every code of 10 or more as "Good Service" and showed no alert, and it read only the first status of a line.
TfL's scale is not ordered that way. Its own metadata (
/Line/Meta/Severity, read on 2026-11-16) lists, for tube, DLR, Elizabeth line, Overground and tram: 10 Good Service, 11 Part Closed, 12 Exit Only, 13 No Step Free Access, 14 Change of frequency, 15 Diverted, 16 Not Running, 17 Issues Reported, 18 No Issues, 19 Information, 20 Service Closed. A line that was not running, or partly closed, produced no alert. A line with two statuses at once, such as minor delays on one section and a part closure on another, showed only the first.Now:
Alert ids gain the code (
tfl:status:central:5). Nothing parses or stores these ids; they serve as list keys and for announce-once.Verification
tfl.test.ts: 16 and 11 produce alerts, the other notice codes map as above, 10, 18, 20 and a missing severity produce none, several statuses on one line are all represented and same-code ones merge, and 0 to 9 are unchanged. Three new cases failed before the change; the existing alert test changed only in its id.Release and upgrade impact
Product impact: ordinary
No package release: the extension CLI bundles some shared sources but none of the code changed in this stack; its built bundle contains no trace of it.