Skip to content

feat(agencies): add New York City transit coverage - #22

Merged
joncrangle merged 1 commit into
mainfrom
feat/nyc-transit
Nov 13, 2026
Merged

joncrangle merged 1 commit into
mainfrom
feat/nyc-transit

Conversation

@joncrangle

Copy link
Copy Markdown
Owner

Summary

Add experimental NYC coverage for MTA Subway and Staten Island Railway, plus NYCT and MTA Bus Company buses. The full seeded network remains available beyond the simplified maps.

MTA Subway + SIR    → 29 routes, 8-line schematic
MTA NYC buses      → 347 routes, all 20 SBS corridors drawn
shared Core        → live departures, bus positions, scoped alerts
regional datasets  → reviewed boarding identities and transfer badges

Core now supports exact feed-stop aliases, declared protobuf trip-direction extensions, and scalar JSON alert extensions. JSON trip selectors retain trip scope. NYC opts into strict interchange identity matching, preserving a facility's own boarding stops instead of relabelling unrelated nearby kerbs.

Closes #10. Closes #11.

Evidence

  • Before: NYC agencies were absent. Repeated station names could combine distinct facilities; NYCT extension directions and JSON advisory categories were discarded.
    After: Both agencies pass agency:check. Live cards show Grand Central services, SIR departures toward Tottenville, both bus directions, and distinct Penn 7th Avenue and 8th Avenue services.
  • Before: Terra reviewers identified unrelated bus stops in generated transfers and lost JSON trip scope.
    After: Fictional regression fixtures cover facility membership, exact aliases, direction extensions, extension classification, trip-only, route-plus-trip and mixed alert selectors. Penn inputs identify its real facilities and boarding stops. Undocumented FlixBus roadside walks are excluded; terminal connections remain.
  • Passed 4,523 unit tests, 107 integration tests, 111 Rust tests, typecheck, lint, formatting, Rust clippy/fmt, production build, agency checks, attribution, documentation and alert-identity checks. Terra review findings on transfer identities, JSON trip scope and legacy boarding compatibility are addressed. Strict grouping is a regional opt-in, with the original legacy behavior covered by regression tests.
  • Live checks on 2026-11-13 used all eight subway/SIR trip feeds and citywide bus trip/position feeds. Both Core hosting targets reported live alert snapshots: 216 subway/SIR and 246 bus notices in the final capture. Forced upstream 503s produced failures rather than a live empty board. Local Vite/Worker UI displayed fresh snapshots and departures.
  • Bounds contain all 989 seeded rail stops and 13,465 bus stops. Comparing Automatic resolution at 131,850 existing regional stops found no changed winners. City presets were checked against the current official GTFS stop coordinates on 2026-11-13.
  • Headless browser checks cover desktop and mobile maps, station cards, every drawn line endpoint, and full/compact transfer badges. The NYC badge-placement report has no conflicts; an unchanged regeneration reports zero changed rows. The 149 remaining placement conflicts belong to existing maps. The SBS schematic exceeds the usual 5–8 lines because the guide requires every branded rapid-bus corridor.

Sources: MTA developer portal, Bus Time, subway map, ©2026, Manhattan bus map, undated asset retrieved 2026-11-13, current borough GTFS feeds, and Port Authority connections. Schematics are original drawings of route and stop facts.

The public advisories page returned 403 from this machine, including in Chrome, so a direct current page-to-feed comparison was unavailable. The integration uses the JSON channel confirmed by MTA's Data and APIs product manager to contain the website's planned changes, preserving its categories and published periods. This is the limit of the page reconciliation evidence, not a claim that today's page was inspected successfully.

Merge Danger

Door: two-way

Blast Radius: transit

Shared decoder and offline interchange-generation changes can affect other agencies using those formats. Existing data remains intact; regenerated NYC and affected national relationships are included.

Both SQLite and local D1 were seeded. Production has not been seeded or deployed. Before rollout, run the manual initial seed for mta-subway,mta-bus into the shared DB_TRANSIT binding. Subway GPS positions are unavailable upstream; live departures work without fabricated positions. Bus feeds currently work without credentials despite older Bus Time documentation describing a key requirement.

@joncrangle
joncrangle marked this pull request as ready for review November 13, 2026 15:52
@joncrangle
joncrangle merged commit 53e0b78 into main Nov 13, 2026
4 checks passed
@joncrangle
joncrangle deleted the feat/nyc-transit branch November 13, 2026 15:53
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.

Add MTA New York City buses as an experimental bus agency Add NYC Subway and Staten Island Railway as an experimental rail agency

1 participant