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

prisma-risk / tsoracle / 26428196263
95%

Build:
DEFAULT BRANCH: main
Ran 26 May 2026 02:13AM UTC
Jobs 1
Files 85
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

26 May 2026 02:07AM UTC coverage: 95.383% (+0.002%) from 95.381%
26428196263

push

github

web-flow
feat(standalone): frame openraft peer RPC bodies with format_version (#461)

Add an additive `format_version` field to the openraft peer transport so
every postcard-encoded body on the wire is range-checked before parse and
the sender stamps the version it emits. This is the wire seam a future
divergent body layout will plug into; behaviour today is preserved because
every node still emits `BASELINE_WRITE_VERSION` (= 4).

**Proto (`crates/tsoracle-standalone/proto/raft_peer.proto`).** Two additive
`uint32` fields, regenerated by `build.rs`:

- `RaftMessage { ..., uint32 format_version = 2; }` covers every unary
  postcard body (`append_entries`, `vote`, `transfer_leader`, snapshot
  response).
- `SnapshotHeader { ..., uint32 format_version = 3; }` covers the streamed
  header's `vote` + `meta` postcard bodies. The streamed `data` chunks are
  NOT covered — that blob is the on-disk record and remains self-describing
  via its own leading version byte.

proto3's default `0` for an absent field means "pre-feature sender", and
is interpreted by the receiver as the baseline write version.

**`wire` helpers (`network.rs`).** Two tiny pure functions, one per
direction, so every send/recv site reads identically:

- `wire::stamp(version: u8) -> u32` widens the active write version for the
  outbound `format_version` field.
- `wire::readable_version(format_version: u32) -> Result<u8, String>`
  normalizes `0 => BASELINE_WRITE_VERSION` (absent), then range-checks the
  value against `[MIN_READABLE_VERSION, MAX_READABLE_VERSION]`. Out-of-range
  fails loud: `tonic::Status::invalid_argument` server-side, `RPCError` /
  `StreamingError::Network` client-side, **before** any `postcard::from_bytes`.

**Active write version threading.** A `WriteVersionSource = Arc<dyn Fn() ->
u8 + Send + Sync>` closure is threaded into `PeerFactory`, `PeerNetwork`,
`PeerServiceImpl`, and `server()`. It is read **per RPC**, not cached at
construction, so a future runtime activation flip... (continued)

7 of 7 new or added lines in 1 file covered. (100.0%)

12189 of 12779 relevant lines covered (95.38%)

420430.54 hits per line

Jobs
ID Job ID Ran Files Coverage
1 26428196263.1 26 May 2026 02:13AM UTC 85
95.38
GitHub Action Run
Source Files on build 26428196263
  • Tree
  • List 85
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26428196263
  • 852a7f4d on github
  • Prev Build on main (#26427776142)
  • Next Build on main (#26429349642)
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