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

prisma-risk / tsoracle / 26487708055
95%

Build:
DEFAULT BRANCH: main
Ran 27 May 2026 02:54AM UTC
Jobs 1
Files 89
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

27 May 2026 02:48AM UTC coverage: 94.926% (-0.04%) from 94.966%
26487708055

push

github

web-flow
refactor(core): PeerEndpoint newtype hoists scheme-less contract to type system (#560)

Introduce `tsoracle_core::PeerEndpoint(String)`, a newtype whose `try_from`
enforces the scheme-less `host:port` contract that consensus peer endpoints
have always been required to honor: no `http://` / `https://` prefix,
non-empty, numeric port in `1..=65535`, with bracketed IPv6 supported. The
type's `serde::Deserialize` re-validates so a malformed value cannot enter
the in-memory representation from the wire or from postcard-backed storage.

Migrated fields (in-process types, no wire-format change):
  * `TsoPeer.endpoint: String -> PeerEndpoint`
  * `LeaderState::Follower::leader_endpoint: Option<String> -> Option<PeerEndpoint>`
  * `ServingState::NotServing::leader_endpoint` and the `step_down` /
    `publish_not_serving` signatures flow the typed value end-to-end.

`tsoracle-server::fence::endpoint_is_scheme_less` and its `debug_assert`
guard branch are deleted: the type system now makes a scheme-bearing
follower hint unrepresentable, so the historical silent-prod-trap (a
TLS-configured client silently drops `http(s)://` hints, leaving the
leader unreachable via redirect) cannot recur. The epoch-monotonicity
guard is retained.

`OpenraftPeer.{service,admin}_endpoint` stay `String` on the type itself
to preserve the postcard wire format used by openraft membership log
entries (no `MAX_READABLE_VERSION` bump required). The `ServiceEndpoint`
trait now returns `Option<PeerEndpoint>` (parsed on each call), with
malformed or empty input silently mapping to `None` to match the
historical empty-as-sentinel pattern.

Wire-format compatibility is preserved at the proto boundaries: the
server converts `Option<PeerEndpoint>` back to `Option<String>` when
populating `LeaderHint.leader_endpoint`, and the client continues to
parse the wire `String` through `PeerEndpoint::try_from` at receive time.

Test fixtures that latently violated the contract (`http://...` /
`mem://...`... (continued)

221 of 235 new or added lines in 11 files covered. (94.04%)

13694 of 14426 relevant lines covered (94.93%)

385966.18 hits per line

Uncovered Changes

Lines Coverage ∆ File
14
93.03
-6.97% crates/tsoracle-core/src/peer.rs
Jobs
ID Job ID Ran Files Coverage
1 26487708055.1 27 May 2026 02:54AM UTC 89
94.93
GitHub Action Run
Source Files on build 26487708055
  • Tree
  • List 89
  • Changed 12
  • Source Changed 12
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26487708055
  • 3fe45541 on github
  • Prev Build on main (#26487193240)
  • Next Build on main (#26488457806)
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