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

m-lab / locate / 21163548148
82%

Build:
DEFAULT BRANCH: main
Ran 20 Jan 2026 07:51AM UTC
Jobs 1
Files 40
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

20 Jan 2026 07:49AM UTC coverage: 82.233% (-0.7%) from 82.926%
21163548148

push

github

web-flow
feat(priority): implement tier-based rate limiting for /v2/priority/nearest (#238)

* feat: add "locate" as a valid x-google-audiences.

* feat(priority): implement tier-based rate limiting for /v2/priority/nearest

Extract tier from JWT claims and apply per-org rate limits from config.yaml.

* test(handler): add PriorityNearest handler tests

* fix(handler): use getRemoteAddr for correct IP extraction in PriorityNearest

* refactor(handler): introduce TierLimiter interface for tier-based rate limiting

* fix(handler): use int_id claim and default to tier 0 for integration JWTs

* fix(handler): return 401 for invalid credentials instead of fallback to Nearest

* fix(handler): use appropriate log levels to prevent log spam

* fix: resolve golangci-lint errors

- Check req.ParseForm() return value in PriorityNearest
- Rename prom parameter to promClient to avoid import shadow
- Use http.NoBody instead of nil in test request
- Check conn.Send return values in IsLimitedWithTier

* refactor(handler): embed Limiter in TierLimiter for compile-time safety

* fix: remove unused func ParseConfig

* test(limits): add tests for ParseFullConfig error paths

Cover YAML decode errors and invalid tier interval parsing.

* for range 3

* xxx

* x

* ValueOrPanic

* add comment

* docs(limits): add sliding window algorithm explanation

* s/&result/result/

* fix: handle ParseForm() errors

* fix: handle ParseForm errors in Nearest() too

* Remove duplicate NewClientDirect

* update comment

* Fix handler test

* remove unnecessary test

* fix: add correct security settings for JWT to openapi.yaml

139 of 188 new or added lines in 5 files covered. (73.94%)

2379 of 2893 relevant lines covered (82.23%)

6.04 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
0.0
0.0% locate.go
14
81.25
-5.42% limits/ratelimiter.go
32
88.2
-7.6% handler/handler.go
Jobs
ID Job ID Ran Files Coverage
1 21163548148.1 20 Jan 2026 07:51AM UTC 40
82.23
GitHub Action Run
Source Files on build 21163548148
  • Tree
  • List 40
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • c3b9f90a on github
  • Prev Build on main (#21146428310)
  • Next Build on main (#21217316026)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc