Skip to content

History / search stop

Revisions

  • Record parent-agency fan-out as a confirmed Implementation Decision search-stop emits one references.stops entry per (parent station, resolving agency) pair when a station is shared across agencies, rather than legacy's single agency-stable entry. Traced why legacy's mechanism (AgencyAndId assigned per stop at bundle-ingestion time) doesn't transfer to Maglev: Maglev ingests one static bundle, not several federated ones, and the stops table has no agency_id column at all (matching raw GTFS's own stops.txt). The scenario is still real, not hypothetical, since one bundle's agency.txt can define multiple agencies whose routes share a stop_id. Cited the reviewer comment (PR #1221) that explicitly offered this per-(parent, agency) approach as an acceptable fix for the bug it replaced, and recorded the reconsideration fallback (pick one canonical agency per parent, as already done for routeless stops) per the page's existing Implementation Decisions format. Checked whether this fan-out pattern is reused elsewhere: it isn't, because no other multi-agency-capable endpoint currently populates parent stations at all (stops-for-location, trips-for-location, trips-for-route all hardcode parent to empty string) - so this stays a single-page decision rather than a shared doc.

    @burma-shave burma-shave committed Aug 6, 2026
  • Document stop direction inference as a shared algorithm Eight endpoint pages described data.*.direction as a bare GTFS passthrough ("absent when the feed does not supply it"), but both legacy Java (GenerateNarrativesTask.computeStopDirection) and Maglev (AdvancedDirectionCalculator) infer a direction from shape geometry when the feed omits one, using the same vector-averaging algorithm and the same 0.7 standard-deviation rejection threshold. Traced and cited the Java source directly rather than assuming Maglev's behavior was novel. Added Stop-Direction-Calculation.md as a single source of truth for the algorithm (legacy steps, Maglev's port, and the one confirmed intentional deviation: an epsilon-based near-zero check replacing Java's largely-inert exact == 0.0 comparison), and pointed every affected page at it instead of duplicating the explanation. Linked from OBA-API-Specs.md under a new Shared Algorithms section. Affected pages: stop, stops-for-agency, search-stop, stops-for-location, stops-for-route, arrival-and-departure-for-stop, arrivals-and-departures-for-stop, trips-for-location. block/{id} also calls the same code path but has no wiki spec page yet.

    @burma-shave burma-shave committed Aug 6, 2026
  • Document code fallback on search-stop's stop entries search-stop.md left data.list[].code undocumented for the no-code case, unlike stop.md and stops-for-agency.md. Traced the legacy call chain (BundleSearchServiceImpl -> TransitDataService.getStop() -> StopBeanServiceImpl.fillStopBean) to confirm search-stop's suggestion index is built from the same StopBean construction path as the single-stop endpoint, so the same getBestName() fallback to the entity ID applies here too. Not a Maglev deviation, just a gap.

    @burma-shave burma-shave committed Aug 6, 2026
  • docs(search-stop, search-route): note no-match 200 as deliberate deviation Both endpoints' legacy behavior (return HTTP 404 with the standard error envelope when a search matches nothing) stays the documented spec. Add an Implementation Decisions entry to each (creating the section on search-route.md, which didn't have one) explaining that Maglev instead treats a no-match query as a successful, empty result (HTTP 200, data.list: []), and cross-reference it with pointers from Minimal Guarantees, Extensions, and the Response Structure fields that describe the legacy 404 behavior.

    Eric Jutrzenka committed Jul 25, 2026
  • docs(search-stop): record route-reference sort as intentional cross-endpoint deviation Maglev sorts data.references.routes with the same natural-sort, shortName->longName->agencyId->id comparator used on stop and schedule-for-stop, rather than legacy search-stop's own plain lexicographic shortName->id comparator. Favors one consistent sort rule across endpoints over per-endpoint conformance with legacy.

    @burma-shave burma-shave committed Jul 18, 2026
  • docs(search-stop): record includeReferences=false as an intentional deviation Maglev returns an empty-but-present references block instead of reproducing the legacy NullPointerException/null-body bug (Suspected Defect #1). Adds the missing Implementation Decisions entry and cross-references it from the defect writeup.

    @burma-shave burma-shave committed Jul 18, 2026
  • Update OBA API specs (2026-05-11T23:13:08Z)

    @burma-shave burma-shave committed May 11, 2026