• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OneBusAway / watchdog / 39128930209
76%
main: 76%

Build:
Build:
LAST BUILD BRANCH: fix/bounding-box-coordinate-validation
DEFAULT BRANCH: main
Ran 18 Oct 2026 12:51PM UTC
Jobs 1
Files 59
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Oct 2026 12:48PM UTC coverage: 76.43% (+0.03%) from 76.401%
39128930209

Pull #189

github

vishnums2k5
fix(metrics): deduplicate unmatched stop IDs when computing unresolved metric

When OneBusAway's /api/where/metrics.json endpoint reports unmatched stop IDs for an agency, entry.StopIDsUnmatched[agencyID] can contain duplicate stop IDs if multiple vehicles or trip updates encounter the same unmatched stop in an update cycle.

gtfs.GetStopLocationsByIDs indexes stops into a map keyed by stop ID, resolving each unique stop at most once. Previously, fetchObaAPIMetrics counted resolved stops from the returned map and calculated unresolved := len(unmatchedStopIDs) - resolved. When duplicate stop IDs were present, len(unmatchedStopIDs) was greater than the number of unique stops, causing unresolved > 0 even when all unique stops were successfully resolved against the GTFS bundle.

This resulted in false-positive oba_unmatched_stop_unresolved gauge metrics and false warning logs ("OBA unmatched stop IDs could not be resolved against the local GTFS bundle").

Deduplicate unmatchedStopIDs into unique IDs before resolving and computing the unresolved count. Add a unit test to verify duplicate unmatched stop IDs do not produce a non-zero unresolved metric.
Pull Request #189: fix(metrics): deduplicate unmatched stop IDs when computing unresolved metric

9 of 11 new or added lines in 1 file covered. (81.82%)

4384 of 5736 relevant lines covered (76.43%)

17106.72 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
91.71
0.33% internal/metrics/oba_rest_api_metrics.go
Jobs
ID Job ID Ran Files Coverage
1 39128930209.1 18 Oct 2026 12:51PM UTC 59
76.43
GitHub Action Run
Source Files on build 39128930209
  • Tree
  • List 59
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #189
  • PR Base - main (#38785281772)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc