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

nagayon-935 / mping / 28570697393
85%

Build:
DEFAULT BRANCH: main
Ran 02 Jul 2026 06:39AM UTC
Jobs 1
Files 25
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

02 Jul 2026 06:39AM UTC coverage: 84.343% (+0.7%) from 83.642%
28570697393

push

github

nagayon-935
fix: address MEDIUM findings from full-repo go-review pass

Four fixes from the second go-review pass, none CRITICAL/HIGH but worth
closing before they bite:

1. PortChecker/HTTPChecker Wait() had 0% coverage, and no cmd/main test
   exercised resetHTTP end-to-end. Added TestPortChecker_Wait,
   TestHTTPChecker_Wait, tightened StopPreventsFurtherChecks to assert on
   Wait() rather than a sleep, and added TestRunWithHTTP/TestRunResetHTTP.

2. MTRStats.EnsureLen only grows, so when a rediscovery found a shorter
   path, trailing hops from the old longer path stayed frozen in the UI
   forever. Added MTRStats.TruncateLen and call it from discover() after
   computing the new hopCount.

3. parseHostsFile used yaml.Unmarshal, which silently drops typo'd or
   unknown keys (e.g. "interva" instead of "interval") instead of
   surfacing an error. Switched to yaml.NewDecoder with KnownFields(true).

4. runTraceroutes was fire-and-forget with no way for shutdown to confirm
   it had exited, unlike every other goroutine in this file (pinger, MTR
   engine, port/HTTP checkers). Added a traceDone channel closed when the
   goroutine returns, joined from stopPinger().

Note: the first attempt at #4 introduced a data race caught by
`go test -race` — the new goroutine read the shared traceCtx field
instead of a per-call local copy, so a concurrent resetTrace() could
reassign it mid-read. Fixed by passing the locally-scoped ctx through the
closure instead.

Verified: go vet, gofmt, staticcheck all clean; go test -race ./...
green across 10x repeats of the previously-touched packages; coverage
up in mtr (83.2%->87.0%), pinger (79.4%->79.8%), and cmd/main
(79.9%->82.7%).

39 of 41 new or added lines in 3 files covered. (95.12%)

4676 of 5544 relevant lines covered (84.34%)

0.98 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
91.67
-0.73% internal/stats/mtr.go
Jobs
ID Job ID Ran Files Coverage
1 28570697393.1 02 Jul 2026 06:39AM UTC 25
84.34
GitHub Action Run
Source Files on build 28570697393
  • Tree
  • List 25
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • af2c5332 on github
  • Prev Build on main (#28497976334)
  • Next Build on main (#28576489602)
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