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

umputun / reproxy / 25721950550
79%

Build:
DEFAULT BRANCH: master
Ran 12 May 2026 08:12AM UTC
Jobs 1
Files 19
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

12 May 2026 08:09AM UTC coverage: 78.34% (-0.02%) from 78.358%
25721950550

push

github

web-flow
fix(proxy): bound RoundRobinSelector return to current n (#250) (#251)

* fix(proxy): bound RoundRobinSelector return to current n

When alive-backend count shrinks between calls (e.g. health-check flips
a backend dead), the previously stored lastSelected could exceed the new
n. The returned index was the un-bounded stale value, causing matchHandler
to index out of range and panic.

Apply modulo before returning, so Select is always in [0, n) regardless
of how lastSelected was set on a prior call. Adds regression test that
reproduces the panic with shrinking n.

Related to #250

* chore: address lint cleanups (atomic.Int32, gosec G710)

Replace int32+sync/atomic free functions with atomic.Int32 type in
test files (modernize/atomictypes lint), and suppress gosec G710 on
the http->https redirect handler with explanation - redirect target
is derived from the request host, matching the standard upgrade
pattern.

* fix: address Copilot review on PR #251

Apply modulo on lastSelected write to keep [0, n) invariant - matches
original code's wrap-to-0 semantics when n changes, while still bounding
the returned value to current n. Both forms fix the panic; this one has
smaller behavioral delta from pre-fix code.

Add TestRoundRobinSelector_SelectGrowingN that pins the wrap behavior
when n grows back (e.g., dead backend recovers), catching regression
to the non-modulo write.

Expand the //nolint:gosec comment on the http->https redirect to spell
out the threat model (Host header is browser-set from URL hostname,
so a foreign Host can't be injected into a victim's request).

5 of 5 new or added lines in 2 files covered. (100.0%)

2 existing lines in 1 file now uncovered.

2416 of 3084 relevant lines covered (78.34%)

24.43 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
89.13
-1.45% app/discovery/provider/consulcatalog/consulcatalog.go
Jobs
ID Job ID Ran Files Coverage
1 25721950550.1 12 May 2026 08:12AM UTC 19
78.34
GitHub Action Run
Source Files on build 25721950550
  • Tree
  • List 19
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 16c66dcc on github
  • Prev Build on master (#23132077120)
  • Next Build on master (#25722912491)
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